1 #ifndef ConfigurationManager_h 2 #define ConfigurationManager_h 6 #include <ConfigurationBase.hxx> 7 #include <HLClonesArray.hxx> 11 const int NMAXCONFIGURATIONS=50;
59 void AddConfiguration(Int_t index,
const std::string& conf, UInt_t ntoys=1, Int_t randomSeed=-1,
ToyMaker* toyMaker=NULL);
71 void DisableConfiguration(Int_t conf){
_confs[conf]->SetEnabled(
false);}
72 void DisableAllConfigurations();
73 void EnableAllConfigurations();
83 void DisableAllToys(
const std::string& conf){
for (
int i=0;i<GetNToys(conf);i++) DisableToy(conf,i);}
84 void EnableAllToys(
const std::string& conf) {
for (
int i=0;i<GetNToys(conf);i++) EnableToy(conf,i);}
160 enum enumConf_ConfigurationManager{
162 enumConfLast_ConfigurationManager
void DumpConfigurations(SystematicManager *syst=NULL)
Dump summary info about all configurations.
void EnableEventWeight(Int_t index)
Enable the systematic registered with the given name.
void AddConfiguration(Int_t index, const std::string &conf, UInt_t ntoys=1, Int_t randomSeed=-1, ToyMaker *toyMaker=NULL)
Add a new configuration.
void SetNToys(const std::string &conf, int ntoy)
Sets the number of toys to a configuration with name.
void EnableEventVariations(const std::vector< Int_t > &indices)
Enable the systematic registered with the given name.
void EnableEventVariations(const std::vector< Int_t > &systs, Int_t conf=-1)
Enable the systematics registered with the given indices.
ConfigurationBase * GetCurrentConfiguration() const
return the current configuration
void SetCurrentConfigurationIndex(Int_t conf)
Set the index of the current configuration.
std::vector< ConfigurationBase *> _confs
configurations
int GetNMaxToys()
Get the maximum number of toys in all configurations.
Int_t GetNToys() const
Get and sets the number of toys.
Int_t GetCurrentConfigurationIndex() const
return the index of the current configuration
Int_t GetConfigurationIndex(const std::string &conf_name)
Returs the index of a configuration with name.
void EnableEventVariation(Int_t index)
Enable the systematic registered with the given name.
void EnableSystematic(Int_t index)
Enable the systematic registered with the given name.
const std::vector< Int_t > & GetEnabledEventVariations()
Get the variations enabled for this configuration.
Int_t _current_conf
Current configuration index.
void DisableEventVariation(Int_t index)
Disable the systematic registered with the given index.
void EnableSystematics(const std::vector< Int_t > &systs, Int_t conf=-1)
Enable the systematics registered with the given indices.
int _toy_index
current toy index
void SetCurrentConfigurationName(const std::string &conf)
Set the name of the current configuration.
const std::string & GetCurrentConfigurationName()
return the name of the current configuration
void DisableAllEventWeights()
Disable the systematic registered with the given name.
void DisableAllEventVariations()
Disable the systematic registered with the given name.
void DisableEventWeight(Int_t index)
Disable the systematic registered with the given index.
bool GetToyEnabled(const std::string &conf, int toy)
Enable/disable toys.
const std::vector< Int_t > & GetEnabledEventWeights()
Get the weights enabled for this configuration.
void EnableEventWeights(const std::vector< Int_t > &systs, Int_t conf=-1)
Enable the systematics registered with the given indices.
The maximum number of systematics that is supported.
void SetNToys(Int_t index, int ntoy)
Sets the number of toys to a configuration with index.
void SetToyIndex(int index)
Set and gets the index of the current toy.
const std::vector< Int_t > & GetEnabledSystematics(Int_t conf=-1)
Get the systematics that are enabled for a given configuration.
const std::string & GetConfigurationName(Int_t index)
Returs the name of a configuration with index.
const std::vector< Int_t > & GetEnabledEventWeights(Int_t conf=-1)
Get the systematics that are enabled for a given configuration.
std::vector< ConfigurationBase *> _confs_nonull
no NULL configurations
void DisableAllSystematics()
Disable the systematic registered with the given name.
void DisableAllSystematic(Int_t conf=-1)
Disable the systematic registered with the given index.
std::vector< ConfigurationBase * > & GetConfigurations()
return the vector of configurations
void EnableConfiguration(const std::string &conf)
Enable/Disable configurations.
void EnableEventWeight(Int_t syst, Int_t conf=-1)
Enable the systematic registered with the given index.
void EnableEventVariation(Int_t syst, Int_t conf=-1)
Enable the systematic registered with the given index.
void DisableAllEventVariation(Int_t conf=-1)
Disable the systematic registered with the given index.
void EnableEventWeights(const std::vector< Int_t > &indices)
Enable the systematic registered with the given name.
bool ConfigurationEnabled(const std::string &conf)
Check if a configuration is enabled.
void DisableSystematic(Int_t index)
Disable the systematic registered with the given index.
const std::vector< Int_t > & GetEnabledEventVariations(Int_t conf=-1)
Get the systematics that are enabled for a given configuration.
const std::vector< Int_t > & GetEnabledSystematics()
Get the systematics enabled for this configuration.
void ReadConfigurations(const std::string &file)
Read configurations from a file.
bool ConfigurationEnabled(Int_t conf)
Check if a configuration is enabled.
void EnableSystematic(Int_t syst, Int_t conf=-1)
Enable the systematic registered with the given index.
void EnableSystematics(const std::vector< Int_t > &indices)
Enable the systematic registered with the given name.
void SetToyRandomSeed(Int_t index, Int_t seed)
Sets the Toy random seed to a configuration with index.
ConfigurationBase * GetConfiguration(Int_t index) const
return the configuration with a given index
void DisableAllEventWeight(Int_t conf=-1)
Disable the systematic registered with the given index.
ConfigurationBase * GetConfiguration(const std::string &conf)
return the configuration with a given index
void CreateToyExperiments(const SystematicManager &syst)
Create the ToyExperiments using the ToyMaker and the SystematicManager.