]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
updated documentation, using AliCDBRunRange::Infinity for consistency reasons; moved...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 18 Sep 2011 12:31:53 +0000 (12:31 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 18 Sep 2011 12:31:53 +0000 (12:31 +0000)
HLT/programs/adjustOCDBObject.C [moved from HLT/exa/adjustOCDBObject.C with 59% similarity]

similarity index 59%
rename from HLT/exa/adjustOCDBObject.C
rename to HLT/programs/adjustOCDBObject.C
index 5b26725db6d6bc72aa3737250718460e89c576ff..9ed1b2296f80eede763424d248adb3427fec46c0 100644 (file)
  * of the entry and uses the CDBmanager to write it back to some new
  * location.
  *
+ * Required parameters:
+ * - filename
+ * - OCDB target
+ * Optional parameters, if the default values are specified the
+ * corresponding key in the entry is not changed
+ * - first run
+ * - last run, if smaller than first run 'AliCDBRunRange::Infinity' is used
+ * - version
+ * - subversion
+ * - comment
+ * - responsible
+ * - aliroot version 
+ *
  * @author Matthias.Richter@ift.uib.no
  * @ingroup alihlt_tutorial
  */
@@ -50,6 +63,7 @@ void adjustOCDBObject(const char* file,
   if (subversion>=0) cdbId.SetSubVersion(subversion);
   if (firstrun>=0) cdbId.SetFirstRun(firstrun);
   if (lastrun>=0) cdbId.SetLastRun(lastrun);
+  if (lastrun<firstrun) cdbId.SetLastRun(AliCDBRunRange::Infinity());
 
   AliCDBMetaData* meta=cdbEntry->GetMetaData();
   if (comment) meta->SetComment(comment);
@@ -61,3 +75,20 @@ void adjustOCDBObject(const char* file,
   man->Put(cdbEntry);
 
 }
+
+void adjustOCDBObject() 
+{
+  cout << "adjustOCDBObject.C   adjust properties of an OCDB entry" << endl;
+  cout << "usage:" << endl;
+  cout << "   aliroot -b -q adjustOCDBObject'(\"file\", " << endl;
+  cout << "                                  targetCDB=\"local://$PWD\", " << endl;
+  cout << "                                  firstrun=-1, " << endl;
+  cout << "                                  lastrun=-1, " << endl;
+  cout << "                                  version=-1, " << endl;
+  cout << "                                  subversion=-1, " << endl;
+  cout << "                                  comment=NULL, " << endl;
+  cout << "                                  responsible=NULL, " << endl;
+  cout << "                                  alirootv=NULL)'  " << endl;
+  cout << " e.g." << endl;
+  cout << "   aliroot -b -q adjustOCDBObject'(\"myfile.root\", \"$ALICE_ROOT/OCDB\", 42, 42)'" << endl;
+}