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