54 : fLogger( new
MsgLogger(
"DataInputHandler", kINFO) )
76 TTree * tr = ReadInputTree(fn);
78 AddTree( tr, className, weight, cut,
tt );
90 if (!
tree)
Log() << kFATAL <<
"Zero pointer for tree of class " << className.
Data() <<
Endl;
91 if (
tree->GetEntries()==0)
Log() << kFATAL <<
"Encountered empty TTree or TChain of class " << className.
Data() <<
Endl;
92 if (fInputTrees[className.
Data()].empty()) {
100 Log() << kFATAL <<
"For the tree " <<
tree->GetName() <<
" of class " << className.
Data()
103 << fInputTrees[className.
Data()][0].GetTree()->GetName() <<
" of class " << className.
Data()
120 AddTree( tr,
"Signal", weight,
"",
tt );
128 AddTree( tr,
"Background", weight,
"",
tt );
136 TTree * tr = ReadInputTree(fn);
138 AddTree( tr,
"Signal", weight,
"",
tt );
146 TTree * tr = ReadInputTree(fn);
148 AddTree( tr,
"Background", weight,
"",
tt );
157 std::ifstream in(dataFile);
158 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;
159 if (!in.good())
Log() << kFATAL <<
"Could not open file: " << dataFile <<
Endl;
174 if (!inputTree)
Log() << kFATAL <<
"Zero pointer for input tree: " << inputTree <<
Endl;
176 AddTree( inputTree,
"Signal", 1.0, SigCut );
177 AddTree( inputTree,
"Background", 1.0, BgCut );
186 fInputTrees.find(className)->second.clear();
189 Log() << kINFO <<
" Clear treelist for class " << className <<
" failed, since class does not exist." <<
Endl;
197 std::vector< TString >* ret =
new std::vector< TString >();
198 for ( std::map<
TString, std::vector<TreeInfo> >::iterator it = fInputTrees.begin(); it != fInputTrees.end(); ++it ){
199 ret->push_back( it->first );
210 std::vector<TreeInfo>::const_iterator tiIt = tiV.begin();
211 for (;tiIt != tiV.end();++tiIt) entries += tiIt->GetEntries();
221 for (std::map<
TString, std::vector<TreeInfo> >::iterator it = fInputTrees.begin(); it != fInputTrees.end(); ++it) {
222 number += GetEntries( it->second );
A specialized string object used for TTree selections.
ostringstream derivative to redirect and format output
virtual const char * GetTitle() const
Returns title of object.
const char * Data() const
A TTree represents a columnar dataset.
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 void SetName(const char *name)
Change the name of this tree.
MsgLogger & Endl(MsgLogger &ml)