HighLAND
Public Member Functions | Protected Attributes | List of all members
ConfigTreeTools Class Reference

Public Member Functions

 ConfigTreeTools (const std::string &fileName)
 
 ConfigTreeTools (SystematicManager &syst, ConfigurationManager &conf)
 
void Initialize (const std::string &fileName)
 
void Initialize (SystematicManager &syst, ConfigurationManager &conf)
 
Int_t GetWeightIndex (const std::string &conf, const std::string &name) const
 
Int_t GetWeightIndex (Int_t conf, Int_t weight) const
 
Float_t GetVarValueF (const std::string &name) const
 Get the value of a Float variable stored in the tree.
 
Double_t GetVarValueD (const std::string &name) const
 Get the value of a Double variable stored in the tree.
 
Int_t GetVarValueI (const std::string &name) const
 Get the value of a Int variable stored in the tree.
 
std::string GetVarValueC (const std::string &name) const
 Get the value of a Char variable stored in the tree.
 

Protected Attributes

SystematicManager_syst
 
ConfigurationManager_conf
 
std::string _fileName
 
bool _fromFile
 

Detailed Description

Definition at line 9 of file ConfigTreeTools.hxx.

Member Function Documentation

§ GetWeightIndex()

Int_t ConfigTreeTools::GetWeightIndex ( const std::string &  conf,
const std::string &  name 
) const

Get the Index of a given weight for a given configuration in the micro-trees. To compute that it uses the config tree

Definition at line 42 of file ConfigTreeTools.cxx.

42  {
43 //********************************************************************
44 
45  if (!_conf->GetConfiguration(conf)) return -1;
46  if (_conf->GetConfiguration(conf)->GetEnabledSystematics().size()==0) return -1;
47 
48  _syst->DisableAllSystematics();
50 
51  Int_t nSyst;
52  EventWeightBase** systs = _syst->GetWeightSystematics(nSyst);
53  Int_t j=0;
54  for (int it = 0; it < nSyst; it++) {
55  if (systs[it]->IsEnabled()){
56  if (systs[it]->Name() == name) return j;
57  j++;
58  }
59  }
60  return -1;
61 }
void DisableAllSystematics()
Disable all Systematics.
EventWeightBase ** GetWeightSystematics(int &nSys)
Get the vector of weightsSystematics.
void EnableSystematics(const std::vector< Int_t > &systs)
Enable the systematics registered with the given indices.
const std::vector< Int_t > & GetEnabledSystematics()
Get the systematics enabled for this configuration.
ConfigurationBase * GetConfiguration(Int_t index) const
return the configuration with a given index

The documentation for this class was generated from the following files: