+ reader->Select("ZDC");
+ // --- Reading event header
+ //UInt_t evtype = reader->GetType();
+ //printf("\n\t ZDCEMDda -> ev. type %d\n",evtype);
+ //printf("\t ZDCEMDda -> 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;
+ Int_t adcMod[2*kNChannels], adcCh[2*kNChannels];
+ Int_t sigCode[2*kNChannels], det[2*kNChannels], sec[2*kNChannels];
+
+ if(eventT==START_OF_DATA){
+
+ 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()){
+ 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("ZDCEMDDA.cxx -> ch.%d mod %d, ch %d, code %d det %d, sec %d\n",
+ // ich,adcMod[ich],adcCh[ich],sigCode[ich],det[ich],sec[ich]);
+ ich++;
+ }
+ }
+ }
+ fclose(mapFile4Shuttle);
+ }//SOD event
+
+
+ if(eventT==PHYSICS_EVENT){
+ // --- Reading data header
+ reader->ReadHeader();