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 we're only handling event-by-event data (i.e. no accumulation)
65 Bool_t IsEventByEvent() const { return fIsEventByEvent; }
67 /// Set event-by-event mode
68 void SetEventByEvent(Bool_t flag) { fIsEventByEvent = flag; }
70 /// We can run if we have a reader
71 Bool_t IsRunnable() const { return IsValid(); }
73 /// Whether we are running or not
74 Bool_t IsRunning() const { return fIsRunning; }
76 /// Set the runnning status
77 void SetRunning(Bool_t flag) { fIsRunning = flag; }
79 Bool_t ProcessEvent();
83 void Print(Option_t* opt="") const;
87 /// Get our source URI
88 TString Source() const { return fSource.Data(); }
90 /// Set our source URI
91 void SetSource(const char* source) { fSource = source; }
93 /// Number of events seen
94 Int_t NumberOfEvents() const { return fNumberOfEvents; }
96 Long64_t Merge(TCollection* li);
98 void SetRawReader(AliRawReader* rawReader);
100 void EnableErrorLogger(AliMUONLogger* logger) { fLogger = logger; }
104 AliMUONTrackerDataMaker(const AliMUONTrackerDataMaker& rhs);
106 AliMUONTrackerDataMaker& operator=(const AliMUONTrackerDataMaker& rhs);
108 void Ctor(const AliMUONRecoParam* param,
110 const char* calibMode,
113 Double_t xmax=4095.0);
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
129 AliMUONLogger* fLogger; ///< error logger (not owner)
131 ClassDef(AliMUONTrackerDataMaker,2) // Producer of AliMUONVTrackerData from raw