|
4 | 4 | #include "TOFBase/CalibTOFapi.h" |
5 | 5 | #endif |
6 | 6 |
|
7 | | -void checkDRMobj_tof(const char* fname="ccdb.root"){ |
8 | | - TFile *f = new TFile(fname); |
| 7 | +void checkDRMobj_tof(const char* fname = "ccdb.root") |
| 8 | +{ |
| 9 | + TFile* f = new TFile(fname); |
9 | 10 |
|
10 | | - TH2F *hErrors = new TH2F("hDRMerrors",";error code; frequency",30,0,30,72,0,72); |
| 11 | + TH2F* hErrors = new TH2F("hDRMerrors", ";error code; frequency", 30, 0, 30, 72, 0, 72); |
11 | 12 |
|
12 | | - o2::tof::Diagnostic* drmDia = (o2::tof::Diagnostic *) f->Get("ccdb_object"); |
| 13 | + o2::tof::Diagnostic* drmDia = (o2::tof::Diagnostic*)f->Get("ccdb_object"); |
13 | 14 |
|
14 | | - for(int j=1; j<=72;j++){ |
15 | | - uint32_t patternRDH = o2::tof::Diagnostic::getDRMKey(j-1); |
16 | | - for(int i=1; i<=hErrors->GetXaxis()->GetNbins();i++){ |
17 | | - uint32_t pattern = o2::tof::Diagnostic::getDRMerrorKey(j-1, i-1); |
18 | | - if(drmDia->getFrequency(patternRDH)){ |
19 | | - hErrors->SetBinContent(i,j,drmDia->getFrequency(pattern)*1./drmDia->getFrequency(patternRDH)); |
| 15 | + for (int j = 1; j <= 72; j++) { |
| 16 | + uint32_t patternRDH = o2::tof::Diagnostic::getDRMKey(j - 1); |
| 17 | + for (int i = 1; i <= hErrors->GetXaxis()->GetNbins(); i++) { |
| 18 | + uint32_t pattern = o2::tof::Diagnostic::getDRMerrorKey(j - 1, i - 1); |
| 19 | + if (drmDia->getFrequency(patternRDH)) { |
| 20 | + hErrors->SetBinContent(i, j, drmDia->getFrequency(pattern) * 1. / drmDia->getFrequency(patternRDH)); |
20 | 21 | } |
21 | 22 | } |
22 | 23 | } |
23 | 24 |
|
24 | | - TCanvas *c = new TCanvas(); |
| 25 | + TCanvas* c = new TCanvas(); |
25 | 26 | c->cd(1); |
26 | 27 | hErrors->Draw("colz"); |
27 | 28 |
|
28 | 29 | drmDia->print(true); |
29 | | - |
30 | 30 | } |
0 commit comments