Fixing warnings
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALTriggerDCSConfigDB.h
CommitLineData
fff39dd1 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 */
5
6/*
7 adapted from TRD: thanks!
8*/
9
10#ifndef ROOT_TObject
11#include "TObject.h"
12#endif
13
14class AliCDBEntry;
15
16class AliEMCALTriggerDCSConfig;
17
18class AliEMCALTriggerDCSConfigDB : public TObject
19{
20public:
21
22 static AliEMCALTriggerDCSConfigDB* Instance();
23 static void Terminate();
24
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);
30
31protected:
32
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
37
38 const TObject *GetCachedCDBObject(Int_t id);
39
40 void Invalidate();
41
42 AliCDBEntry *GetCDBEntry(const Char_t *cdbPath);
43 const TObject *CacheCDBEntry(Int_t id, const Char_t *cdbPath);
44
45 static AliEMCALTriggerDCSConfigDB* fgInstance; // Instance of this class (singleton implementation)
46 static Bool_t fgTerminated; // Defines if this class has already been terminated
47
48 AliCDBEntry* fCDBEntries[kCDBCacheSize]; // Cache for CDB entries
49 TObject* fCDBCache[kCDBCacheSize]; // Cache for calibration objects.
50
51 Long64_t fRun; // Run Number
52
53 private:
54
55 AliEMCALTriggerDCSConfigDB(); // This is a singleton, constructor is private!
56 AliEMCALTriggerDCSConfigDB(const AliEMCALTriggerDCSConfigDB &c);
57 AliEMCALTriggerDCSConfigDB &operator=(const AliEMCALTriggerDCSConfigDB &c);
58 virtual ~AliEMCALTriggerDCSConfigDB();
59
60 ClassDef(AliEMCALTriggerDCSConfigDB, 1) // Provides central access to the CDB
61};
62
63#endif
64