]>
Commit | Line | Data |
---|---|---|
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 | class AliMUONRecoParam; | |
30 | ||
31 | class AliMUONTrackerCalibratedDataMaker : public AliMUONVTrackerDataMaker | |
32 | { | |
33 | public: | |
34 | ||
35 | AliMUONTrackerCalibratedDataMaker(TRootIOCtor* ioCtor); | |
36 | ||
37 | AliMUONTrackerCalibratedDataMaker(const AliMUONRecoParam* recoParam, | |
38 | Int_t runNumber, | |
39 | AliRawReader* reader, | |
40 | const char* cdbpath=0x0, | |
41 | const char* calibMode=0x0, | |
42 | Bool_t histogram=kFALSE, | |
43 | Double_t xmin=0.0, | |
44 | Double_t xmax=4096.0, | |
45 | Bool_t useHPdecoder=kTRUE); | |
46 | ||
47 | AliMUONTrackerCalibratedDataMaker(const AliMUONRecoParam* recoParam, | |
48 | AliRawReader* reader = 0x0, | |
49 | const char* cdbpath=0x0, | |
50 | const char* calibMode=0x0, | |
51 | Bool_t histogram=kFALSE, | |
52 | Double_t xmin=0.0, | |
53 | Double_t xmax=4096.0, | |
54 | Bool_t useHPdecoder=kTRUE); | |
55 | ||
56 | virtual ~AliMUONTrackerCalibratedDataMaker(); | |
57 | ||
58 | /// Whether we have a valid raw reader | |
59 | Bool_t IsValid() const { return fRawReader != 0x0; } | |
60 | ||
61 | /// Our data | |
62 | AliMUONVTrackerData* Data() const { return fAccumulatedData; } | |
63 | ||
64 | /// We can be run | |
65 | virtual Bool_t IsRunnable() const { return kTRUE; } | |
66 | ||
67 | /// Whether we are running or not | |
68 | virtual Bool_t IsRunning() const { return fIsRunning; } | |
69 | ||
70 | /// Set the running status | |
71 | virtual void SetRunning(Bool_t flag) { fIsRunning = flag; } | |
72 | ||
73 | Bool_t ProcessEvent(); | |
74 | ||
75 | Bool_t NextEvent(); | |
76 | ||
77 | void Print(Option_t* opt="") const; | |
78 | ||
79 | void Rewind(); | |
80 | ||
81 | /// Get our source URI | |
82 | virtual TString Source() const { return fSource.Data(); } | |
83 | ||
84 | /// Set our source URI | |
85 | void SetSource(const char* source) { fSource = source; } | |
86 | ||
87 | /// Number of events seen | |
88 | Int_t NumberOfEvents() const { return fNumberOfEvents; } | |
89 | ||
90 | virtual Long64_t Merge(TCollection* list); | |
91 | ||
92 | void SetRawReader(AliRawReader* rawReader); | |
93 | ||
94 | private: | |
95 | /// Not implemented | |
96 | AliMUONTrackerCalibratedDataMaker(const AliMUONTrackerCalibratedDataMaker& rhs); | |
97 | /// Not implemented | |
98 | AliMUONTrackerCalibratedDataMaker& operator=(const AliMUONTrackerCalibratedDataMaker& rhs); | |
99 | ||
100 | void Ctor(const AliMUONRecoParam* recoParam, | |
101 | Int_t runNumber, const char* calibMode, | |
102 | Bool_t histogram, Double_t xmin, Double_t xmax); | |
103 | ||
104 | private: | |
105 | AliRawReader* fRawReader; //!< reader of the data | |
106 | Bool_t fIsOwnerOfRawReader; //!< whether we must delete fRawReader or not | |
107 | AliMUONVTrackerData* fAccumulatedData; ///< data (owner) | |
108 | AliMUONVStore* fOneEventData; ///< data for one event (owner) | |
109 | TString fSource; ///< where the data comes from | |
110 | Bool_t fIsRunning; ///< whether we are running or are paused | |
111 | AliMUONDigitCalibrator* fDigitCalibrator; //!< digit calibrator (if calibrating data) | |
112 | AliMUONCalibrationData* fCalibrationData; ///< calibration data (if calibrating data) | |
113 | TString fCDBPath; ///< OCDB path (if calibrating data) | |
114 | Int_t fNumberOfEvents; ///< number of events seen | |
115 | Bool_t fUseHPDecoder; ///< whether to use High Performance decoder or not | |
116 | static Int_t fgkCounter; ///< to count the number of instances | |
117 | ||
118 | ClassDef(AliMUONTrackerCalibratedDataMaker,3) // Producer of calibrated AliMUONVTrackerData from raw data | |
119 | }; | |
120 | ||
121 | #endif |