File indexing completed on 2024-04-06 12:27:57
0001 #ifndef HistoManager_included
0002 #define HistoManager_included 1
0003
0004 #include "TDirectory.h"
0005 #include "TH1.h"
0006 #include "MyHcalClasses.h"
0007
0008 class HistoManager {
0009 public:
0010 enum HistType { ENERGY=0, TIME=1, PULSE=2, ADC=3, NUMHISTTYPES=4 };
0011 enum EventType { UNKNOWN=0, PEDESTAL=1, LED=2, LASER=3, BEAM=4, NUMEVTTYPES=5 };
0012
0013 HistoManager(TDirectory* parent);
0014
0015 std::vector<MyHcalDetId> getDetIdsForType(HistType ht, EventType et);
0016 TH1* GetAHistogram(const MyHcalDetId& id, HistType ht, EventType et);
0017
0018
0019
0020
0021 std::vector<MyElectronicsId> getElecIdsForType(HistType ht, EventType et);
0022 TH1* GetAHistogram(const MyElectronicsId& id, HistType ht, EventType et);
0023
0024
0025
0026
0027 static std::string nameForFlavor(HistType ht);
0028 static std::string nameForEvent(EventType et);
0029 private:
0030 bool m_writeMode;
0031 TDirectory* pedHistDir;
0032 TDirectory* ledHistDir;
0033 TDirectory* laserHistDir;
0034 TDirectory* beamHistDir;
0035 TDirectory* otherHistDir;
0036 };
0037
0038 #endif