1 #ifndef ALIMUONTRACKERDATAMAKER_H
2 #define ALIMUONTRACKERDATAMAKER_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \class AliMUONTrackerDataMaker
11 /// \brief Implementation of VTrackerDataMaker to read raw data
13 // Author Laurent Aphecetche, Subatech
15 #ifndef ALIMUONVTRACKERDATAMAKER_H
16 # include "AliMUONVTrackerDataMaker.h"
22 class AliMUONRecoParam;
23 class AliMUONCalibrationData;
24 class AliMUONDigitCalibrator;
26 class AliMUONVTrackerData;
30 class AliMUONTrackerDataMaker : public AliMUONVTrackerDataMaker
33 AliMUONTrackerDataMaker(TRootIOCtor*);
35 AliMUONTrackerDataMaker(const AliMUONRecoParam* recoParam,
37 AliRawReader* rawReader,
39 const char* calibMode,
40 Bool_t histogram=kFALSE,
42 Double_t xmax=4095.0);
44 AliMUONTrackerDataMaker(const AliMUONRecoParam* recoParam,
45 AliRawReader* rawReader,
47 const char* calibMode,
48 Bool_t histogram=kFALSE,
50 Double_t xmax=4095.0);
52 AliMUONTrackerDataMaker(AliRawReader* rawReader, Bool_t histogram=kFALSE);
54 virtual ~AliMUONTrackerDataMaker();
56 Bool_t Add(const AliMUONTrackerDataMaker& other);
58 /// Whether we have a valid reader or not
59 Bool_t IsValid() const { return fRawReader != 0x0; }
61 /// Get our accumulated data
62 AliMUONVTrackerData* Data() const { return fAccumulatedData; }
64 /// Whether or not we're the owner of our fAccumulatedData
65 void SetOwnerOfData(Bool_t flag) { fIsOwnerOfAccumulatedData = flag; }
67 /// Whether we're only handling event-by-event data (i.e. no accumulation)
68 Bool_t IsEventByEvent() const { return fIsEventByEvent; }
70 /// Set event-by-event mode
71 void SetEventByEvent(Bool_t flag) { fIsEventByEvent = flag; }
73 /// We can run if we have a reader
74 Bool_t IsRunnable() const { return IsValid(); }
76 /// Whether we are running or not
77 Bool_t IsRunning() const { return fIsRunning; }
79 /// Set the runnning status
80 void SetRunning(Bool_t flag) { fIsRunning = flag; }
82 Bool_t ProcessEvent();
86 void Print(Option_t* opt="") const;
90 /// Get our source URI
91 TString Source() const { return fSource.Data(); }
93 /// Set our source URI
94 void SetSource(const char* source) { fSource = source; }
96 /// Number of events seen
97 Int_t NumberOfEvents() const { return fNumberOfEvents; }
99 /// Number of physics events seen
100 Int_t NumberOfPhysicsEvents() const { return fNumberOfPhysicsEvents; }
102 /// Number of good physics events seen
103 Int_t NumberOfGoodPhysicsEvents() const { return fNumberOfGoodPhysicsEvents; }
105 Long64_t Merge(TCollection* li);
107 void SetRawReader(AliRawReader* rawReader);
109 /// Set the error logger
110 void EnableErrorLogger(AliMUONLogger* logger) { fLogger = logger; }
112 /// Whether last decoded event was empty
113 Bool_t LastEventWasEmpty() const { return fLastEventWasEmpty; }
115 /// Whether or not we should try to recover corrupted raw data
116 void SetTryRecover(Bool_t flag) { fTryRecover = flag; }
118 /// Set the event range to consider
119 void SetEventRange(Int_t first, Int_t last) { fFirstEvent=first; fLastEvent=last; }
123 AliMUONTrackerDataMaker(const AliMUONTrackerDataMaker& rhs);
125 AliMUONTrackerDataMaker& operator=(const AliMUONTrackerDataMaker& rhs);
127 void Ctor(const AliMUONRecoParam* param,
129 const char* calibMode,
132 Double_t xmax=4095.0);
135 AliRawReader* fRawReader; //!< reader of the data (owner or not)
136 AliMUONVTrackerData* fAccumulatedData; ///< data (owner or not)
137 Bool_t fIsOwnerOfAccumulatedData; ///< owner or not of fAccumulatedData
138 AliMUONVStore* fOneEventData; ///< data for a single event (owner)
139 AliMUONDigitCalibrator* fDigitCalibrator; //!< digit calibrator (if calibrating)
140 AliMUONCalibrationData* fCalibrationData; ///< calibration data (if calibrating)
141 TString fSource; ///< where the data comes from
142 TString fOCDBPath; ///< OCDB path (if calibrating)
143 Int_t fNumberOfEvents; ///< number of events seen
144 Int_t fRunNumber; ///< run number of the data
145 Bool_t fIsRunning; ///< whether we are running or not
146 Bool_t fIsOwnerOfRawReader; ///< whether we must delete rawReader or not
147 Bool_t fIsEventByEvent; ///< we only keep one event's data (no accumulation)
148 static Int_t fgkCounter; ///< to count the number of instances
149 AliMUONLogger* fLogger; ///< error logger (not owner)
150 Bool_t fLastEventWasEmpty; ///< whether last decoded event was empty
151 Int_t fNumberOfPhysicsEvents; ///< number of physics events seen
152 Int_t fNumberOfGoodPhysicsEvents; ///< number of errors with no (fatal) readout error
153 Bool_t fTryRecover; ///< whether we should try to recover corrupted raw data
154 Int_t fFirstEvent; ///< first event to consider
155 Int_t fLastEvent; ///< last event to consider
157 ClassDef(AliMUONTrackerDataMaker,5) // Producer of AliMUONVTrackerData from raw