Minor changes
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Nov 2011 21:24:13 +0000 (21:24 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 10 Nov 2011 21:24:13 +0000 (21:24 +0000)
VZERO/CalculateHVs.C

index 5d30dd6..6f7f735 100644 (file)
@@ -1,19 +1,22 @@
-void CalculateHVs(Float_t requiredADCperMIP = 2.6, Int_t run = 137366)
+void CalculateHVs(Float_t requiredADCperMIP = 2.6, Int_t run = 137366, Bool_t specificStorage = kTRUE)
 {
   AliCDBManager *man = AliCDBManager::Instance();
   man->SetDefaultStorage("raw://");
-  man->SetSpecificStorage("VZERO/Calib/PMGains","local://$ALICE_ROOT/OCDB");
-  man->SetSpecificStorage("VZERO/Calib/LightYields","local://$ALICE_ROOT/OCDB");
+  if (specificStorage) {
+    man->SetSpecificStorage("VZERO/Calib/PMGains","local://$ALICE_ROOT/OCDB");
+    man->SetSpecificStorage("VZERO/Calib/LightYields","local://$ALICE_ROOT/OCDB");
+  }
   man->SetRun(run);
 
   AliCDBEntry *ent = man->Get("VZERO/Calib/Data");
   AliVZEROCalibData *calData = (AliVZEROCalibData*)ent->GetObject();
   for(Int_t i = 0; i < 64; ++i) {
-    printf("%d %.0f (%.0f) S%d R%d\n",
+    printf("%d %.0f (%.0f) S%d R%d     Delta=%.0f\n",
           i,
           calData->GetHV(i,requiredADCperMIP),
           calData->GetMeanHV(i),
           i%8,
-          (i<32) ? i/8 : (i-32)/8);
+          (i<32) ? i/8 : (i-32)/8,
+          calData->GetHV(i,requiredADCperMIP)-calData->GetMeanHV(i));
   }
 }