]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/exa/makeComponentConfigurationObject.C
using AliCDBRunRange::Infinity() instead of number
[u/mrichter/AliRoot.git] / HLT / exa / makeComponentConfigurationObject.C
index 09f5e4365cc1efc1310a9147473146a2d9c0b624..9ca049a4a88618e8a0d22f69a07f5bb0d15f50c2 100644 (file)
@@ -36,7 +36,7 @@ void makeComponentConfigurationObject(const char* path,
                                      const char* param,
                                      const char* cdbUri,
                                      int runmin=0,
-                                     int runmax=999999999,
+                                     int runmax=AliCDBRunRange::Infinity(),
                                      int runNo=0)
 {
   AliCDBManager* man = AliCDBManager::Instance();
@@ -85,16 +85,18 @@ void makeComponentConfigurationObject(const char* path,
 
   AliCDBPath cdbPath(path);
   AliCDBId cdbId(cdbPath, runmin, runmax);
-  AliCDBMetaData* cdbMetaData=pExisting?pExisting->GetMetaData():(new AliCDBMetaData);
+  AliCDBMetaData* cdbMetaData=NULL;
+  if (pExisting) cdbMetaData=pExisting->GetMetaData();
+  else cdbMetaData=new AliCDBMetaData;
   man->Put(obj, cdbId, cdbMetaData);
 }
 
 void makeComponentConfigurationObject(const char* path, const char* param="",
                                      const char* cdbUri=NULL,
                                      int runmin=0,
-                                     int runmax=999999999)
+                                     int runmax=AliCDBRunRange::Infinity())
 {
-  makeComponentConfigurationObject(path, param, NULL, cdbUri, runmin, runmax);
+  makeComponentConfigurationObject(path, NULL, param, cdbUri, runmin, runmax);
 }
 
 void makeComponentConfigurationObject(const char* path, 
@@ -102,7 +104,7 @@ void makeComponentConfigurationObject(const char* path,
                                      const char* key,
                                      const char* param)
 {
-  makeComponentConfigurationObject(path, key, param, NULL, 0, 999999999, runNo);
+  makeComponentConfigurationObject(path, key, param, NULL, 0, AliCDBRunRange::Infinity(), runNo);
 }
 
 void makeComponentConfigurationObject()
@@ -113,13 +115,13 @@ void makeComponentConfigurationObject()
   cout << "  param (opt)    string to be stored in the TObjSting, default empty" << endl;
   cout << "  uri   (opt)    the OCDB URI, default $ALICE_ROOT/OCDB   " << endl;
   cout << "  rangemin (opt) default 0" << endl;
-  cout << "  rangemax (opt) default 999999999" << endl;
+  cout << "  rangemax (opt) default AliCDBRunRange::Infinity()" << endl;
   cout << "===============================================================" << endl;
   cout << "usage: aliroot -b -q -l makeComponentConfigurationObject.C'(\"path\", \"key\", \"param\", \"uri\", rangemin, rangemax)'" << endl << endl;
   cout << "  path           path of the entry within the OCDB" << endl;
   cout << "  param (opt)    string to be stored in the TObjSting, default empty" << endl;
   cout << "  uri   (opt)    the OCDB URI, default $ALICE_ROOT/OCDB   " << endl;
   cout << "  rangemin (opt) default 0" << endl;
-  cout << "  rangemax (opt) default 999999999" << endl;
+  cout << "  rangemax (opt) default AliCDBRunRange::Infinity()" << endl;
   cout << "===============================================================" << endl;
 }