Protection added
authorcheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 15 Nov 2009 22:56:23 +0000 (22:56 +0000)
committercheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 15 Nov 2009 22:56:23 +0000 (22:56 +0000)
VZERO/VZEROda.cxx

index eee9917..551c004 100755 (executable)
@@ -208,8 +208,8 @@ int main(int argc, char **argv) {
           AliRawReader *rawReader = new AliRawReaderDate((void*)event);
   
           AliVZERORawStream* rawStream  = new AliVZERORawStream(rawReader); 
-          rawStream->Next();   
-           for(Int_t i=0; i<64; i++) {
+          if (rawStream.Next()) {      
+             for(Int_t i=0; i<64; i++) {
                Int_t nFlag = 0;
                for(Int_t j=kClockMin; j <= kClockMax; j++) {  // Check flags on clock range used for pedestal calculation
                   if((rawStream->GetBBFlag(i,j)) || (rawStream->GetBGFlag(i,j))) nFlag++; 
@@ -226,7 +226,8 @@ int main(int argc, char **argv) {
                    Float_t charge = (float)(rawStream->GetADC(i));   // Fill 64*2 ADCmax histograms 
                    hADCname[i + 64 * Integrator]->Fill(charge);
                }                          
-           }    
+             } 
+          }   
            delete rawStream;
            rawStream = 0x0;      
            delete rawReader;