]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFRunParams.cxx
Adding using std::...
[u/mrichter/AliRoot.git] / TOF / AliTOFRunParams.cxx
index 68cbab5e3953f0c759b521a9ca5772a8a3327dec..e7fc0e2b79148da7ecd742d487ce5960955c3a0a 100644 (file)
@@ -41,7 +41,8 @@ AliTOFRunParams::AliTOFRunParams() :
   fNRuns(0),
   fRunNb(NULL),
   fRunFirstPoint(NULL),
-  fRunLastPoint(NULL)
+  fRunLastPoint(NULL),
+  fUseLHCClockPhase(kFALSE)
 {
   /*
    * default constructor
@@ -60,7 +61,8 @@ AliTOFRunParams::AliTOFRunParams(Int_t nPoints, Int_t nRuns) :
   fNRuns(nRuns),
   fRunNb(new UInt_t[nRuns]),
   fRunFirstPoint(new UInt_t[nRuns]),
-  fRunLastPoint(new UInt_t[nRuns])
+  fRunLastPoint(new UInt_t[nRuns]),
+  fUseLHCClockPhase(kFALSE)
 {
   /*
    * standard constructor
@@ -96,7 +98,8 @@ AliTOFRunParams::AliTOFRunParams(const AliTOFRunParams &source) :
   fNRuns(source.fNRuns),
   fRunNb(new UInt_t[source.fNRuns]),
   fRunFirstPoint(new UInt_t[source.fNRuns]),
-  fRunLastPoint(new UInt_t[source.fNRuns])
+  fRunLastPoint(new UInt_t[source.fNRuns]),
+  fUseLHCClockPhase(source.fUseLHCClockPhase)
 {
   /*
    * copy constructor
@@ -164,6 +167,8 @@ AliTOFRunParams::operator=(const AliTOFRunParams &source)
     fRunLastPoint[i] = source.fRunLastPoint[i];
   }
 
+  fUseLHCClockPhase = source.fUseLHCClockPhase;
+
   return *this;
 }
 
@@ -277,6 +282,7 @@ AliTOFRunParams::Average(Float_t *data, Int_t first, Int_t last)
     value += data[i];
     npt++;
   }
+  if (npt <= 0) return 0.;
   value /= npt;
   return value;