- AliMUONRawStreamTracker* rawStream = new AliMUONRawStreamTracker(rawReader);
-
- // set the number of DDL block Dsp & buspatch structures that are PRESENT in the rawdata file
- // it's NOT the number to be read.
- // default wise set to 20, 2, 5 ans 5 respectively.
- // rawStream->SetMaxDDL(xx);
- // rawStream->SetMaxBlock(xx);
- // rawStream->SetMaxDsp(xx);
- // rawStream->SetMaxBus(xx);
-
- // containers
- AliMUONDDLTracker* ddlTracker = 0x0;
- AliMUONBlockHeader* blkHeader = 0x0;
- AliMUONDspHeader* dspHeader = 0x0;
- AliMUONBusStruct* busStruct = 0x0;
-
- // Loop over events
- Int_t iEvent = 0;
- Int_t dataSize;
-
- while (rawReader->NextEvent()) {
-
- if (iEvent == maxEvent)
- break;
-
- printf("Event %d\n",iEvent++);
-
- // read DDL while < 20 DDL
- while(rawStream->NextDDL()) {
-
- if (rawStream->GetDDL() < minDDL || rawStream->GetDDL() > maxDDL)
- continue;
-
- printf("\niDDL %d\n", rawStream->GetDDL());
-
- ddlTracker = rawStream->GetDDLTracker();
-
- // loop over block structure
- Int_t nBlock = ddlTracker->GetBlkHeaderEntries();
- for(Int_t iBlock = 0; iBlock < nBlock ;iBlock++){
-
- blkHeader = ddlTracker->GetBlkHeaderEntry(iBlock);
- printf("Block %d Total length %d\n",iBlock,blkHeader->GetTotalLength());
-
- // loop over DSP structure
- Int_t nDsp = blkHeader->GetDspHeaderEntries();
- for(Int_t iDsp = 0; iDsp < nDsp ;iDsp++){ //DSP loop
-
- dspHeader = blkHeader->GetDspHeaderEntry(iDsp);
- printf("Dsp %d length %d error word %d\n",iDsp,dspHeader->GetTotalLength(), dspHeader->GetErrorWord());
-
- // loop over BusPatch structure
- Int_t nBusPatch = dspHeader->GetBusPatchEntries();
- for(Int_t iBusPatch = 0; iBusPatch < nBusPatch; iBusPatch++) {
-
- busStruct = dspHeader->GetBusPatchEntry(iBusPatch);
-
- // printf("busPatchId %d", busStruct->GetBusPatchId());
- // printf(" BlockId %d", busStruct->GetBlockId());
- // printf(" DspId %d\n", busStruct->GetDspId());
-
- // loop over data
- dataSize = busStruct->GetLength();
- for (Int_t iData = 0; iData < dataSize; iData++) {
-
- Int_t manuId = busStruct->GetManuId(iData);
- Int_t channelId = busStruct->GetChannelId(iData);
- Int_t charge = busStruct->GetCharge(iData);
- printf("buspatch %5d manuI %4d channel %3d charge %4d\n",
- busStruct->GetBusPatchId(),
- manuId,
- channelId, charge);
- } // iData
- } // iBusPatch
- } // iDsp
- } // iBlock
- } // NextDDL
- }// NextEvent
-
- delete rawReader;
- delete rawStream;
- timer.Print();
-}
-
-
-void MUONRawStreamTrackerHPExpert(TString fileName = "./", Int_t maxEvent = 1000,
- Int_t minDDL = 0, Int_t maxDDL = 19)
-{
- /// This routine shows how to use the high performance decoder's expert interface.
-
- TStopwatch timer;
- timer.Start(kTRUE);
-
- AliRawReader* rawReader = 0x0;
-
- // check extention to choose the rawdata file format
- if (fileName.EndsWith("/")) {
- rawReader = new AliRawReaderFile(fileName); // DDL files
- } else if (fileName.EndsWith(".root")) {
- rawReader = new AliRawReaderRoot(fileName);
- } else if (!fileName.IsNull()) {
- rawReader = new AliRawReaderDate(fileName); // DATE file
- }
-
- // raw stream
- AliMUONRawStreamTrackerHP* rawStream = new AliMUONRawStreamTrackerHP(rawReader);