AliRoot Core  ee782a0 (ee782a0)
AliMUONTrackerDataMaker.h
Go to the documentation of this file.
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 
13 // Author Laurent Aphecetche, Subatech
14 
15 #ifndef ALIMUONVTRACKERDATAMAKER_H
17 #endif
18 #ifndef ROOT_TString
19 # include "TString.h"
20 #endif
21 
22 class AliMUONRecoParam;
25 class AliMUONVStore;
27 class AliRawReader;
28 class AliMUONLogger;
29 
31 {
32 public:
33  AliMUONTrackerDataMaker(TRootIOCtor*);
34 
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 
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 
59  Bool_t IsValid() const { return fRawReader != 0x0; }
60 
63 
65  void SetOwnerOfData(Bool_t flag) { fIsOwnerOfAccumulatedData = flag; }
66 
68  Bool_t IsEventByEvent() const { return fIsEventByEvent; }
69 
71  void SetEventByEvent(Bool_t flag) { fIsEventByEvent = flag; }
72 
74  Bool_t IsRunnable() const { return IsValid(); }
75 
77  Bool_t IsRunning() const { return fIsRunning; }
78 
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 
91  TString Source() const { return fSource.Data(); }
92 
94  void SetSource(const char* source) { fSource = source; }
95 
97  Int_t NumberOfEvents() const { return fNumberOfEvents; }
98 
101 
104 
105  Long64_t Merge(TCollection* li);
106 
107  void SetRawReader(AliRawReader* rawReader);
108 
110  void EnableErrorLogger(AliMUONLogger* logger) { fLogger = logger; }
111 
113  Bool_t LastEventWasEmpty() const { return fLastEventWasEmpty; }
114 
116  void SetTryRecover(Bool_t flag) { fTryRecover = flag; }
117 
119  void SetEventRange(Int_t first, Int_t last) { fFirstEvent=first; fLastEvent=last; }
120 
121 private:
126 
127  void Ctor(const AliMUONRecoParam* param,
128  Int_t runNumber,
129  const char* calibMode,
130  Bool_t histogram,
131  Double_t xmin=0.0,
132  Double_t xmax=4095.0);
133 
134 private:
135  AliRawReader* fRawReader;
141  TString fSource;
142  TString fOCDBPath;
144  Int_t fRunNumber;
145  Bool_t fIsRunning;
148  static Int_t fgkCounter;
153  Bool_t fTryRecover;
154  Int_t fFirstEvent;
155  Int_t fLastEvent;
156 
157  ClassDef(AliMUONTrackerDataMaker,5) // Producer of AliMUONVTrackerData from raw
158 };
159 
160 #endif
Int_t fRunNumber
run number of the data
void EnableErrorLogger(AliMUONLogger *logger)
Set the error logger.
void SetEventRange(Int_t first, Int_t last)
Set the event range to consider.
AliMUONTrackerDataMaker & operator=(const AliMUONTrackerDataMaker &rhs)
not implemented
Bool_t IsRunning() const
Whether we are running or not.
Int_t NumberOfGoodPhysicsEvents() const
Number of good physics events seen.
TString fSource
where the data comes from
void SetEventByEvent(Bool_t flag)
Set event-by-event mode.
Bool_t IsValid() const
Whether we have a valid reader or not.
Long64_t Merge(TCollection *li)
Merge.
Producer of some AliMUONVTrackerData.
Class with MUON reconstruction parameters.
Bool_t IsEventByEvent() const
Whether we're only handling event-by-event data (i.e. no accumulation)
Bool_t fIsEventByEvent
we only keep one event's data (no accumulation)
AliMUONVStore * fOneEventData
data for a single event (owner)
void SetTryRecover(Bool_t flag)
Whether or not we should try to recover corrupted raw data.
AliRawReader * fRawReader
! reader of the data (owner or not)
AliMUONVTrackerData * Data() const
Get our accumulated data.
A logger that keeps track of the number of times a message appeared.
Definition: AliMUONLogger.h:24
Bool_t NextEvent()
Advance to next event and process it (no effect if not runnable)
void Print(Option_t *opt="") const
Class to calibrate the digits.
Int_t fNumberOfGoodPhysicsEvents
number of errors with no (fatal) readout error
Int_t fFirstEvent
first event to consider
void SetRunning(Bool_t flag)
Set the runnning status.
Int_t fLastEvent
last event to consider
Bool_t ProcessEvent()
Process current event.
Bool_t fTryRecover
whether we should try to recover corrupted raw data
AliMUONDigitCalibrator * fDigitCalibrator
! digit calibrator (if calibrating)
Bool_t fIsRunning
whether we are running or not
Bool_t IsRunnable() const
We can run if we have a reader.
Int_t NumberOfEvents() const
Number of events seen.
Int_t NumberOfPhysicsEvents() const
Number of physics events seen.
Single entry point to access MUON calibration data.
Implementation of VTrackerDataMaker to read raw data.
void Rewind()
Rewind events (no effect if not runnable)
void SetOwnerOfData(Bool_t flag)
Whether or not we're the owner of our fAccumulatedData.
void SetSource(const char *source)
Set our source URI.
AliMUONCalibrationData * fCalibrationData
calibration data (if calibrating)
static Int_t fgkCounter
to count the number of instances
TString fOCDBPath
OCDB path (if calibrating)
AliMUONVTrackerData * fAccumulatedData
data (owner or not)
Bool_t fIsOwnerOfRawReader
whether we must delete rawReader or not
void Ctor(const AliMUONRecoParam *param, Int_t runNumber, const char *calibMode, Bool_t histogram, Double_t xmin=0.0, Double_t xmax=4095.0)
TString Source() const
Get our source URI.
static Int_t runNumber
Definition: pdc06_config.C:126
AliMUONLogger * fLogger
error logger (not owner)
Bool_t LastEventWasEmpty() const
Whether last decoded event was empty.
Int_t fNumberOfPhysicsEvents
number of physics events seen
Bool_t Add(const AliMUONTrackerDataMaker &other)
void SetRawReader(AliRawReader *rawReader)
Base class for MUON data stores.
Definition: AliMUONVStore.h:22
Int_t fNumberOfEvents
number of events seen
Bool_t fIsOwnerOfAccumulatedData
owner or not of fAccumulatedData
Base class for MUON data that can be presented at different levels in the hierarchy of the MUON syste...
Bool_t fLastEventWasEmpty
whether last decoded event was empty