3 #include "StjTreeIndexListCreator.h"
5 #include "StjTreeIndexList.h"
8 #include <TDirectory.h>
18 std::set<StjTreeIndex> indexSet;
19 for(TrgTreeNameList::const_iterator trgName = _trgTreeNameList.begin(); trgName != _trgTreeNameList.end(); ++trgName) {
20 StjTreeIndexList aList = getIndexListOfRunsPassedFor((*trgName).c_str());
21 indexSet.insert(aList.begin(), aList.end());
24 StjTreeIndexList ret;;
25 copy(indexSet.begin(), indexSet.end(), back_inserter(ret));
29 StjTreeIndexList StjTreeIndexListCreator::getIndexListOfRunsPassedFor(
const char* treeName)
32 TTree *tree =
dynamic_cast<TTree*
>(_file->Get(treeName));
33 Int_t indexMajor, indexMinor;
34 tree->SetBranchAddress(_indexMajorName.c_str(), &indexMajor);
35 tree->SetBranchAddress(_indexMinorName.c_str(), &indexMinor);
38 for(Long64_t i = 0; i < tree->GetEntries(); ++i) {
39 if(tree->GetEntry(i) <= 0)
continue;