]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliCDBManager.h
new digitization and reconstruction corresponded to new data format
[u/mrichter/AliRoot.git] / STEER / AliCDBManager.h
index 9a3d38055f3fb3c00382c22310846588ca516936..4c9d208a189e0a2e25d9e2fa0cd0862a037aaa07 100644 (file)
@@ -46,10 +46,10 @@ class AliCDBManager: public TObject {
        AliCDBStorage* GetDefaultStorage() const {return fDefaultStorage;}
        void UnsetDefaultStorage() {fDefaultStorage = 0x0;}
        
-       void SetSpecificStorage(const char* detName, const char* dbString);
-       void SetSpecificStorage(const char* detName, AliCDBParam* param);
+       void SetSpecificStorage(const char* calibType, const char* dbString);
+       void SetSpecificStorage(const char* calibType, AliCDBParam* param);
 
-       AliCDBStorage* GetSpecificStorage(const char* detName);
+       AliCDBStorage* GetSpecificStorage(const char* calibType);
 
        void SetDrain(const char* dbString);
        void SetDrain(const AliCDBParam* param);
@@ -62,19 +62,27 @@ class AliCDBManager: public TObject {
        void UnsetDrain(){fDrainStorage = 0x0;}
 
        AliCDBEntry* Get(const AliCDBId& query);
-       AliCDBEntry* Get(const AliCDBPath& path, Int_t runNumber, 
+       AliCDBEntry* Get(const AliCDBPath& path, Int_t runNumber=-1
                                Int_t version = -1, Int_t subVersion = -1);
        AliCDBEntry* Get(const AliCDBPath& path, const AliCDBRunRange& runRange,
                                 Int_t version = -1, Int_t subVersion = -1);
 
        TList* GetAll(const AliCDBId& query);
-       TList* GetAll(const AliCDBPath& path, Int_t runNumber, 
+       TList* GetAll(const AliCDBPath& path, Int_t runNumber=-1
                                Int_t version = -1, Int_t subVersion = -1);
        TList* GetAll(const AliCDBPath& path, const AliCDBRunRange& runRange,
                                 Int_t version = -1, Int_t subVersion = -1); 
 
        Bool_t Put(TObject* object, AliCDBId& id,  AliCDBMetaData* metaData);
        Bool_t Put(AliCDBEntry* entry);
+               
+       void SetCacheFlag(Bool_t cacheFlag) {fCache=cacheFlag;}
+       Bool_t GetCacheFlag() {return fCache;}
+
+       void SetRun(Long64_t run);
+       Long64_t GetRun() {return fRun;}
+
+       // AliCDBEntry* Get(const char* path);
 
        void DestroyActiveStorages();
        void DestroyActiveStorage(AliCDBStorage* storage);
@@ -91,15 +99,27 @@ class AliCDBManager: public TObject {
        
        AliCDBStorage* GetActiveStorage(const AliCDBParam* param);
        void PutActiveStorage(AliCDBParam* param, AliCDBStorage* storage);
+       
+       void ClearCache();
+       void CacheEntry(const char* path, AliCDBEntry* entry);
+       
+       AliCDBParam* SelectSpecificStorage(const TString& path);
+       
 
        void Init();
        
        TList fFactories;               //! list of registered storage factories
        TMap fActiveStorages;           //! list of active storages
        TMap fSpecificStorages;         //! list of detector-specific storages
+
        AliCDBStorage *fDefaultStorage; //! pointer to default storage
        AliCDBStorage *fDrainStorage;   //! pointer to drain storage
 
+       TMap fEntryCache;       //! cache of the retrieved objects
+
+       Bool_t fCache;                  //! The cache flag
+       Long64_t fRun;                  //! The run number
+
        ClassDef(AliCDBManager, 0);
 };