#ifndef TTripTPedSingleton_seen #define TTripTPedSingleton_seen #include namespace COMET{ class IDPTPedStore; class ITripTParam; class ITripTPedSingleton; } /// A singleton class that manages pedestal data (singleton impl copied from IFGDDataManager by T. Lindner) class COMET::ITripTPedSingleton { public: virtual ~ITripTPedSingleton(){;} /// Get a reference to the singleton instance. static ITripTPedSingleton& Instance(void); void EnablePedestals(COMET::ITripTParam *aP, int readfiles, const char *path = "./"); void HavePedestalBank(const unsigned char *p, size_t psize, int det, int rmm); COMET::IDPTPedStore* GetPedStoreH(int det, int rmm); COMET::IDPTPedStore* GetPedStoreL(int det, int rmm); private: ITripTPedSingleton(); /// The static pointer to the singleton instance. static ITripTPedSingleton* fTTripTPedSingleton; static const int kMaxRmm = 12; // ECAL can be up to 12 static const int kMaxDetectorIndex = 9; // 8= Ingrid, but this list starts from 0 COMET::IDPTPedStore *fStoreH[kMaxDetectorIndex][kMaxRmm]; // High gains COMET::IDPTPedStore *fStoreL[kMaxDetectorIndex][kMaxRmm]; // Low gains int fStoreStat[kMaxDetectorIndex][kMaxRmm]; //< Status: 0=Not loaded, 1=Loaded from file, //< 2=Loaded from file, do not update, 3=Loaded from bank }; #endif