]> git.uio.no Git - u/mrichter/AliRoot.git/blame - VZERO/CheckDelaysOCDB.C
Upsilon 8 TeV
[u/mrichter/AliRoot.git] / VZERO / CheckDelaysOCDB.C
CommitLineData
94d23f49 1void CheckDelaysOCDB(Int_t run)
2{
3 AliCDBManager *man = AliCDBManager::Instance();
4
5 man->SetDefaultStorage("raw://");
6 man->SetRun(run);
7
8 AliCDBEntry *ent = man->Get("VZERO/Calib/Data");
9 AliVZEROCalibData *calData = (AliVZEROCalibData*)ent->GetObject();
10
11 AliCDBEntry *ent1 = man->Get("VZERO/Calib/TimeDelays");
12 TH1F *delays = (TH1F*)ent1->GetObject();
13
14 TH1F *hitdelays = new TH1F("hitdelays","HitDelay values",64,-0.5,63.5);
15 hitdelays->SetLineColor(kRed);
16 TH1F *sumdelays = new TH1F("sumdelays","Sum of the delays and HitDelay values",64,-0.5,63.5);
17 sumdelays->SetLineColor(kGreen);
18
19 for(Int_t i = 0; i < 64; ++i) {
20 printf("Ch=%d delay=%.3f hitdelay=%.3f sum=%.3f\n",
21 i,
22 delays->GetBinContent(i+1),
23 calData->GetTimeOffset(i),
24 delays->GetBinContent(i+1)+calData->GetTimeOffset(i));
25 hitdelays->SetBinContent(i+1,calData->GetTimeOffset(i));
26 sumdelays->SetBinContent(i+1,delays->GetBinContent(i+1)+calData->GetTimeOffset(i));
27 }
28
29 new TCanvas;
30 delays->GetYaxis()->SetRangeUser(-10,10);
31 delays->Draw();
32 hitdelays->Draw("same");
33 sumdelays->Draw("same");
34}