1 #ifndef ALI_CDB_MANAGER_H 2 #define ALI_CDB_MANAGER_H 18 #include <TTimeStamp.h> 64 void SetSpecificStorage(
const char* calibType,
const char* dbString, Int_t version = -1, Int_t subVersion = -1);
87 Int_t version = -1, Int_t subVersion = -1);
89 Int_t version = -1, Int_t subVersion = -1);
92 const char*
GetURI(
const char* path);
96 Int_t version = -1, Int_t subVersion = -1);
98 Int_t version = -1, Int_t subVersion = -1);
101 const char* mirrors=
"",
DataType type=kPrivate);
107 ULong64_t
SetLock(Bool_t lockFlag=kTRUE, ULong64_t key=0);
128 void Print(Option_t* option=
"")
const;
144 Bool_t
InitFromSnapshot(
const char* snapshotFileName, Bool_t overwrite=kTRUE);
155 Bool_t
DiffObjects(
const char *cdbFile1,
const char *cdbFile2)
const;
189 Int_t version = -1, Int_t subVersion = -1);
191 Int_t version = -1, Int_t subVersion = -1);
252 virtual Bool_t Validate(
const char* dbString) = 0;
274 const TString&
GetType()
const {
return fType;};
275 const TString&
GetURI()
const {
return fURI;};
281 void SetType(
const char* type) {fType = type;};
282 void SetURI(
const char* uri) {fURI = uri;};
void SetURI(const char *uri)
void SetPromptCacheFlag(Bool_t f)
AliCDBEntry * GetEntryFromSnapshot(const char *path)
void SetDefaultStorageFromRun(Int_t run)
static TString fgkCondUri
void RegisterFactory(AliCDBStorageFactory *factory)
AliCDBStorage * GetSpecificStorage(const char *calibType)
ULong64_t fKey
max UNIX timestamp for OCDB objects
AliCDBManager & operator=(const AliCDBManager &source)
void CreateMapListCopy(TMap &mapCopy, TList &listCopy) const
static AliCDBManager * fgInstance
void UnsetOCDBUploadMode()
virtual ~AliCDBStorageFactory()
void ExtractBaseFolder(TString &url)
Bool_t fCache
The run number.
Bool_t fPromptCache
The cache flag.
AliCDBParam * GetCondParam() const
Bool_t fSnapshotMode
Lock flag, if ON default storage and run number cannot be reset.
const char * GetMirrorSEs() const
AliCDBParam * CreateParameter(const char *dbString) const
void DumpToSnapshotFile(const char *snapshotFileName, Bool_t singleKeys) const
void PutActiveStorage(AliCDBParam *param, AliCDBStorage *storage)
AliCDBParam * fCondParam
pointer to drain storage
static TString fgkMCFullStorage
AliCDBStorage * fDrainStorage
pointer to default storage
void SetCacheFlag(Bool_t cacheFlag)
const TString & GetType() const
Bool_t IsDrainSet() const
Int_t GetEndRunLHCPeriod()
const TString & GetURI() const
const TList * GetRetrievedIds() const
AliCDBId * GetId(const AliCDBId &query)
void InitFromCache(TMap *entryCache, Int_t run)
TList * fShortLived
list of storages (to be streamed to file)
void PromptCacheEntry(const char *calibType, AliCDBEntry *entry)
void DestroyActiveStorages()
TString GetCvmfsOcdbTag() const
Bool_t Drain(AliCDBEntry *entry)
Bool_t IsShortLived(const char *path)
void CacheEntry(const char *path, AliCDBEntry *entry)
AliCDBEntry * Get(const AliCDBId &query, Bool_t forceCaching=kFALSE)
static TString fgkMCResidualStorage
static const char * GetDataTypeName(DataType type)
TMap fActiveStorages
list of registered storage factories
TList * GetActiveStorages()
void SetMaxDate(time_t maxDate)
AliCDBStorage * GetStorage(const char *dbString)
void SetSpecificStorage(const char *calibType, const char *dbString, Int_t version=-1, Int_t subVersion=-1)
TMap * fStorageMap
List of the retrieved object Id's (to be streamed to file)
const TMap * GetEntryCache() const
TFile * fSnapshotFile
flag saying if we are in snapshot mode
Bool_t GetCacheFlag() const
void UnsetDefaultStorage()
TList * GetAll(const AliCDBId &query)
Bool_t IsOCDBUploadMode() const
Bool_t HasStorage(const char *dbString) const
const TMap * GetStorageMap() const
TList * fIds
cache for in-memory objects to override objects on storage (to be used online)
TMap fSpecificStorages
list of active storages
AliCDBParam * GetRefParam() const
Bool_t SetOCDBUploadMode()
Bool_t fRaw
flag for uploads to Official CDBs (upload to cvmfs must follow upload to AliEn)
Bool_t Put(TObject *object, const AliCDBId &id, AliCDBMetaData *metaData, const char *mirrors="", DataType type=kPrivate)
void GetLHCPeriodAgainstAlienFile(Int_t run, TString &lhcPeriod, Int_t &startRun, Int_t &endRun)
void SetDrain(const char *dbString)
void UnloadFromCache(const char *path)
void SetDefaultStorage(const char *dbString)
void Print(Option_t *option="") const
Bool_t DiffObjects(const char *cdbFile1, const char *cdbFile2) const
Int_t GetStartRunLHCPeriod()
void SetType(const char *type)
void DumpToLightSnapshotFile(const char *lightSnapshotFileName) const
void AlienToCvmfsUri(TString &uriString) const
void DestroyActiveStorage(AliCDBStorage *storage)
const TMap * GetSnapshotMap() const
AliCDBStorage * GetDefaultStorage() const
static TString fgkMCIdealStorage
Bool_t InitFromSnapshot(const char *snapshotFileName, Bool_t overwrite=kTRUE)
ULong64_t SetLock(Bool_t lockFlag=kTRUE, ULong64_t key=0)
void SetMaxDate(TTimeStamp &maxDate)
time_t GetMaxDate() const
const char * GetURI(const char *path)
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
Bool_t IsDefaultStorageSet() const
void SetMirrorSEs(const char *mirrors)
AliCDBStorage * GetActiveStorage(const AliCDBParam *param)
TMap fEntryCache
list of detector-specific storages
TMap fPromptEntryCache
cache of the retrieved objects
Bool_t SetSnapshotMode(const char *snapshotFileName="OCDB.root")
void SetRaw(Bool_t rawFlag)
AliCDBParam * SelectSpecificStorage(const TString &path)
void GetLHCPeriodAgainstCvmfsFile(Int_t run, TString &lhcPeriod, Int_t &startRun, Int_t &endRun)
void ValidateCvmfsCase() const
Bool_t fLock
The prompt cache flag.
static TString fgkOCDBFolderXMLfile
AliCDBStorage * fDefaultStorage
List of short lived objects.
Bool_t GetPromptCacheFlag() const
const TList * GetSnapshotRetrievedIds() const