Raw data readable also if no SOR event (temporary solution)
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Jul 2008 18:34:07 +0000 (18:34 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 11 Jul 2008 18:34:07 +0000 (18:34 +0000)
ZDC/AliZDCChMap.cxx
ZDC/AliZDCRawStream.cxx

index 4622980..ba708f9 100644 (file)
@@ -104,9 +104,10 @@ void AliZDCChMap::Reset()
 void  AliZDCChMap::Print(Option_t *) const
 {
    // Printing of calibration object
-   printf("\n\n\t ******************* AliZDCChMap object *******************\n");
+   printf("\n\n\t ******************* AliZDCChMap object *******************\n\n");
    for(Int_t i=0; i<48; i++) 
-     printf("\n ADCmod. %d ch. %d -> detector %d sector %d\n",
+     printf(" ADCmod. %d ch. %d -> detector %d sector %d\n",
      fADCModule[i], fADCChannel[i],fDetector[i], fSector[i]);
+   printf("\n\n\t **********************************************************\n\n");
  
 } 
index 0f8e1a2..fea1e66 100644 (file)
@@ -26,6 +26,7 @@
 //                                                                          //
 ///////////////////////////////////////////////////////////////////////////////
 
+#include <TSystem.h>
 #include "AliZDCRawStream.h"
 #include "AliRawReader.h"
 #include "AliRawDataHeader.h"
@@ -457,8 +458,29 @@ Bool_t AliZDCRawStream::Next()
        
          // Checking if the channel map for the ADCs has been provided/read
          if(fMapADC[0][0]==-1){
-           printf("\t ATTENTION!!! No ADC mapping has been found/provided!!!\n");
-           return kFALSE;
+           // Temporary solution (to be changed!!!!)
+           //printf("\t ATTENTION!!! No ADC mapping has been found/provided!!!\n");
+           //return kFALSE;
+           char * mapFileName=gSystem->ExpandPathName("$ALICE_ROOT/ZDC/ShuttleInput/ZDCChMapping.dat");
+           FILE *file; 
+           Int_t ival[48][6];
+           if((file = fopen(mapFileName,"r")) != NULL){
+             for(Int_t j=0; j<48; j++){
+               for(Int_t k=0; k<6; k++){
+                 fscanf(file,"%d",&ival[j][k]);
+               }
+               fMapADC[j][0] = ival[j][1];
+               fMapADC[j][1] = ival[j][2];
+               fMapADC[j][2] = ival[j][3];
+               fMapADC[j][3] = ival[j][4];
+               fMapADC[j][4] = ival[j][5];
+              }
+           }
+           else{
+               printf("File %s not found\n",mapFileName);
+               return kFALSE;
+           }
+
          }
          //
          //printf("\n Reading map!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");