]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/scripts/ShowDigits.C
Added new library libFMDutil. This library contains utility classes that
[u/mrichter/AliRoot.git] / FMD / scripts / ShowDigits.C
1 //
2 // Script to digit multiplicity information to std::cout. 
3 //
4 #include <TH1F.h>
5 #include <AliFMDDigit.h>
6 #include <AliFMDInput.h>
7
8 class ShowDigits : public AliFMDInputDigits
9 {
10   TH1F* fHist;
11   Int_t det
12   ShowDigits(Int_t det, const char* file="galice.root") 
13     : AliFMDInputDigits(file), fDet(det)
14   {
15     fHist = new TH1F("digitData", "Digit Data", 128, 0, 1024);
16   }
17   Bool_t ProcessDigit(AliFMDDigit* digit) 
18   {
19     if (digit->Counts() > 12) digit->Print();
20     if (digit->Detector() == det) fHist->Fill(digit->Counts());
21     return kTRUE;
22   }
23   Bool_t Finish() 
24   {
25     fHist->Draw();
26     return kTRUE;
27   }
28 }
29 //____________________________________________________________________
30 //
31 // EOF
32 //