]>
Commit | Line | Data |
---|---|---|
b6f591ae | 1 | #ifndef ALIMUONTRACKERDATAMAKER_H |
2 | #define ALIMUONTRACKERDATAMAKER_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 AliMUONTrackerDataMaker | |
11 | /// \brief Implementation of VTrackerDataMaker to read raw data | |
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 AliMUONRecoParam; | |
23 | class AliMUONCalibrationData; | |
24 | class AliMUONDigitCalibrator; | |
25 | class AliMUONVStore; | |
26 | class AliMUONVTrackerData; | |
27 | class AliRawReader; | |
64c2397e | 28 | class AliMUONLogger; |
b6f591ae | 29 | |
30 | class AliMUONTrackerDataMaker : public AliMUONVTrackerDataMaker | |
31 | { | |
32 | public: | |
33 | AliMUONTrackerDataMaker(TRootIOCtor*); | |
34 | ||
35 | AliMUONTrackerDataMaker(const AliMUONRecoParam* recoParam, | |
36 | Int_t runNumber, | |
37 | AliRawReader* rawReader, | |
38 | const char* cdbPath, | |
39 | const char* calibMode, | |
40 | Bool_t histogram=kFALSE, | |
41 | Double_t xmin=0.0, | |
42 | Double_t xmax=4095.0); | |
43 | ||
44 | AliMUONTrackerDataMaker(const AliMUONRecoParam* recoParam, | |
45 | AliRawReader* rawReader, | |
46 | const char* cdbPath, | |
47 | const char* calibMode, | |
48 | Bool_t histogram=kFALSE, | |
49 | Double_t xmin=0.0, | |
50 | Double_t xmax=4095.0); | |
51 | ||
52 | AliMUONTrackerDataMaker(AliRawReader* rawReader, Bool_t histogram=kFALSE); | |
53 | ||
54 | virtual ~AliMUONTrackerDataMaker(); | |
55 | ||
56 | Bool_t Add(const AliMUONTrackerDataMaker& other); | |
57 | ||
58 | /// Whether we have a valid reader or not | |
59 | Bool_t IsValid() const { return fRawReader != 0x0; } | |
60 | ||
61 | /// Get our accumulated data | |
62 | AliMUONVTrackerData* Data() const { return fAccumulatedData; } | |
63 | ||
64 | /// Whether we're only handling event-by-event data (i.e. no accumulation) | |
65 | Bool_t IsEventByEvent() const { return fIsEventByEvent; } | |
66 | ||
67 | /// Set event-by-event mode | |
68 | void SetEventByEvent(Bool_t flag) { fIsEventByEvent = flag; } | |
69 | ||
70 | /// We can run if we have a reader | |
71 | Bool_t IsRunnable() const { return IsValid(); } | |
72 | ||
73 | /// Whether we are running or not | |
74 | Bool_t IsRunning() const { return fIsRunning; } | |
75 | ||
76 | /// Set the runnning status | |
77 | void SetRunning(Bool_t flag) { fIsRunning = flag; } | |
78 | ||
79 | Bool_t ProcessEvent(); | |
80 | ||
81 | Bool_t NextEvent(); | |
82 | ||
83 | void Print(Option_t* opt="") const; | |
84 | ||
85 | void Rewind(); | |
86 | ||
87 | /// Get our source URI | |
88 | TString Source() const { return fSource.Data(); } | |
89 | ||
90 | /// Set our source URI | |
91 | void SetSource(const char* source) { fSource = source; } | |
92 | ||
93 | /// Number of events seen | |
94 | Int_t NumberOfEvents() const { return fNumberOfEvents; } | |
95 | ||
96 | Long64_t Merge(TCollection* li); | |
97 | ||
98 | void SetRawReader(AliRawReader* rawReader); | |
99 | ||
64c2397e | 100 | void EnableErrorLogger(AliMUONLogger* logger) { fLogger = logger; } |
101 | ||
b6f591ae | 102 | private: |
103 | /// not implemented | |
104 | AliMUONTrackerDataMaker(const AliMUONTrackerDataMaker& rhs); | |
105 | /// not implemented | |
106 | AliMUONTrackerDataMaker& operator=(const AliMUONTrackerDataMaker& rhs); | |
107 | ||
108 | void Ctor(const AliMUONRecoParam* param, | |
109 | Int_t runNumber, | |
110 | const char* calibMode, | |
111 | Bool_t histogram, | |
112 | Double_t xmin=0.0, | |
113 | Double_t xmax=4095.0); | |
114 | ||
115 | private: | |
116 | AliRawReader* fRawReader; //!< reader of the data (owner or not) | |
117 | AliMUONVTrackerData* fAccumulatedData; ///< data (owner) | |
118 | AliMUONVStore* fOneEventData; ///< data for a single event (owner) | |
119 | AliMUONDigitCalibrator* fDigitCalibrator; //!< digit calibrator (if calibrating) | |
120 | AliMUONCalibrationData* fCalibrationData; ///< calibration data (if calibrating) | |
121 | TString fSource; ///< where the data comes from | |
122 | TString fOCDBPath; ///< OCDB path (if calibrating) | |
123 | Int_t fNumberOfEvents; ///< number of events seen | |
124 | Int_t fRunNumber; ///< run number of the data | |
125 | Bool_t fIsRunning; ///< whether we are running or not | |
126 | Bool_t fIsOwnerOfRawReader; ///< whether we must delete rawReader or not | |
127 | Bool_t fIsEventByEvent; ///< we only keep one event's data (no accumulation) | |
128 | static Int_t fgkCounter; ///< to count the number of instances | |
64c2397e | 129 | AliMUONLogger* fLogger; ///< error logger (not owner) |
b6f591ae | 130 | |
64c2397e | 131 | ClassDef(AliMUONTrackerDataMaker,2) // Producer of AliMUONVTrackerData from raw |
b6f591ae | 132 | }; |
133 | ||
134 | #endif |