]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONTriggerSubprocessor.cxx
Go from pointer to ifstream to ifstream.
[u/mrichter/AliRoot.git] / MUON / AliMUONTriggerSubprocessor.cxx
index ed7d2cdfdc53d5e355e0aa5551207c3da99fd515..11ff1c5eee48c69c7aa36a87a794f362ae81cf3c 100644 (file)
@@ -40,6 +40,7 @@
 ///
 /// \author L. Aphecetche
 
+using std::ifstream;
 /// \cond CLASSIMP
 ClassImp(AliMUONTriggerSubprocessor)
 /// \endcond
@@ -84,7 +85,7 @@ AliMUONTriggerSubprocessor::GetFileName(const char* fid) const
 }
 
 //_____________________________________________________________________________
-void 
+Bool_t 
 AliMUONTriggerSubprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
 {
   /// When starting a new run, reads in the trigger online files.
@@ -114,7 +115,7 @@ AliMUONTriggerSubprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTi
   {
     Master()->Log("FATAL ERROR : DA does not seem to have been run !!!");
     Master()->Invalidate();
-    return;
+    return kFALSE;
   }
   
   // OK. We have an exportedFiles.dat file at hand.
@@ -128,12 +129,17 @@ AliMUONTriggerSubprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTi
   WhichFilesToRead(GetFileName("EXPORTED").Data(),
                    globalFile,regionalFile,localFile,lutFile);
   
+  if ((globalFile+regionalFile+localFile+lutFile) == 0) {
+    Master()->Log("No file(s) to be processed for this run. Exiting.");
+    return kTRUE;
+  }
+  
   delete fRegionalConfig; fRegionalConfig = 0x0;
   delete fLocalMasks; fLocalMasks = 0x0;
   delete fGlobalConfig; fGlobalConfig = 0x0;
   delete fLUT; fLUT = 0x0;
   
-  Master()->Log(Form("Reading trigger masks for Run %d startTime %ld endTime %ld",
+  Master()->Log(Form("Reading trigger masks for Run %d startTime %u endTime %u",
                      run,startTime,endTime));
     
   Int_t check = 
@@ -144,11 +150,13 @@ AliMUONTriggerSubprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTi
 
   if ( check ) 
   {
-    Master()->Log("Could not read some input file(s). Aborting");
+    Master()->Log("Could not read some input file(s). Exiting");
     Master()->Invalidate();
-    return;
+    return kFALSE;
   }
   
+  if ( regionalFile ) globalFile = kTRUE;
+
   if ( regionalFile ) fRegionalConfig = new AliMUONRegionalTriggerConfig();
   if ( localFile ) fLocalMasks = new AliMUON1DArray(AliMpConstants::TotalNofLocalBoards()+1);
   if ( globalFile )   fGlobalConfig   = new AliMUONGlobalCrateConfig();
@@ -175,7 +183,7 @@ AliMUONTriggerSubprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTi
   {
     fLUT = new AliMUONTriggerLut;
     
-    Master()->Log(Form("Reading trigger LUT for Run %d startTime %ld endTime %ld",
+    Master()->Log(Form("Reading trigger LUT for Run %d startTime %u endTime %u",
                        run,startTime,endTime));
   
     ok = tio.ReadLUT(GetFileName("LUT").Data(),*fLUT);
@@ -187,6 +195,7 @@ AliMUONTriggerSubprocessor::Initialize(Int_t run, UInt_t startTime, UInt_t endTi
       fLUT = 0x0;
     }
   }
+  return kTRUE;
 }
 
 //_____________________________________________________________________________