]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTrackerCalibratedDataMaker.h
Moving classes from graphics to rec
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerCalibratedDataMaker.h
1 #ifndef ALIMUONTRACKERCALIBRATEDDATAMAKER_H
2 #define ALIMUONTRACKERCALIBRATEDDATAMAKER_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice                               */
6
7 // $Id$
8
9 /// \ingroup rec
10 /// \class AliMUONTrackerCalibratedDataMaker
11 /// \brief Creator of calibrated AliMUONVTrackerData from AliRawReader
12 /// 
13 // Author Laurent Aphecetche, Subatech
14
15 #ifndef ALIMUONVTRACKERDATAMAKER_H
16 #  include "AliMUONVTrackerDataMaker.h"
17 #endif
18 #ifndef ROOT_TString
19 #  include "TString.h"
20 #endif
21
22 class AliRawReader;
23 class AliMUONCalibrationData;
24 class AliMUONDigitCalibrator;
25 class AliMUONDigitMaker;
26 class AliMUONVTrackerData;
27 class AliMUONVStore;
28 class AliMUONVDigitStore;
29
30 class AliMUONTrackerCalibratedDataMaker : public AliMUONVTrackerDataMaker
31 {
32 public:
33
34   AliMUONTrackerCalibratedDataMaker(TRootIOCtor* ioCtor);
35   
36   AliMUONTrackerCalibratedDataMaker(Int_t runNumber,
37                                     AliRawReader* reader, 
38                                     const char* cdbpath=0x0,
39                                     const char* calibMode=0x0,
40                                     Bool_t histogram=kFALSE,
41                                     Double_t xmin=0.0,
42                                     Double_t xmax=4096.0,
43                                     Bool_t useHPdecoder=kTRUE);
44   
45   AliMUONTrackerCalibratedDataMaker(AliRawReader* reader = 0x0, 
46                                     const char* cdbpath=0x0,
47                                     const char* calibMode=0x0,
48                                     Bool_t histogram=kFALSE,
49                                     Double_t xmin=0.0,
50                                     Double_t xmax=4096.0,
51                                     Bool_t useHPdecoder=kTRUE);
52
53   virtual ~AliMUONTrackerCalibratedDataMaker();
54   
55   /// Whether we have a valid raw reader
56   Bool_t IsValid() const { return fRawReader != 0x0; }
57   
58   /// Our data
59   AliMUONVTrackerData* Data() const { return fAccumulatedData; }
60   
61   /// We can be run
62   virtual Bool_t IsRunnable() const { return kTRUE; }
63   
64   /// Whether we are running or not
65   virtual Bool_t IsRunning() const { return fIsRunning; }
66   
67   /// Set the running status
68   virtual void SetRunning(Bool_t flag) { fIsRunning = flag; }
69   
70         Bool_t ProcessEvent();
71         
72   Bool_t NextEvent();
73   
74   void Print(Option_t* opt="") const;
75   
76   void Rewind();
77   
78   /// Get our source URI
79   virtual TString Source() const { return fSource.Data(); }
80   
81   /// Set our source URI
82   void SetSource(const char* source) { fSource = source; }
83   
84   /// Number of events seen
85     Int_t NumberOfEvents() const { return fNumberOfEvents; }
86
87   virtual Long64_t Merge(TCollection* list);
88   
89         void SetRawReader(AliRawReader* rawReader);
90         
91 private:
92   /// Not implemented
93   AliMUONTrackerCalibratedDataMaker(const AliMUONTrackerCalibratedDataMaker& rhs);
94   /// Not implemented
95   AliMUONTrackerCalibratedDataMaker& operator=(const AliMUONTrackerCalibratedDataMaker& rhs);
96   
97   void Ctor(Int_t runNumber, const char* calibMode,
98             Bool_t histogram, Double_t xmin, Double_t xmax);
99   
100 private:
101   AliRawReader* fRawReader; //!< reader of the data
102         Bool_t fIsOwnerOfRawReader; //!< whether we must delete fRawReader or not
103   AliMUONVTrackerData* fAccumulatedData; ///< data (owner)
104   AliMUONVStore* fOneEventData; ///< data for one event (owner)
105   TString fSource; ///< where the data comes from
106   Bool_t fIsRunning; ///< whether we are running or are paused
107   AliMUONDigitCalibrator* fDigitCalibrator; //!< digit calibrator (if calibrating data)
108   AliMUONCalibrationData* fCalibrationData; ///< calibration data (if calibrating data)  
109   TString fCDBPath; ///< OCDB path (if calibrating data)
110   Int_t fNumberOfEvents; ///< number of events seen
111   Bool_t fUseHPDecoder; ///< whether to use High Performance decoder or not
112   static Int_t fgkCounter; ///< to count the number of instances
113   
114   ClassDef(AliMUONTrackerCalibratedDataMaker,3) // Producer of calibrated AliMUONVTrackerData from raw data
115 };
116
117 #endif