37 #ifndef ROOT_TMVA_Configurable
67 TTree * tr = ReadInputTree(fn);
69 AddTree( tr, className, weight, cut, tt );
81 if (!tree)
Log() <<
kFATAL <<
"Zero pointer for tree of class " << className.
Data() <<
Endl;
83 if (fInputTrees[className.
Data()].empty()) {
94 << fInputTrees[className.
Data()][0].GetTree()->GetName() <<
" of class " << className.
Data()
102 fInputTrees[className.
Data()].push_back(
TreeInfo( tree, className, weight, tt ));
111 AddTree( tr,
"Signal", weight,
"", tt );
119 AddTree( tr,
"Background", weight,
"", tt );
127 TTree * tr = ReadInputTree(fn);
129 AddTree( tr,
"Signal", weight,
"", tt );
137 TTree * tr = ReadInputTree(fn);
139 AddTree( tr,
"Background", weight,
"", tt );
148 std::ifstream in(dataFile);
149 tr->
SetDirectory(0);
Log() <<
kWARNING <<
"Watch out, I (Helge) made the Tree not associated to the current directory .. Hopefully that does not have unwanted consequences" <<
Endl;
150 if (!in.good())
Log() <<
kFATAL <<
"Could not open file: " << dataFile <<
Endl;
165 if (!inputTree)
Log() <<
kFATAL <<
"Zero pointer for input tree: " << inputTree <<
Endl;
167 AddTree( inputTree,
"Signal", 1.0, SigCut );
168 AddTree( inputTree,
"Background", 1.0, BgCut );
177 fInputTrees.find(className)->second.clear();
180 Log() <<
kINFO <<
" Clear treelist for class " << className <<
" failed, since class does not exist." <<
Endl;
188 std::vector< TString >* ret =
new std::vector< TString >();
189 for ( std::map<
TString, std::vector<TreeInfo> >::iterator it = fInputTrees.begin(); it != fInputTrees.end(); it++ ){
190 ret->push_back( it->first );
201 std::vector<TreeInfo>::const_iterator tiIt = tiV.begin();
202 for (;tiIt != tiV.end(); tiIt++) entries += tiIt->GetEntries();
212 for (std::map<
TString, std::vector<TreeInfo> >::iterator it = fInputTrees.begin(); it != fInputTrees.end(); it++) {
213 number += GetEntries( it->second );
virtual const char * GetTitle() const
Returns title of object.
MsgLogger & Endl(MsgLogger &ml)
virtual TTree * CopyTree(const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Copy a tree with selection.
const char * Data() const
A specialized string object used for TTree selections.
virtual const char * GetName() const
Returns name of object.
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
virtual Long64_t ReadFile(const char *filename, const char *branchDescriptor="", char delimiter= ' ')
Create or simply read branches from filename.
virtual Long64_t GetEntries() const
A TTree object has a header with a name and a title.
virtual void SetName(const char *name)
Change the name of this tree.