Update timestamps for new AMANDA simulation (17/02/2015)
[u/mrichter/AliRoot.git] / VZERO / CalculateHVs.C
CommitLineData
1e7b87f8 1void CalculateHVs(Float_t requiredADCperMIP = 2.6, Int_t run = 137366, Bool_t specificStorage = kTRUE)
3aa47a8e 2{
3 AliCDBManager *man = AliCDBManager::Instance();
4 man->SetDefaultStorage("raw://");
1e7b87f8 5 if (specificStorage) {
6 man->SetSpecificStorage("VZERO/Calib/PMGains","local://$ALICE_ROOT/OCDB");
7 man->SetSpecificStorage("VZERO/Calib/LightYields","local://$ALICE_ROOT/OCDB");
8 }
3aa47a8e 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) {
1e7b87f8 14 printf("%d %.0f (%.0f) S%d R%d Delta=%.0f\n",
3aa47a8e 15 i,
16 calData->GetHV(i,requiredADCperMIP),
17 calData->GetMeanHV(i),
18 i%8,
1e7b87f8 19 (i<32) ? i/8 : (i-32)/8,
20 calData->GetHV(i,requiredADCperMIP)-calData->GetMeanHV(i));
3aa47a8e 21 }
22}