Move from the DAQ SOR/EOR time-stamps to the CTP ones. Should prevent the problem...
[u/mrichter/AliRoot.git] / VZERO / CalculateHVs.C
1 void CalculateHVs(Float_t requiredADCperMIP = 2.6, Int_t run = 137366, Bool_t specificStorage = kTRUE)
2 {
3   AliCDBManager *man = AliCDBManager::Instance();
4   man->SetDefaultStorage("raw://");
5   if (specificStorage) {
6     man->SetSpecificStorage("VZERO/Calib/PMGains","local://$ALICE_ROOT/OCDB");
7     man->SetSpecificStorage("VZERO/Calib/LightYields","local://$ALICE_ROOT/OCDB");
8   }
9   man->SetRun(run);
10
11   AliCDBEntry *ent = man->Get("VZERO/Calib/Data");
12   AliVZEROCalibData *calData = (AliVZEROCalibData*)ent->GetObject();
13   for(Int_t i = 0; i < 64; ++i) {
14     printf("%d %.0f (%.0f) S%d R%d     Delta=%.0f\n",
15            i,
16            calData->GetHV(i,requiredADCperMIP),
17            calData->GetMeanHV(i),
18            i%8,
19            (i<32) ? i/8 : (i-32)/8,
20            calData->GetHV(i,requiredADCperMIP)-calData->GetMeanHV(i));
21   }
22 }