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