//_____________________________________________________________________________
AliCDBEntry* AliCDBStorage::Get(const AliCDBId& query) {
// get an AliCDBEntry object from the database
-
+
// check if query's path and runRange are valid
// query is invalid also if version is not specified and subversion is!
if (!query.IsValid()) {
return NULL;
}
- // query is not specified if path contains wildcard or runrange = [-1,-1]
+ // query is not specified if path contains wildcard or runrange = [-1,-1]
if (!query.IsSpecified()) {
- AliError(Form("Unspecified query: %s",
+ AliError(Form("Unspecified query: %s",
query.ToString().Data()));
return NULL;
}
AliDebug(2, Form("CDB object retrieved: %s", entry->GetId().ToString().Data()));
} else {
// this is to make the SHUTTLE output lighter
- if(!(query.GetPath().Contains("SHUTTLE/STATUS")))
- AliInfo(Form("No valid CDB object found! request was: %s", query.ToString().Data()));
+ if(!(query.GetPath().Contains("SHUTTLE/STATUS"))){
+
+ if(!(query.GetPath().Contains("SHUTTLE"))){
+ AliFatal(Form("No valid CDB object found! request was: %s", query.ToString().Data()));
+ }
+ else {
+ AliInfo(Form("No valid CDB object found! request was: %s", query.ToString().Data()));
+ }
+ }
}
// if drain storage is set, drain entry into drain storage
}
//_____________________________________________________________________________
-AliCDBEntry* AliCDBStorage::Get(const AliCDBPath& path, Int_t runNumber,
+AliCDBEntry* AliCDBStorage::Get(const AliCDBPath& path, Int_t runNumber,
Int_t version, Int_t subVersion) {
// get an AliCDBEntry object from the database
}
//_____________________________________________________________________________
-AliCDBEntry* AliCDBStorage::Get(const AliCDBPath& path,
+AliCDBEntry* AliCDBStorage::Get(const AliCDBPath& path,
const AliCDBRunRange& runRange, Int_t version,
Int_t subVersion) {
// get an AliCDBEntry object from the database
return GetAll(AliCDBId(path, runRange, version, subVersion));
}
+//_____________________________________________________________________________
+AliCDBId* AliCDBStorage::GetId(const AliCDBId& query) {
+// get the Id of the valid object from the database (does not open the file)
+
+ // 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 runrange = [-1,-1]
+ if (!query.IsSpecified()) {
+ AliError(Form("Unspecified query: %s",
+ query.ToString().Data()));
+ return NULL;
+ }
+
+ AliCDBId* id = GetEntryId(query);
+
+ return id;
+}
+
+//_____________________________________________________________________________
+AliCDBId* AliCDBStorage::GetId(const AliCDBPath& path, Int_t runNumber,
+ Int_t version, Int_t subVersion) {
+// get the Id of the valid object from the database (does not open the file)
+
+ return GetId(AliCDBId(path, runNumber, runNumber, version, subVersion));
+}
+
+//_____________________________________________________________________________
+AliCDBId* AliCDBStorage::GetId(const AliCDBPath& path,
+ const AliCDBRunRange& runRange, Int_t version,
+ Int_t subVersion) {
+// get the Id of the valid object from the database (does not open the file)
+
+ return GetId(AliCDBId(path, runRange, version, subVersion));
+}
//_____________________________________________________________________________
Bool_t AliCDBStorage::Put(TObject* object, AliCDBId& id, AliCDBMetaData* metaData, AliCDBManager::DataType type) {
// store an AliCDBEntry object into the database
+ if (object==0x0) {
+ AliError("Null Entry! No storage will be done!");
+ return kFALSE;
+ }
+
AliCDBEntry anEntry(object, id, metaData);
return Put(&anEntry, type);
return kFALSE;
}
+ if (entry->GetObject()==0x0){
+ AliError("No valid object in CDB entry!");
+ return kFALSE;
+ }
+
if (!entry->GetId().IsValid()) {
AliError(Form("Invalid entry ID: %s",
entry->GetId().ToString().Data()));
return 0;
}
- // set object's class name into metaData!
- entry->GetMetaData()->SetObjectClassName(entry->GetObject()->ClassName());
-
return PutEntry(entry);
}
if(md) fMetaDataFilter = dynamic_cast<AliCDBMetaData*> (md->Clone());
QueryValidFiles();
- AliCDBId queryId(pathFilter,run,run,version);
AliInfo(Form("%d valid files found!", fValidFileIds.GetEntriesFast()));
// Checks whether entry contains a TTree and in case loads it into memory
TObject *obj = (TObject*) entry->GetObject();
+ if (!obj) {
+ AliError("Cannot retrieve the object:");
+ entry->PrintMetaData();
+ return;
+ }
if (!strcmp(obj->ClassName(),TTree::Class_Name())) {