]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONDigitMaker.h
Fixing part of the Coding violation
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitMaker.h
1 #ifndef ALIMUONDIGITMAKER_H
2 #define ALIMUONDIGITMAKER_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /*$Id$*/
7
8 /// \ingroup base
9 /// \class AliMUONDigitMaker
10 /// \brief Reading Raw data class for trigger and tracker chambers
11 ///
12 //  Author: Ch, Finck
13
14 #include <TObject.h>
15
16 class TArrayS;
17
18 class AliRawReader;
19 class AliMUONLocalStruct;
20
21 class AliMUONVRawStreamTracker;
22 class AliMUONRawStreamTrigger;
23
24 class AliMUONVDigitStore;
25 class AliMUONVTriggerStore;
26
27 class AliMUONLogger;
28
29 class AliMUONDigitMaker : public TObject 
30 {
31  public:
32   AliMUONDigitMaker(Bool_t enableErrorLogger = kTRUE, Bool_t useFastDecoder = kFALSE); // Constructor
33   virtual ~AliMUONDigitMaker(void); // Destructor
34     
35   /// Code to indicate readout errors
36   enum ErrorCode
37   {
38     kOK=0,             ///< everything is OK 
39     kTrackerBAD=1<<1,  ///< tracker part had readout errors 
40     kTriggerBAD=1<<2   ///< trigger part had readout errors 
41   };
42   
43   // write raw data
44   Int_t  Raw2Digits(AliRawReader* rawReader, 
45                     AliMUONVDigitStore* digitContainer=0,
46                     AliMUONVTriggerStore* triggerStore=0);
47
48   Int_t  ReadTrackerDDL(AliRawReader* rawReader);
49   Int_t  ReadTriggerDDL(AliRawReader* rawReader);
50   
51   Int_t TriggerDigits(Int_t nBoard, TArrayS* xyPattern, 
52                       AliMUONVDigitStore& digitStore) const;
53
54         /// Set flag to generates scaler event
55   void  SetScalerEvent() { fScalerEvent = kTRUE; }
56
57         /// Set flag whether or not we should generate digits for the trigger
58   void  SetMakeTriggerDigits(Bool_t flag = kFALSE) { fMakeTriggerDigits = flag; }
59
60   void  SetFastDecoder(Bool_t useFastDecoder); 
61
62   void Print(Option_t* opt="") const;
63
64 private:
65     
66   /// Not implemented
67   AliMUONDigitMaker (const AliMUONDigitMaker& rhs); // copy constructor
68   /// Not implemented
69   AliMUONDigitMaker& operator=(const AliMUONDigitMaker& rhs); // assignment operator
70
71 private:
72   void CreateRawStreamTracker(Bool_t useFastDecoder);
73
74   Bool_t fScalerEvent;       //!< flag to generates scaler event
75   Bool_t fMakeTriggerDigits; //!< whether or not we should generate digits for the trigger
76   
77   AliMUONVRawStreamTracker* fRawStreamTracker; //!< pointer of raw stream for tracker
78   AliMUONRawStreamTrigger* fRawStreamTrigger;  //!< pointer of raw stream for trigger
79
80   AliMUONVDigitStore* fDigitStore; //!< not owner
81   AliMUONVTriggerStore* fTriggerStore; //!< not owner
82
83   AliMUONLogger* fLogger; //!< to log messages
84   
85   ClassDef(AliMUONDigitMaker,6) // MUON digit maker from rawdata
86 };
87         
88 #endif