]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSBeamTestDigitizer.h
29-apr-2005 Library creation scripts for Linux gcc etc... introduced.
[u/mrichter/AliRoot.git] / ITS / AliITSBeamTestDigitizer.h
1 #ifndef ALIITSBEAMTESTDIGITIZER_H
2 #define ALIITSBEAMTESTDIGITIZER_H
3
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        //
11 //                                                //
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"//
17 //                                                //
18 ////////////////////////////////////////////////////
19 #include <TTask.h>
20
21
22 class AliITSBeamTestDigSDD;
23 class AliRawReaderDate;
24 class AliRunLoader;
25 class AliITSLoader;
26 class AliITS;
27 class AliITSEventHeader;
28 class AliRawDataHeader;
29
30
31 class AliITSBeamTestDigitizer : public TTask {
32  
33  public:
34  
35   AliITSBeamTestDigitizer(); 
36   AliITSBeamTestDigitizer(const Text_t* name,const Text_t* title, 
37                           Char_t* opt="Nov04");
38   AliITSBeamTestDigitizer(const Text_t* name,const Text_t* title, 
39                           Int_t run,Char_t* opt="Nov04");
40   AliITSBeamTestDigitizer(const char* filename);
41   AliITSBeamTestDigitizer(const AliITSBeamTestDigitizer& bt);
42   AliITSBeamTestDigitizer& operator=(const AliITSBeamTestDigitizer &source);
43
44   virtual ~AliITSBeamTestDigitizer();
45
46   void SetDigitsFileName(const TString& name)     {fDigitsFileName=name;}
47   void SetRawdataFileName(const TString& name) {fRawdataFileName=name;}
48   void SetNumberOfEventsPerFile(Int_t nev); 
49
50   void SetStartEventNumber(Int_t evin) {fEvIn=evin;}
51   void SetStopEventNumber(Int_t evfin) {fEvFin=evfin;}
52   void SetFlagHeader(Bool_t flag=kFALSE){fFlagHeader=flag;}
53   void SetFlagInit(Bool_t flag=kFALSE){fFlagInit=flag;}
54   void SelectEvents(Int_t eventtype) {fDATEEvType=eventtype;}
55   void SetBeamTestPeriod(BeamtestPeriod_t per=kNov04) {fPeriod=per;}
56   void SetRunNumber(Int_t run) {fRunNumber=run;}
57
58   void SetBeamTestGeometry(AliITS* bt){fBt=bt;}
59
60   void SetActive(const TString& subdet,Bool_t value);
61
62   void ExecDigitization();
63   void Init();
64  
65   Int_t GetRunNumber()  const {return fRunNumber;}
66   Bool_t GetFlagInit()  const {return fFlagInit;}
67   BeamtestPeriod_t GetBeamTestPeriod() const {return fPeriod;}
68   AliITS* GetBeamTestGeometry() const {return fBt;}
69
70  protected:
71
72
73   Int_t    fEvIn;                   //starting event to be read
74   Int_t    fEvFin;                  //last event to be read
75   Int_t    fRunNumber;              //run number 
76   Int_t    fDATEEvType;             //date eventtype (JC) 
77
78   Bool_t   fFlagHeader;             //flag for the hader 
79   Bool_t   fFlagInit;               //flag for initialization
80
81   TString  fDigitsFileName;         //Digits file name
82   TString  fRawdataFileName;        //Raw data file name
83   BeamtestPeriod_t  fPeriod;                 //Beam test period
84
85   AliITS*     fBt;                  //! Local pointer to ITS geometry.
86   
87   AliRunLoader* fRunLoader;         // Local pointer to run loader
88   AliITSLoader* fLoader;            // Pointer to ITS loader
89
90   const AliRawDataHeader* fHeader;  //!current data header
91
92   static const TString fgkDefaultDigitsFileName; // default name for dig. file  
93
94   ClassDef(AliITSBeamTestDigitizer,1)  // An Alice SDD beam test digitization class 
95
96   };
97
98
99 #endif
100
101