monitorDeclareTable(const_cast<char**>(tableSOD));
int status = 0;
+ int const kNChannels = 48;
/* log start of process */
printf("\nZDC MAPPING program started\n");
}
/* retry if got no event */
- if(event==NULL) {
- continue;
- }
+ if(event==NULL) continue;
// Initalize raw-data reading and decoding
AliRawReader *reader = new AliRawReaderDate((void*)event);
// --- Reading event header
- UInt_t evtype = reader->GetType();
- //printf("\n\t ZDCPEDESTALda -> ev. type %d\n",evtype);
- //printf("\t ZDCPEDESTALda -> run # %d\n",reader->GetRunNumber());
+ //UInt_t evtype = reader->GetType();
+ //printf("\t ZDCMAPPINGda -> run # %d\n",reader->GetRunNumber());
//
AliZDCRawStream *rawStreamZDC = new AliZDCRawStream(reader);
/* use event - here, just write event id to result file */
eventT=event->eventType;
- Int_t ich=0, adcMod[48], adcCh[48], sigCode[48], det[48], sec[48];
+ Int_t ich=0;
+ Int_t adcMod[kNChannels], adcCh[kNChannels], sigCode[kNChannels];
+ Int_t det[kNChannels], sec[kNChannels];
if(eventT==START_OF_DATA){
sodRead = kTRUE;
+ rawStreamZDC->SetSODReading(kTRUE);
+ // --------------------------------------------------------
+ // --- Writing ascii data file for the Shuttle preprocessor
+ mapFile4Shuttle = fopen(MAPDATA_FILE,"w");
if(!rawStreamZDC->Next()) printf(" \t No raw data found!! \n");
else{
while(rawStreamZDC->Next()){
- if(rawStreamZDC->IsChMapping()){
+ if((rawStreamZDC->IsChMapping()) && (ich<kNChannels)){
adcMod[ich] = rawStreamZDC->GetADCModFromMap(ich);
adcCh[ich] = rawStreamZDC->GetADCChFromMap(ich);
sigCode[ich] = rawStreamZDC->GetADCSignFromMap(ich);
det[ich] = rawStreamZDC->GetDetectorFromMap(ich);
sec[ich] = rawStreamZDC->GetTowerFromMap(ich);
+ //
+ fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",
+ ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
+ //
+ //printf("ZDCMAPPINGda.cxx -> %d mod %d ch %d code %d det %d sec %d\n",
+ // ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
+ //
ich++;
}
}
}
- // --------------------------------------------------------
- // --- Writing ascii data file for the Shuttle preprocessor
- mapFile4Shuttle = fopen(MAPDATA_FILE,"w");
- for(Int_t i=0; i<ich; i++){
- fprintf(mapFile4Shuttle,"\t%d\t%d\t%d\t%d\t%d\t%d\n",i,
- adcMod[i],adcCh[i],sigCode[i],det[i],sec[i]);
- //
- //printf("ZDCMAPPING.cxx -> mod %d ch %d, ch %d, code %d det %d, sec %d\n",
- // i,adcMod[i],adcCh[i],sigCode[i],det[i],sec[i]);
- }
fclose(mapFile4Shuttle);
} // SOD event
else{
iev++;
}
- /* free resources */
- free(event);
+ /* free resources */
+ //free(event);
}
/* store the result files on FES */