]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONTrackerCalibratedDataMaker.h
- Implementing the possibility to histogram the raw adc values when reading
[u/mrichter/AliRoot.git] / MUON / AliMUONTrackerCalibratedDataMaker.h
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 graphics
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
30 class AliMUONTrackerCalibratedDataMaker : public AliMUONVTrackerDataMaker
31 {
32 public:
33   AliMUONTrackerCalibratedDataMaker(AliRawReader* reader = 0x0, const char* cdbpath=0x0);
34   virtual ~AliMUONTrackerCalibratedDataMaker();
35   
36   /// Whether we have a valid raw reader
37   Bool_t IsValid() const { return fRawReader != 0x0; }
38   
39   /// Our data
40   AliMUONVTrackerData* Data() const { return fAccumulatedData; }
41   
42   /// We can be run
43   virtual Bool_t IsRunnable() const { return kTRUE; }
44   
45   /// Whether we are running or not
46   virtual Bool_t IsRunning() const { return fIsRunning; }
47   
48   /// Set the running status
49   virtual void SetRunning(Bool_t flag) { fIsRunning = flag; }
50   
51   Bool_t NextEvent();
52   
53   void Print(Option_t* opt="") const;
54   
55   void Rewind();
56   
57   /// Tell if we are owner of our data or not
58   void SetOwner(Bool_t flag) { fIsOwner = flag; }
59   
60   /// Get our source URI
61   virtual TString Source() const { return fSource.Data(); }
62   
63   /// Set our source URI
64   void SetSource(const char* source) { fSource = source; }
65   
66   /// Get our digit store
67   AliMUONVDigitStore* DigitStore() const { return fDigitStore; }
68   
69   /// Number of events seen
70     Int_t NumberOfEvents() const { return fNumberOfEvents; }
71
72 private:
73   /// Not implemented
74   AliMUONTrackerCalibratedDataMaker(const AliMUONTrackerCalibratedDataMaker& rhs);
75   /// Not implemented
76   AliMUONTrackerCalibratedDataMaker& operator=(const AliMUONTrackerCalibratedDataMaker& rhs);
77   
78   Bool_t ConvertDigits();
79   
80 private:
81   AliRawReader* fRawReader; ///< reader of the data (owner)
82   AliMUONVTrackerData* fAccumulatedData; ///< data (owner if fIsOwner==kTRUE)
83   AliMUONVStore* fOneEventData; ///< data for one event (owner)
84   Bool_t fIsOwner; ///< whether we are owner of our data or not
85   TString fSource; ///< where the data comes from
86   Bool_t fIsRunning; ///< whether we are running or are paused
87   AliMUONDigitMaker* fDigitMaker; ///< digit maker
88   AliMUONDigitCalibrator* fDigitCalibrator; ///< digit calibrator (if calibrating data)
89   AliMUONCalibrationData* fCalibrationData; ///< calibration data (if calibrating data)  
90   AliMUONVDigitStore* fDigitStore; ///< digit store (if calibrating data)
91   TString fCDBPath; ///< OCDB path (if calibrating data)
92   Int_t fNumberOfEvents; ///< number of events seen
93   static Int_t fgkCounter; ///< to count the number of instances
94   
95   ClassDef(AliMUONTrackerCalibratedDataMaker,1) // Producer of calibrated AliMUONVTrackerData from raw data
96 };
97
98 #endif