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