]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TOF/CheckTimeRawData.C
added the possibility to manage the trigger time window
[u/mrichter/AliRoot.git] / TOF / CheckTimeRawData.C
CommitLineData
3035943c 1CheckTimeRawData(const Char_t *fileName, Int_t maxEv = kMaxInt)
2{
3
4 AliTOFRawStream::ApplyBCCorrections(kTRUE);
5
6 gStyle->SetPalette(1);
7
8 TH2F *hCrateTime = new TH2F("hCrateTime", ";crate;time (ns)", 72, 0, 72, 2000, 0, 2000);
9 Float_t t;
10 Int_t nPhysEv = 0;
11
12 AliRawReaderRoot reader(fileName);
13 AliTOFRawStream tofs(&reader);
14 while (reader.NextEvent() && nPhysEv < maxEv) {
15 if (reader.GetType() != 7) continue;
16 if (nPhysEv % 100 == 0) printf("nPhysEv = %d\n", nPhysEv);
17 nPhysEv++;
18 for (Int_t i = 0; i < 72; i++) {
19 tofs.LoadRawData(i);
20 TClonesArray *array = tofs.GetRawData();
21 for (Int_t j = 0; j < array->GetEntries(); j++) {
22 AliTOFrawData *tofraw = (AliTOFrawData *)array->At(j);
23 // tofraw->Dump();
24 t = tofraw->GetLeading() * 24.4e-3; /* ns */
25 hCrateTime->Fill(i, t);
26 }
27 }
28 }
29
30 hCrateTime->Draw("colz");
31
32}