]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Add a consistency check for the number of time bins
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Nov 2009 17:12:32 +0000 (17:12 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 11 Nov 2009 17:12:32 +0000 (17:12 +0000)
TRD/AliTRDclusterizer.cxx

index 9a4da8d4a45f043aa56f40b6aa09a8074a567b18..12221d9f4d1289d34310d79a23079ef9d5e0484b 100644 (file)
@@ -782,7 +782,6 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
     return kFALSE;
   }
 
-
   fMaxThresh            = fReconstructor->GetRecoParam()->GetClusMaxThresh();
   fSigThresh            = fReconstructor->GetRecoParam()->GetClusSigThresh();
   fMinMaxCutSigma       = fReconstructor->GetRecoParam()->GetMinMaxCutSigma();
@@ -796,7 +795,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
 
   fDet  = AliTRDgeometry::GetDetector(fLayer,istack,isector);
   if (fDet != det) {
-    AliError("Strange Detector number Missmatch!");
+    AliError("Strange Detector number mismatch!");
     return kFALSE;
   }
 
@@ -816,6 +815,12 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
   //Int_t nRowMax    = fDigits->GetNrow();
   fTimeTotal = fDigits->GetNtime();
 
+  // Check consistency between OCDB and raw data
+  if (fTimeTotal != calibration->GetNumberOfTimeBinsDCS()) {
+    AliError(Form("Number of timebins does not match OCDB value (raw:%d, OCDB:%d)"
+                ,fTimeTotal,calibration->GetNumberOfTimeBinsDCS()));
+  }
+
   // Detector wise calibration object for the gain factors
   const AliTRDCalDet *calGainFactorDet = calibration->GetGainFactorDet();
   // Calibration object with pad wise values for the gain factors