]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFcalibHisto.cxx
T corrections updated up to last runnning period LHC13g
[u/mrichter/AliRoot.git] / TOF / AliTOFcalibHisto.cxx
index c597e7ec8121baa9a506500251c57b8e228a48d7..26452c4e8935e7dec682b4f8cb3a94db6f4025dd 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*************************************************************************
- *
- * AliTOFcalibHisto - class to handle TOF calibration histograms,
- *                    map histograms and more
- *
- *
- * autors:   Roberto Preghenella (R+)
- * concacts: preghenella@bo.infn.it
- *
- *************************************************************************/
+/*
+// *
+// * AliTOFcalibHisto - class to handle TOF calibration histograms,
+// *                    map histograms and more
+// *
+// *
+// * autors:   Roberto Preghenella (R+)
+// * concacts: preghenella@bo.infn.it
+// *
+// *
 
 #include "AliTOFcalibHisto.h"
 #include "AliLog.h"
@@ -354,7 +354,7 @@ AliTOFcalibHisto::~AliTOFcalibHisto()
 //__________________________________________________________________________
 
 void 
-AliTOFcalibHisto::LoadHisto(TFile* file, TH1D **histo, const Char_t *name) 
+AliTOFcalibHisto::LoadHisto(TFile * const file, TH1D **histo, const Char_t *name) 
 {
   /* load histo */
   *histo = (TH1D *)file->Get(name);
@@ -421,8 +421,10 @@ AliTOFcalibHisto::LoadCalibHisto()
 
   /* open input file */
   TFile *fileIn = TFile::Open(GetCalibHistoFileName());
-  if (!fileIn || !fileIn->IsOpen())
+  if (!fileIn || !fileIn->IsOpen()) {
     AliFatal(Form("cannot open input file %s", GetCalibHistoFileName()));
+    return;
+  }
 
   /* set calib histo file */
   fgCalibHistoFile = fileIn;
@@ -450,8 +452,10 @@ AliTOFcalibHisto::LoadCalibPar()
 
   /* open input file */
   TFile *fileIn = TFile::Open(GetCalibParFileName());
-  if (!fileIn || !fileIn->IsOpen())
+  if (!fileIn || !fileIn->IsOpen()) {
     AliError(Form("cannot open input file %s", GetCalibParFileName()));
+    return;
+  }
 
   /* set calib par file */
   fgCalibParFile = fileIn;
@@ -477,8 +481,10 @@ AliTOFcalibHisto::LoadCalibStat()
 
   /* open input file */
   TFile *fileIn = TFile::Open(GetCalibStatFileName());
-  if (!fileIn || !fileIn->IsOpen())
+  if (!fileIn || !fileIn->IsOpen()) {
     AliError(Form("cannot open input file %s", GetCalibStatFileName()));
+    return;
+  }
 
   /* set calib par file */
   fgCalibStatFile = fileIn;
@@ -498,8 +504,10 @@ AliTOFcalibHisto::WriteCalibHisto()
 
   /* open output file */
   TFile *fileOut = TFile::Open(GetCalibHistoFileName(), "RECREATE");
-  if (!fileOut || !fileOut->IsOpen())
+  if (!fileOut || !fileOut->IsOpen()) {
     AliFatal(Form("cannot open output file %s", GetCalibHistoFileName()));
+    return;
+  }
 
   /* create consts */
   for (Int_t iConst = 0; iConst < kNcalibConsts; iConst++)
@@ -616,8 +624,10 @@ AliTOFcalibHisto::WriteCalibStat()
 
   /* open output file */
   TFile *fileOut = TFile::Open(GetCalibStatFileName(), "RECREATE");
-  if (!fileOut || !fileOut->IsOpen())
+  if (!fileOut || !fileOut->IsOpen()) {
     AliFatal(Form("cannot open output file %s", GetCalibStatFileName()));
+    return;
+  }
 
   /* create stats */
   for (Int_t iStat = 0; iStat < kNcalibStats; iStat++)