1 #ifndef ALIITSBEAMTESTDIGITIZER_H
2 #define ALIITSBEAMTESTDIGITIZER_H
4 ////////////////////////////////////////////////////
5 // Class to manage the //
6 // ITS beam test conversion from rawdata //
7 // to digits. It executes the digitization for //
8 // SPD, SDD and SSD. //
9 // Origin: E. Crescio crescio@to.infn.it //
10 // J. Conrad Jan.Conrad@cern.ch //
12 // The choice of the beam test period is by //
13 // deafult Nov04 (Integrated ITS beam test of //
14 // November 2004). To choose the SDD beam test //
15 // of August 2004 call the constructor: //
16 // AliITSBeamTestDigitizer("name","title","Aug04"//
18 ////////////////////////////////////////////////////
22 class AliITSBeamTestDigSDD;
23 class AliRawReaderDate;
26 class AliITSEventHeader;
27 class AliRawDataHeader;
30 class AliITSBeamTestDigitizer : public TTask {
34 AliITSBeamTestDigitizer();
35 AliITSBeamTestDigitizer(const Text_t* name,const Text_t* title,
36 const Char_t* opt="Nov04",const char* filename="galice.root");
37 AliITSBeamTestDigitizer(const Text_t* name,const Text_t* title,
38 Int_t run, const Char_t* opt="Nov04",const char* filename="galice.root");
39 AliITSBeamTestDigitizer(const AliITSBeamTestDigitizer& bt);
40 AliITSBeamTestDigitizer& operator=(const AliITSBeamTestDigitizer &source);
42 virtual ~AliITSBeamTestDigitizer();
44 void SetDigitsFileName(const TString& name) {fDigitsFileName=name;}
45 void SetRawdataFileName(const TString& name) {fRawdataFileName=name;}
46 void SetNumberOfEventsPerFile(Int_t nev);
48 void SetStartEventNumber(Int_t evin) {fEvIn=evin;}
49 void SetStopEventNumber(Int_t evfin) {fEvFin=evfin;}
50 void SetFlagHeader(Bool_t flag=kFALSE){fFlagHeader=flag;}
51 void SetFlagInit(Bool_t flag=kFALSE){fFlagInit=flag;}
52 void SelectEvents(Int_t eventtype) {fDATEEvType=eventtype;}
53 void SetBeamTestPeriod(BeamtestPeriod_t per=kNov04) {fPeriod=per;}
54 void SetRunNumber(Int_t run) {fRunNumber=run;}
55 void SetOptDate(Bool_t opt=kFALSE) {fOptDate=opt;}
57 void SetActive(const TString& subdet,Bool_t value);
59 void ExecDigitization();
60 void Init(const char* filename);
62 Int_t GetRunNumber() const {return fRunNumber;}
63 Bool_t GetFlagInit() const {return fFlagInit;}
64 Bool_t GetOptDate() const {return fOptDate;}
65 BeamtestPeriod_t GetBeamTestPeriod() const {return fPeriod;}
71 Int_t fEvIn; //starting event to be read
72 Int_t fEvFin; //last event to be read
73 Int_t fRunNumber; //run number
74 Int_t fDATEEvType; //date eventtype (JC)
76 Bool_t fFlagHeader; //flag for the hader
77 Bool_t fFlagInit; //flag for initialization
78 Bool_t fOptDate; //option for reading date format files
79 //(default: reads root files)
81 TString fDigitsFileName; //Digits file name
82 TString fRawdataFileName; //Raw data file name
83 BeamtestPeriod_t fPeriod; //Beam test period
85 AliRunLoader* fRunLoader; // Local pointer to run loader
86 AliITSLoader* fLoader; // Pointer to ITS loader
88 const AliRawDataHeader* fHeader; //!current data header
90 static const TString fgkDefaultDigitsFileName; // default name for dig. file
92 ClassDef(AliITSBeamTestDigitizer,3) // An Alice SDD beam test digitization class