forked from alisw/AliRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCheckTimeRawData.C
32 lines (26 loc) · 869 Bytes
/
CheckTimeRawData.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
CheckTimeRawData(const Char_t *fileName, Int_t maxEv = kMaxInt)
{
AliTOFRawStream::ApplyBCCorrections(kTRUE);
gStyle->SetPalette(1);
TH2F *hCrateTime = new TH2F("hCrateTime", ";crate;time (ns)", 72, 0, 72, 2000, 0, 2000);
Float_t t;
Int_t nPhysEv = 0;
AliRawReaderRoot reader(fileName);
AliTOFRawStream tofs(&reader);
while (reader.NextEvent() && nPhysEv < maxEv) {
if (reader.GetType() != 7) continue;
if (nPhysEv % 100 == 0) printf("nPhysEv = %d\n", nPhysEv);
nPhysEv++;
for (Int_t i = 0; i < 72; i++) {
tofs.LoadRawData(i);
TClonesArray *array = tofs.GetRawData();
for (Int_t j = 0; j < array->GetEntries(); j++) {
AliTOFrawData *tofraw = (AliTOFrawData *)array->At(j);
// tofraw->Dump();
t = tofraw->GetLeading() * 24.4e-3; /* ns */
hCrateTime->Fill(i, t);
}
}
}
hCrateTime->Draw("colz");
}