40 #if !defined(__CINT__) || defined(__MAKECINT__) 43 #include "AliRawReader.h" 44 #include "AliRawReaderFile.h" 45 #include "AliRawReaderRoot.h" 58 #include "TStopwatch.h" 69 AliRawReader* rawReader = AliRawReader::Create(
fileName.Data());
73 printf(
"Could not access mapping from OCDB !\n");
95 while (rawReader->NextEvent()) {
97 if (iEvent == maxEvent)
100 printf(
"Event %d\n",iEvent++);
105 if (rawStream->
GetDDL() < minDDL || rawStream->
GetDDL() > maxDDL)
111 darcHeader = ddlTrigger->GetDarcHeader();
117 for(Int_t iReg = 0; iReg < nReg ;iReg++){
126 GetTriggerCrate(rawStream->
GetDDL(), iReg);
130 for(Int_t iLocal = 0; iLocal < nLocal; iLocal++) {
136 if ( !iLocCard )
continue;
144 Int_t loStripX = (Int_t)localStruct->
GetXPos();
145 Int_t loStripY = (Int_t)localStruct->
GetYPos();
146 Int_t loDev = (Int_t)localStruct->
GetXDev();
148 printf(
"iLocCard: %d, XPos: %d, YPos: %d Dev: %d\n", iLocCard, loStripX, loStripY, loDev);
171 AliRawReader* rawReader = AliRawReader::Create(
fileName.Data());
175 printf(
"Could not access mapping from OCDB !\n");
189 while (rawReader->NextEvent()) {
191 if (iEvent == maxEvent)
194 printf(
"Event %d\n",iEvent++);
199 if (rawStream->
GetDDL() < minDDL || rawStream->
GetDDL() > maxDDL)
206 printf(
"Global output %x\n", (Int_t)darcHeader->GetGlobalOutput());
210 for(Int_t iReg = 0; iReg < nReg ;iReg++){
218 GetTriggerCrate(rawStream->
GetDDL(), iReg);
222 for(Int_t iLocal = 0; iLocal < nLocal; iLocal++) {
228 if ( !iLocCard )
continue;
236 Int_t loStripX = (Int_t)localStruct->
GetXPos();
237 Int_t loStripY = (Int_t)localStruct->
GetYPos();
238 Int_t loDev = (Int_t)localStruct->
GetXDev();
240 printf(
"iLocCard: %d, XPos: %d, YPos: %d Dev: %d\n", iLocCard, loStripX, loStripY, loDev);
265 AliRawReader* rawReader = AliRawReader::Create(
fileName.Data());
269 printf(
"Could not access mapping from OCDB !\n");
283 while (rawReader->NextEvent()) {
285 if (iEvent == maxEvent)
288 printf(
"Event %d\n",iEvent++);
293 if (rawStream->
GetDDL() < minDDL || rawStream->
GetDDL() > maxDDL)
300 printf(
"Global output %x\n", (Int_t)darcHeader->GetGlobalOutput());
304 for(Int_t iReg = 0; iReg < nReg ;iReg++){
312 GetTriggerCrate(rawStream->
GetDDL(), iReg);
316 for(Int_t iLocal = 0; iLocal < nLocal; iLocal++) {
322 if ( !iLocCard )
continue;
330 Int_t loStripX = (Int_t)localStruct->
GetXPos();
331 Int_t loStripY = (Int_t)localStruct->
GetYPos();
332 Int_t loDev = (Int_t)localStruct->
GetXDev();
334 printf(
"iLocCard: %d, XPos: %d, YPos: %d Dev: %d\n", iLocCard, loStripX, loStripY, loDev);
359 AliRawReader* rawReader = AliRawReader::Create(
fileName.Data());
363 printf(
"Could not access mapping from OCDB !\n");
377 while (rawReader->NextEvent()) {
379 if (iEvent == maxEvent)
382 printf(
"Event %d\n",iEvent++);
387 if (rawStream->
GetDDL() < minDDL || rawStream->
GetDDL() > maxDDL)
394 printf(
"Global output %x\n", (Int_t)darcHeader->GetGlobalOutput());
399 while (regHeader != NULL)
407 GetTriggerCrate(rawStream->
GetDDL(), iReg);
412 while (localStruct != NULL)
415 if ( !iLocCard )
continue;
423 Int_t loStripX = (Int_t)localStruct->
GetXPos();
424 Int_t loStripY = (Int_t)localStruct->
GetYPos();
425 Int_t loDev = (Int_t)localStruct->
GetXDev();
427 printf(
"iLocCard: %d, XPos: %d, YPos: %d Dev: %d\n", iLocCard, loStripX, loStripY, loDev);
431 localStruct = localStruct->
Next();
434 regHeader = regHeader->
Next();
455 AliRawReader* rawReader = 0x0;
458 rawReader =
new AliRawReaderFile(
fileName);
459 }
else if (
fileName.EndsWith(
".root")) {
460 rawReader =
new AliRawReaderRoot(
fileName);
490 while (rawReader->NextEvent()) {
492 if (iEvent == maxEvent)
495 printf(
"Event %d\n",iEvent++);
500 while( rawStream->
Next(
id, dec, trigY, yPos, sXDev, xDev, xPos,
501 triggerX, triggerY, xPattern, yPattern) )
503 if ( triggerX || triggerY )
504 printf(
"iLocCard: %d, XPos: %d, YPos: %d Dev: %d\n",
id, xPos, yPos, xDev);
526 AliRawReader* rawReader = AliRawReader::Create(
fileName.Data());
544 while (rawReader->NextEvent())
547 if (iEvent == maxEvent)
550 printf(
"Event %d\n", iEvent++);
555 while ( rawStream->Next(
id, dec, trigY, yPos, sXDev, xDev, xPos,
556 triggerX, triggerY, xPattern, yPattern) )
558 if ( triggerX || triggerY )
559 printf(
"iLocCard: %d, XPos: %d, YPos: %d Dev: %d\n",
id, xPos, yPos, xDev);
578 AliRawReader* rawReader = AliRawReader::Create(
fileName.Data());
586 while (rawReader->NextEvent())
589 if (iEvent == maxEvent)
592 printf(
"Event %d\n", iEvent++);
597 while ( (localStruct = rawStream->
Next()) != NULL )
600 printf(
"iLocCard: %d, XPos: %d, YPos: %d Dev: %d\n",
601 localStruct->
GetId(),
virtual Bool_t Next(UChar_t &id, UChar_t &dec, Bool_t &trigY, UChar_t &yPos, UChar_t &sXDev, UChar_t &xDev, UChar_t &xPos, Bool_t &triggerY, Bool_t &triggerX, TArrayS &xPattern, TArrayS &yPattern)
Advance one step in the iteration. Returns false if finished.
UChar_t GetYPos() const
Return Upos.
const AliHeader * GetHeaders() const
Returns the DARC and global headers plus scalars if they exist.
Light weight interface class to the local trigger card data.
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
Rawdata local card structure for trigger.
UInt_t GetLocalStructCount(UInt_t reg) const
The class defines the properties of trigger crate.
UChar_t GetId() const
Return Id.
virtual Bool_t NextDDL()
DDL iterator.
Int_t GetLocalBoardId(Int_t index) const
const AliRegionalHeader * GetRegionalHeader(UInt_t i) const
Return the i'th regional header or NULL if not found.
static Bool_t LoadDDLStore(Bool_t warn=false)
Higher performance decoder stream class for reading MUON raw trigger data.
void MUONRawStreamTriggerHPSimple2(Int_t maxEvent=1, TString fileName="./")
TString fileName(const char *dir, int runNumber, const char *da, int i, const char *type)
void MUONRawStreamTriggerHPExpert(Int_t maxEvent=1, Int_t minDDL=0, Int_t maxDDL=1, TString fileName="./")
void MUONRawStreamTriggerHPSimple(Int_t maxEvent=1, TString fileName="./")
Class for reading MUON raw digits.
static AliMpDDLStore * Instance(Bool_t warn=true)
Bool_t GetTriggerY() const
Return TriggerY.
void MUONRawStreamTriggerSimple(Int_t maxEvent=1, TString fileName="./")
AliMUONDDLTrigger * GetDDLTrigger() const
Return pointer for DDL structure.
void MUONRawStreamTrigger(Int_t maxEvent=1, Int_t minDDL=0, Int_t maxDDL=1, TString fileName="./")
UChar_t GetXDev() const
Get X deviation.
const AliRegionalHeader * GetFirstRegionalHeader() const
Return the first regional structure header.
Int_t GetDDL() const
Return number of DDL.
Bool_t GetTriggerX() const
Return TriggerX.
virtual Int_t GetDDL() const
Return number of the current DDL being handled in the range [0..1] and -1 if no DDL set...
UChar_t GetXPos() const
Return Xpos.
const AliLocalStruct * GetLocalStruct(UInt_t reg, UInt_t i) const
Bool_t GetTriggerY() const
Return TriggerY.
void First()
Initialize iterator.
void MUONRawStreamTriggerHPExpert2(Int_t maxEvent=1, Int_t minDDL=0, Int_t maxDDL=1, TString fileName="./")
UInt_t GetRegionalHeaderCount() const
Return the number of regional structures in the DDL payload.
UChar_t GetXPos() const
Return Xpos.
UChar_t GetId() const
Return Id.
UChar_t GetXDev() const
Get X deviation.
void MUONRawStreamTriggerHPExpert3(Int_t maxEvent=1, Int_t minDDL=0, Int_t maxDDL=1, TString fileName="./")
const AliLocalStruct * Next() const
Return the next local trigger structure.
Bool_t GetTriggerX() const
Return TriggerX.
virtual Bool_t NextDDL()
DDL iterator.
UChar_t GetYPos() const
Return Upos.