]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/CDB/AliCDBManager.h
Merge branch 'master' into TPCdev
[u/mrichter/AliRoot.git] / STEER / CDB / AliCDBManager.h
index 36f4d53b0589b98cfc0b1314ef8be0d917e43580..5a759373b57be813f40c512af24ced0f5abea5cf 100644 (file)
@@ -63,12 +63,13 @@ class AliCDBManager: public TObject {
     void SetDrain(const char* dbString);
     void SetDrain(const AliCDBParam* param);
     void SetDrain(AliCDBStorage *storage);
-
+    void UnsetDrain(){fDrainStorage = 0x0;}
     Bool_t IsDrainSet() const {return fDrainStorage != 0;}
-
     Bool_t Drain(AliCDBEntry* entry);
 
-    void UnsetDrain(){fDrainStorage = 0x0;}
+    Bool_t SetOCDBUploadMode();
+    void UnsetOCDBUploadMode() { fOCDBUploadMode=kFALSE; }
+    Bool_t IsOCDBUploadMode() const { return fOCDBUploadMode; }
 
     AliCDBEntry* Get(const AliCDBId& query, Bool_t forceCaching=kFALSE);
     AliCDBEntry* Get(const AliCDBPath& path, Int_t runNumber=-1,
@@ -127,7 +128,8 @@ class AliCDBManager: public TObject {
     Bool_t InitFromSnapshot(const char* snapshotFileName, Bool_t overwrite=kTRUE);
     Bool_t SetSnapshotMode(const char* snapshotFileName="OCDB.root");
     void UnsetSnapshotMode() {fSnapshotMode=kFALSE;}
-    void DumpToSnapshotFile(const char* snapshotFileName, Bool_t singleKeys);
+    void DumpToSnapshotFile(const char* snapshotFileName, Bool_t singleKeys) const;
+    void DumpToLightSnapshotFile(const char* lightSnapshotFileName) const;
 
     Int_t GetStartRunLHCPeriod();
     Int_t GetEndRunLHCPeriod();
@@ -135,6 +137,8 @@ class AliCDBManager: public TObject {
     TString GetCvmfsOcdbTag() const {return fCvmfsOcdb;}
 
     Bool_t DiffObjects(const char *cdbFile1, const char *cdbFile2) const;
+    void ExtractBaseFolder(TString& url); // remove everything but the url from OCDB path
+
 
   protected:
 
@@ -157,6 +161,8 @@ class AliCDBManager: public TObject {
     void SetSpecificStorage(const char* calibType, const AliCDBParam* param);
     void AlienToCvmfsUri(TString& uriString) const;
     void ValidateCvmfsCase() const;
+    void GetLHCPeriodAgainstAlienFile(Int_t run, TString& lhcPeriod, Int_t& startRun, Int_t& endRun);
+    void GetLHCPeriodAgainstCvmfsFile(Int_t run, TString& lhcPeriod, Int_t& startRun, Int_t& endRun);
 
     void CacheEntry(const char* path, AliCDBEntry* entry);
 
@@ -195,6 +201,7 @@ class AliCDBManager: public TObject {
 
     Bool_t fSnapshotMode;           //! flag saying if we are in snapshot mode
     TFile *fSnapshotFile;
+    Bool_t fOCDBUploadMode;         //! flag for uploads to Official CDBs (upload to cvmfs must follow upload to AliEn)
 
     Bool_t fRaw;   // flag to say whether we are in the raw case
     TString fCvmfsOcdb;       // set from $OCDB_PATH, points to a cvmfs AliRoot package