* 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"
//__________________________________________________________________________
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);
/* 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;
/* 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;
/* 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;
/* 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++)
/* 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++)