+
+}
+
+//_____________________________________________________________________________
+const char* AliCDBManager::GetURI(const char* path) {
+// return the URI of the storage where to look for path
+
+ if(!IsDefaultStorageSet()) return 0;
+
+ AliCDBParam *aPar=SelectSpecificStorage(path);
+
+ if(aPar) {
+ return aPar->GetURI().Data();
+
+ } else {
+ return GetDefaultStorage()->GetURI().Data();
+ }
+
+ return 0;
+}
+
+//_____________________________________________________________________________
+AliCDBId* AliCDBManager::GetId(const AliCDBPath& path, Int_t runNumber,
+ Int_t version, Int_t subVersion) {
+// get the AliCDBId of the valid object from the database (does not retrieve the object)
+// User must delete returned object!
+
+ if(runNumber < 0){
+ // RunNumber is not specified. Try with fRun
+ if (fRun < 0){
+ AliError("Run number neither specified in query nor set in AliCDBManager! Use AliCDBManager::SetRun.");
+ return NULL;
+ }
+ runNumber = fRun;
+ }
+
+ return GetId(AliCDBId(path, runNumber, runNumber, version, subVersion));
+}
+
+//_____________________________________________________________________________
+AliCDBId* AliCDBManager::GetId(const AliCDBPath& path,
+ const AliCDBRunRange& runRange, Int_t version,
+ Int_t subVersion) {
+// get the AliCDBId of the valid object from the database (does not retrieve the object)
+// User must delete returned object!
+
+ return GetId(AliCDBId(path, runRange, version, subVersion));
+}
+
+//_____________________________________________________________________________
+AliCDBId* AliCDBManager::GetId(const AliCDBId& query) {
+// get the AliCDBId of the valid object from the database (does not retrieve the object)
+// User must delete returned object!
+
+ if(!fDefaultStorage) {
+ AliError("No storage set!");
+ return NULL;
+ }
+
+ // check if query's path and runRange are valid
+ // query is invalid also if version is not specified and subversion is!
+ if (!query.IsValid()) {
+ AliError(Form("Invalid query: %s", query.ToString().Data()));
+ return NULL;
+ }
+
+ // query is not specified if path contains wildcard or run range= [-1,-1]
+ if (!query.IsSpecified()) {
+ AliError(Form("Unspecified query: %s",
+ query.ToString().Data()));
+ return NULL;
+ }
+
+ if(fCache && query.GetFirstRun() != fRun)
+ AliWarning("Run number explicitly set in query: CDB cache temporarily disabled!");
+
+ AliCDBEntry* entry = 0;
+
+ // first look into map of cached objects
+ if(fCache && query.GetFirstRun() == fRun)
+ entry = (AliCDBEntry*) fEntryCache.GetValue(query.GetPath());
+
+ if(entry) {
+ AliDebug(2, Form("Object %s retrieved from cache !!",query.GetPath().Data()));
+ return dynamic_cast<AliCDBId*> (entry->GetId().Clone());
+ }
+
+ // Entry is not in cache -> retrieve it from CDB and cache it!!
+ AliCDBStorage *aStorage=0;
+ AliCDBParam *aPar=SelectSpecificStorage(query.GetPath());
+
+ if(aPar) {
+ aStorage=GetStorage(aPar);
+ TString str = aPar->GetURI();
+ AliDebug(2,Form("Looking into storage: %s",str.Data()));