]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PHOS/PHOSbase/AliPHOSCpvRawDigiProducer.h
PHOS/DA/CMakeLists.txt
[u/mrichter/AliRoot.git] / PHOS / PHOSbase / AliPHOSCpvRawDigiProducer.h
1 #ifndef ALIPHOSCPVRAWDIGIPRODUCER_H
2 #define ALIPHOSCPVRAWDIGIPRODUCER_H
3
4 // This class produces CPV digits from raw data stream of one event
5 // Raw data is supplied by the object AliRawReader,
6 // then AliPHOSCpvRawDigiProducer decodes CPV data and converts is to AliPHOSDigits.
7 //!
8 // Author: Mikhail Stolpovskiy, mikhail.stolpovskiy@cern.ch
9 // modified by Sergey.Evdokimov@cern.ch 30 July 2014
10
11 #include "TObject.h"
12 #include "TH1I.h"
13
14 #include "AliAltroMapping.h"
15 #include "AliRawReaderDate.h"
16 #include "AliPHOSCpvParam.h"
17
18 class AliPHOSCpvRawStream;
19 class AliPHOSDigit ;
20 class AliPHOSGeometry ;
21
22 class AliPHOSCpvRawDigiProducer: public TObject {
23
24 public:
25
26   AliPHOSCpvRawDigiProducer() ;
27   AliPHOSCpvRawDigiProducer(AliRawReader * rawReader); // creates an AliPHOSCpvRawStream(rawReader) object to read data
28  
29   virtual ~AliPHOSCpvRawDigiProducer(); 
30
31   Bool_t LoadPedFiles(); //returns true if ok. Must be called when you process a phys run
32                          //If ped files are loaded, then MakeDigits returns digits with 
33                          //substruct pedestals from ADCs
34
35   Bool_t LoadNewEvent(AliRawReader * rawReader); // returns true, if ok
36   void   SetTurbo(Bool_t turbo);                 // if turbo==true then do read without error checking
37   Bool_t GetTurbo() const {return fTurbo;}
38
39   void   MakeDigits(TClonesArray * digits) const;   // digits is an array of AliPHOSCpvPHOSDigit objects
40   TH1I * GetErrorsHist() const { return fhErrors; } // takes histogram of errors from AliPHOSCpvRawStream
41
42   void   SetCpvMinAmp(Int_t cpvMin) { fCpvMinE=cpvMin; } // thresholds would be ped + fCpvMinE
43
44 protected:
45   void CreateErrHist();             // initialize histogram of errors
46 private:
47   AliPHOSGeometry * fGeom ;         //! PHOS geometry
48   Bool_t fTurbo;                    // if true, then read without error checking
49   Int_t  fCpvMinE ;                 // minimum energy of digit (ADC)
50   AliPHOSCpvRawStream * fRawStream; //! Raw data stream 
51
52   TH1I * fhErrors;         // ! histogram of errors
53
54   Int_t ** fPed[2][2*AliPHOSCpvParam::kNDDL]; // pedestals    ped[0][iddl][x][y] = pedestal; ped[1][iddl][x][y] = N*sigma (N was used while creating ped files)
55   Bool_t fPedFilesRLoaded;
56
57   ClassDef(AliPHOSCpvRawDigiProducer,2);
58 };
59
60 #endif