New OCDB entry containing the list of cosmic triggers defined by the trigger coordina...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Jun 2009 16:05:06 +0000 (16:05 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 30 Jun 2009 16:05:06 +0000 (16:05 +0000)
GRP/CosmicTriggers.txt [new file with mode: 0644]
GRP/MakeCosmicTriggersEntry.C [new file with mode: 0644]
OCDB/GRP/Calib/CosmicTriggers/Run0_999999999_v0_s0.root [new file with mode: 0644]

diff --git a/GRP/CosmicTriggers.txt b/GRP/CosmicTriggers.txt
new file mode 100644 (file)
index 0000000..b427b5f
--- /dev/null
@@ -0,0 +1,15 @@
+# ttriggers used in 2008
+# even if they didn't follow the naming convention
+# one still wants to be able to reconstruction these
+# data correctly
+D0SCO
+C0SCO
+D0ASL
+C0ASL
+DEMPTY
+CEMPTY
+TRDBYTOF
+TOFTRD
+
+# Here is trigger classes list following the trigger
+# naming conventions
diff --git a/GRP/MakeCosmicTriggersEntry.C b/GRP/MakeCosmicTriggersEntry.C
new file mode 100644 (file)
index 0000000..d0981b5
--- /dev/null
@@ -0,0 +1,62 @@
+Bool_t MakeCosmicTriggersEntry(const char *fileName)
+{
+  const char* macroname = "MakeCosmicTriggersEntry.C";
+
+  if (gSystem->AccessPathName(fileName)) {
+    Error(macroname,Form("file (%s) not found", fileName));
+    return kFALSE;
+  }
+
+  ifstream *file = new ifstream(fileName);
+  if (!*file) {
+    Error(macroname,Form("Error opening file (%s) !",fileName));
+    file->close();
+    delete file;
+    return kFALSE;
+  }
+
+  THashTable *table = new THashTable();
+  table->SetName("List of defined cosmic triggers");
+
+  TString strLine;
+  while (strLine.ReadLine(*file)) {
+
+    if (strLine.BeginsWith("#")) continue;
+
+    strLine.ReplaceAll(" ","");
+    strLine.ReplaceAll("\t","");
+    if (strLine.IsNull()) continue;
+
+    TObjString *obj = new TObjString(strLine.Data());
+    table->Add(obj);
+  }
+
+  file->close();
+  delete file;
+
+
+  // save in CDB storage
+  TString Storage = gSystem->Getenv("STORAGE");
+  if(!Storage.BeginsWith("local://") && !Storage.BeginsWith("alien://")) {
+    Error(macroname,"STORAGE variable set to %s is not valid. Exiting\n",Storage.Data());
+    return;
+  }
+  Info(macroname,"Saving alignment objects in CDB storage %s",Storage.Data());
+  AliCDBManager* cdb = AliCDBManager::Instance();
+  AliCDBStorage* storage = cdb->GetStorage(Storage.Data());
+  if(!storage){
+    Error(macroname,"Unable to open storage %s\n",Storage.Data());
+    return;
+  }
+  AliCDBMetaData* md = new AliCDBMetaData();
+  md->SetResponsible("Federico Antinori");
+  md->SetComment("List of the defined cosmic triggers. It is used in order to steer the reconstruction, namely in the selection of the proper event specie. It is maintained and updated by the trigger coordinator.");
+  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
+  AliCDBId id("GRP/Calib/CosmicTriggers",0,AliCDBRunRange::Infinity());
+  storage->Put(table,id,md);
+
+  table->Delete();
+  delete table;
+
+  return kTRUE;
+}
diff --git a/OCDB/GRP/Calib/CosmicTriggers/Run0_999999999_v0_s0.root b/OCDB/GRP/Calib/CosmicTriggers/Run0_999999999_v0_s0.root
new file mode 100644 (file)
index 0000000..6942cf3
Binary files /dev/null and b/OCDB/GRP/Calib/CosmicTriggers/Run0_999999999_v0_s0.root differ