1 #ifndef ALIEMCALTRIGGERDCSCONFIGDB_H
2 #define ALIEMCALTRIGGERDCSCONFIGDB_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
7 adapted from TRD: thanks!
16 class AliEMCALTriggerDCSConfig;
18 class AliEMCALTriggerDCSConfigDB : public TObject
22 static AliEMCALTriggerDCSConfigDB* Instance();
23 static void Terminate();
25 void SetRun(Long64_t run);
26 Long64_t GetRun() const { return fRun; }
27 const AliEMCALTriggerDCSConfig* GetTriggerDCSConfig();
28 void GetSTUSegmentation(Int_t ss[], Int_t sp[]);
29 Int_t GetTRUGTHRL0(Int_t iTRU);
33 // For caching see also implentation of GetCachedCDBObject in the .cxx file
34 // For now, only one cached object but let the possibility to have more
35 enum { kCDBCacheSize = 1 }; // Number of cached objects
36 enum { kIDTriggerConfig = 0 }; // IDs of cached objects
38 const TObject *GetCachedCDBObject(Int_t id);
42 AliCDBEntry *GetCDBEntry(const Char_t *cdbPath);
43 const TObject *CacheCDBEntry(Int_t id, const Char_t *cdbPath);
45 static AliEMCALTriggerDCSConfigDB* fgInstance; // Instance of this class (singleton implementation)
46 static Bool_t fgTerminated; // Defines if this class has already been terminated
48 AliCDBEntry* fCDBEntries[kCDBCacheSize]; // Cache for CDB entries
49 TObject* fCDBCache[kCDBCacheSize]; // Cache for calibration objects.
51 Long64_t fRun; // Run Number
55 AliEMCALTriggerDCSConfigDB(); // This is a singleton, constructor is private!
56 AliEMCALTriggerDCSConfigDB(const AliEMCALTriggerDCSConfigDB &c);
57 AliEMCALTriggerDCSConfigDB &operator=(const AliEMCALTriggerDCSConfigDB &c);
58 virtual ~AliEMCALTriggerDCSConfigDB();
60 ClassDef(AliEMCALTriggerDCSConfigDB, 1) // Provides central access to the CDB