73 AddTree(
tr, className, weight, cut,
tt );
85 if (!tree) Log() << kFATAL <<
"Zero pointer for tree of class " << className.
Data() <<
Endl;
86 if (tree->
GetEntries()==0) Log() << kFATAL <<
"Encountered empty TTree or TChain of class " << className.
Data() <<
Endl;
87 if (fInputTrees[className.
Data()].empty()) {
95 Log() << kFATAL <<
"For the tree " << tree->
GetName() <<
" of class " << className.
Data()
98 << fInputTrees[className.
Data()][0].GetTree()->GetName() <<
" of class " << className.
Data()
106 fInputTrees[className.
Data()].push_back(
TreeInfo( tree, className, weight,
tt ));
115 AddTree(
tr,
"Signal", weight,
"",
tt );
123 AddTree(
tr,
"Background", weight,
"",
tt );
132 tr->SetName(
"TreeS");
133 AddTree(
tr,
"Signal", weight,
"",
tt );
142 tr->SetName(
"TreeB");
143 AddTree(
tr,
"Background", weight,
"",
tt );
153 tr->SetDirectory(
nullptr);
154 Log() << kWARNING <<
"Watch out, I (Helge) made the Tree not associated to the current directory .. Hopefully that does not have unwanted consequences" <<
Endl;
155 if (!in.good()) Log() << kFATAL <<
"Could not open file: " <<
dataFile <<
Endl;
182 fInputTrees.find(className)->second.clear();
185 Log() << kINFO <<
" Clear treelist for class " << className <<
" failed, since class does not exist." <<
Endl;
193 std::vector< TString >*
ret =
new std::vector< TString >();
194 for ( std::map<
TString, std::vector<TreeInfo> >::iterator it = fInputTrees.begin(); it != fInputTrees.end(); ++it ){
195 ret->push_back( it->first );
206 std::vector<TreeInfo>::const_iterator
tiIt =
tiV.
begin();
217 for (std::map<
TString, std::vector<TreeInfo> >::iterator it = fInputTrees.begin(); it != fInputTrees.end(); ++it) {
218 number += GetEntries( it->second );
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
const_iterator begin() const
const_iterator end() const
A specialized string object used for TTree selections.
ostringstream derivative to redirect and format output
@ kMaxTreeType
also used as temporary storage for trees not yet assigned for testing;training...
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
const char * Data() const
A TTree represents a columnar dataset.
virtual TTree * CopyTree(const char *selection, Option_t *option="", Long64_t nentries=kMaxEntries, Long64_t firstentry=0)
Copy a tree with selection.
virtual Long64_t GetEntries() const
MsgLogger & Endl(MsgLogger &ml)