add missing headers
[u/mrichter/AliRoot.git] / PHOS / PHOSrec / AliPHOSCpvRawDigiProducer.h
CommitLineData
0d931d35 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
18class AliPHOSDigit ;
19class AliPHOSCpvRawStream;
20
21class AliPHOSCpvRawDigiProducer: public TObject {
22
23public:
24
25 AliPHOSCpvRawDigiProducer() ;
26 AliPHOSCpvRawDigiProducer(AliRawReader *& rawReader); // creates an AliPHOSCpvRawStream(rawReader) object to read data
27
28 virtual ~AliPHOSCpvRawDigiProducer();
29
30 Bool_t LoadPedFiles(); //returns true if ok. Must be called when you process a phys run
31 //If ped files are loaded, then MakeDigits returns digits with
32 //substruct pedestals from ADCs
33
34 Bool_t LoadNewEvent(AliRawReader *& rawReader); // returns true, if ok
35 void SetTurbo(Bool_t turbo); // if turbo==true then do read without error checking
36 Bool_t GetTurbo() const {return fTurbo;}
37
38 void MakeDigits(TClonesArray *& digits) const; // digits is an array of AliPHOSCpvPHOSDigit objects
39 TH1I * GetErrorsHist() const { return fhErrors; } // takes histogram of errors from AliPHOSCpvRawStream
40
41 void SetCpvMinAmp(Int_t cpvMin) { fCpvMinE=cpvMin; } // thresholds would be ped + fCpvMinE
42
43protected:
44 void CreateErrHist(); // initialize histogram of errors
45private:
46 Bool_t fTurbo; // if true, then read without error checking
47 Int_t fCpvMinE ; // minimum energy of digit (ADC)
48 AliPHOSCpvRawStream * fRawStream; //! Raw data stream
49
50 TH1I * fhErrors; // ! histogram of errors
51
52 Int_t ** ped[2][AliPHOSCpvParam::kNDDL]; // pedestals ped[0][iddl][x][y] = pedestal; ped[1][iddl][x][y] = N*sigma (N was used while creating ped files)
53 Bool_t fPedFilesRLoaded;
54
55 ClassDef(AliPHOSCpvRawDigiProducer,1);
56};
57
58#endif