]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Replacing some AliWarning by AliMUONLog to get a report at the end of the processing...
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Mar 2007 17:17:15 +0000 (17:17 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Mar 2007 17:17:15 +0000 (17:17 +0000)
MUON/AliMUONDigitCalibrator.cxx
MUON/AliMUONDigitCalibrator.h

index 647fc92ee6b85d0978c9a84aa45e5d6ec9cf7920..1e2d8ec623480afaf9513e7e58983fc0e1206656 100644 (file)
@@ -22,6 +22,7 @@
 #include "AliMUONConstants.h"
 #include "AliMUONData.h"
 #include "AliMUONDigit.h"
+#include "AliMUONLogger.h"
 #include "AliMUONPadStatusMaker.h"
 #include "AliMUONPadStatusMapMaker.h"
 #include "AliMUONV2DStore.h"
@@ -57,12 +58,15 @@ AliMUONDigitCalibrator::AliMUONDigitCalibrator(AliMUONData* muonData,
 : TTask("AliMUONDigitCalibrator","Raw digit calibration"),
   fData(muonData),
   fCalibrationData(calib),
-  fStatusMap(0x0)
+  fStatusMap(0x0),
+  fLogger(new AliMUONLogger(1000))
 {
     /// ctor. This class needs the muonData to get access to the digit,
     /// and the calibrationData to get access to calibration parameters.
     
-    if (!calib) throw;
+    if (!calib) {
+      AliFatal("No calibration data defined");
+    }   
     
     if (createAndUseStatusMap) 
     {
@@ -78,12 +82,17 @@ AliMUONDigitCalibrator::AliMUONDigitCalibrator(AliMUONData* muonData,
       maker.SetPedSigmaLimits(0.1,3);
       
       // From this set of limits, compute the status of all tracker pads.
-      AliMUONV2DStore* status = maker.MakeStatus();
+      AliMUONV2DStore* status = maker.MakeStatus();      
+      // we do not check that status is != 0x0, as this is supposed to be
+      // the responsability of the padStatusMaker.
       
       AliMUONPadStatusMapMaker mapMaker;
       
-      Int_t mask(0x8000000); 
-      //FIXME: fake one (consider dead only if ped mean too high or hv switch off)
+      Int_t mask(0x8080); 
+      //FIXME: kind of fake one for the moment, we consider dead only 
+      // if ped and/or hv value missing.
+      //WARNING : getting this mask wrong is a very effective way of getting
+      //no digits at all out of this class ;-)
       
       fStatusMap = mapMaker.MakePadStatusMap(*status,mask);
       
@@ -101,6 +110,11 @@ AliMUONDigitCalibrator::~AliMUONDigitCalibrator()
 {
   /// dtor.
   delete fStatusMap;
+  
+  AliInfo("Summary of messages:");
+  fLogger->Print();
+
+  delete fLogger;
 }
 
 //_____________________________________________________________________________
@@ -129,8 +143,9 @@ AliMUONDigitCalibrator::Exec(Option_t*)
       if ( ( statusMap & AliMUONPadStatusMapMaker::SelfDeadMask() ) != 0 ) // pad itself is bad (not testing its neighbours at this stage)
       {
         digit->SetSignal(0);
-        AliWarning(Form("Channel detElemId %d manuId %d "
-                        "manuChannel %d is bad %x",digit->DetElemId(),digit->ManuId(),
+        fLogger->Log(Form("%s:%d:Channel detElemId %d manuId %d "
+                        "manuChannel %d is bad %x",__FILE__,__LINE__,
+                          digit->DetElemId(),digit->ManuId(),
                         digit->ManuChannel(),digit->StatusMap()));
         continue;
       }
index 19fbb0b6505377dd2296aaf1404344cdab2dd220..13d0a06e5baf3a59d0a551faa16bfbd5ecc27aa3 100644 (file)
@@ -18,6 +18,7 @@
 
 class AliMUONCalibrationData;
 class AliMUONData;
+class AliMUONLogger;
 class AliMUONV2DStore;
 
 class AliMUONDigitCalibrator : public TTask
@@ -37,6 +38,7 @@ private:
     AliMUONData* fData;                       //!< MUON data 
     AliMUONCalibrationData* fCalibrationData; //!< Calibration data
     AliMUONV2DStore* fStatusMap; //!< Channel status map
+    AliMUONLogger* fLogger; //!< to log repeated messages
     
   ClassDef(AliMUONDigitCalibrator,2) // Calibrate raw digit
 };