]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
simple macro to read the trigger OCDB
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Sat, 25 Oct 2014 14:19:26 +0000 (16:19 +0200)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Sat, 25 Oct 2014 14:57:57 +0000 (16:57 +0200)
EMCAL/macros/DumpEMCalTriggerOCDB.C [new file with mode: 0644]

diff --git a/EMCAL/macros/DumpEMCalTriggerOCDB.C b/EMCAL/macros/DumpEMCalTriggerOCDB.C
new file mode 100644 (file)
index 0000000..fc9c4ed
--- /dev/null
@@ -0,0 +1,17 @@
+// Simple macro to access the information of the trigger
+// contained in the OCDB.
+// Input is the patch to an OCDB file in alien.
+
+void DumpEMCalTriggerOCDB(const char *ocdb_file = "")
+{
+  TGrid::Connect("alien://");
+  f = TFile::Open(Form("alien://%s",ocdb_file));
+  e = (AliCDBEntry*)f->Get("AliCDBEntry");
+  d = (AliEMCALTriggerDCSConfig*)e->GetObject();
+  c = (AliEMCALTriggerSTUDCSConfig*)d->GetSTUDCSConfig();
+
+  cout << "L1 fw version: " << c->GetFw() << endl;
+  cout << "L1-jet patch size: " << 2 + (c->GetFw() >> 16) << " sub-regions (4x4 FOR)" << endl;
+
+}
+