47 #if !defined(__CINT__) || defined(__MAKECINT__) 59 #include "AliRawReader.h" 60 #include <Riostream.h> 63 #include <TStopwatch.h> 72 const char* cdbPath=
"",
73 Bool_t histogram=kFALSE,
75 Double_t xmax = 4096.0)
79 TString
fileName(gSystem->ExpandPathName(input));
81 AliRawReader* rawReader = AliRawReader::Create(
fileName.Data());
83 if (!rawReader)
return 0;
88 if (!recoParam)
return 0;
90 if ( strlen(cdbPath) > 0 )
121 cout << Form(
"%20s %10d events. Total CPU time %7.2f seconds.",
122 method,n,timer.CpuTime());
124 Double_t cpu = timer.CpuTime()/n;
125 Double_t real = timer.RealTime()/n;
127 cout << Form(
" ms real/event = %7.2f ms CPU/event = %7.2f",real*1E3,cpu*1E3)
136 outfile <<
"-----------------------------------------------------" << endl;
137 outfile <<
"Occupancy numbers" << endl;
138 outfile <<
"-----------------------------------------------------" << endl;
140 const Int_t occIndex = 2;
146 outfile << Form(
"%11s|",
" ");
148 for ( Int_t ids = 0; ids < nofDataSources; ++ ids )
151 outfile << Form(
" %13s |",data->GetName());
158 Bool_t nonZero(kFALSE);
159 for ( Int_t ids = 0; ids < nofDataSources && nonZero == kFALSE; ++ ids )
164 if ( !nonZero )
continue;
166 outfile << Form(
"Chamber %2d |",chamberId);
167 for ( Int_t ids = 0; ids < nofDataSources; ++ ids )
170 outfile << Form(
" %7.2f %% |",100.0*data->
Chamber(chamberId,occIndex));
179 Bool_t nonZero(kFALSE);
180 for ( Int_t ids = 0; ids < nofDataSources && nonZero == kFALSE; ++ ids )
191 outfile << Form(
" DE %04d |",detElemId);
192 for ( Int_t ids = 0; ids < nofDataSources; ++ ids )
195 outfile << Form(
" %7.2f %% |",100.0*data->
DetectionElement(detElemId,occIndex));
205 void MUONOfflineShift(
const char* input=
"alien:///alice/data/2009/LHC09a/000067495/raw/09000067495031.10.root",
206 const char* outputBase=
"67495031.10",
207 const char* ocdbPath=
"alien://folder=/alice/data/2009/OCDB")
213 TGrid::Connect(
"alien://");
215 AliRawReader* rawReader = AliRawReader::Create(input);
217 rawReader->NextEvent();
219 Int_t
runNumber = rawReader->GetRunNumber();
244 Print(
"DataMakerReading(HRAW)",timer1,n1);
245 Print(
"DataMakerReading(HCALZ)",timer2,n2);
246 Print(
"DataMakerReading(HCALG)",timer3,n3);
247 Print(
"DataMakerReading(HCALC)",timer4,n4);
248 Print(
"DataMakerReading(HCALE)",timer5,n5);
252 TFile
f(gSystem->ExpandPathName(Form(
"%s.root",outputBase)),
"RECREATE");
253 ofstream out(gSystem->ExpandPathName(Form(
"%s.log",outputBase)));
AliMUONVTrackerData * DataSource(Int_t i) const
virtual Double_t DetectionElement(Int_t detElemId, Int_t dim=0) const =0
Get the value for a given DE and given dimension.
The iterator over detection elements.
void Print(Option_t *opt="") const
Print the list of timers we manage.
virtual Double_t Chamber(Int_t chamberId, Int_t dim=0) const =0
Get the value for a given chamber and given dimension.
Producer of some AliMUONVTrackerData.
Int_t NumberOfDataSources() const
Number of data sources = data makers.
Int_t CurrentDEId() const
Class with MUON reconstruction parameters.
Bool_t LoadMapping(Bool_t segmentationOnly)
TString fileName(const char *dir, int runNumber, const char *da, int i, const char *type)
void Print(const char *method, TStopwatch &timer, Int_t n)
void Register(AliMUONVTrackerDataMaker *reader)
static AliMUONPainterDataRegistry * Instance()
Registry for painter data sources.
void MUONOfflineShift(const char *input="alien:///alice/data/2009/LHC09a/000067495/raw/09000067495031.10.root", const char *outputBase="67495031.10", const char *ocdbPath="alien://folder=/alice/data/2009/OCDB")
void Occupancy(ostream &outfile)
virtual Bool_t NextEvent()
Advance to next event and process it (no effect if not runnable)
static AliCodeTimer * Instance()
Unique instance of this class, which is a singleton.
void Reset()
Reset all our timers.
void SetDefaultStorage(const char *dbString)
Implementation of VTrackerDataMaker to read raw data.
virtual void SetRunning(Bool_t flag)=0
Set the running state (no effect if not runnable)
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
Base class for MUON data that can be presented at different levels in the hierarchy of the MUON syste...
static Int_t NofTrackingChambers()
Return number of tracking chambers.
AliMUONRecoParam * LoadRecoParam()
Int_t DataMakerReading(const char *input, TStopwatch &timer, const char *cdbPath="", Bool_t histogram=kFALSE, Double_t xmin=0.0, Double_t xmax=4096.0)