00001
00002
00003
00004 #ifndef STJTREEINDEXLISTCREATOR_H
00005 #define STJTREEINDEXLISTCREATOR_H
00006
00007 #include "StjTreeIndexList.h"
00008
00009 #include <TObject.h>
00010
00011 #include <string>
00012 #include <vector>
00013
00014 class TDirectory;
00015
00016
00017 class StjTreeIndexListCreator : public TObject {
00018
00019 public:
00020 StjTreeIndexListCreator(TDirectory *file)
00021 : _indexMajorName("runNumber"), _indexMinorName("eventId")
00022 , _file(file)
00023 { }
00024 virtual ~StjTreeIndexListCreator() { }
00025
00026 void AddTrgTreeName(const char* treeName) { _trgTreeNameList.push_back(treeName); }
00027
00028 StjTreeIndexList create();
00029
00030 typedef std::vector<std::string> TrgTreeNameList;
00031 TrgTreeNameList trgTreeNameList() const { return _trgTreeNameList; }
00032
00033 private:
00034
00035 StjTreeIndexList getIndexListOfRunsPassedFor(const char* treeName);
00036
00037 std::string _indexMajorName;
00038 std::string _indexMinorName;
00039
00040 TDirectory *_file;
00041
00042 TrgTreeNameList _trgTreeNameList;
00043
00044 ClassDef(StjTreeIndexListCreator, 1)
00045
00046 };
00047
00048 #endif // STJTREEINDEXLISTCREATOR_H