Macro to check the calib OCDB object.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Nov 2011 09:24:41 +0000 (09:24 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Nov 2011 09:24:41 +0000 (09:24 +0000)
VZERO/CheckCalibOCDB.C [new file with mode: 0644]

diff --git a/VZERO/CheckCalibOCDB.C b/VZERO/CheckCalibOCDB.C
new file mode 100644 (file)
index 0000000..65c76fb
--- /dev/null
@@ -0,0 +1,19 @@
+void CheckCalibOCDB(Int_t run)
+{
+  AliCDBManager *man = AliCDBManager::Instance();
+
+  man->SetDefaultStorage("raw://");
+  man->SetRun(run);
+
+  AliCDBEntry *ent = man->Get("VZERO/Calib/Data");
+  AliVZEROCalibData *calData = (AliVZEROCalibData*)ent->GetObject();
+
+  for(Int_t pmNumber = 0; pmNumber < 64; ++pmNumber) {
+    printf("Ch=%d HV=%.1f MIP=%.2f Ped0=%.1f Ped1=%.1f Thr=%1.f\n",
+          pmNumber,
+          calData->GetMeanHV(pmNumber),
+          1./calData->GetMIPperADC(pmNumber),
+          calData->GetPedestal(pmNumber),calData->GetPedestal(pmNumber+64),
+          calData->GetDiscriThr(pmNumber));
+  }
+}