]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONPadStatusMaker.cxx
New CE DA ... (Jens)
[u/mrichter/AliRoot.git] / MUON / AliMUONPadStatusMaker.cxx
index 6ebb8db7de87f3abe224bc47d9180fb13450c95c..59d4c9fa61a1d9f0a8c1e5b7f7c43be7fe588134 100644 (file)
 
 #include "AliMUONPadStatusMaker.h"
 
-#include "AliQA.h"
-
 #include "AliMUON2DMap.h"
 #include "AliMUON2DStoreValidator.h"
 #include "AliMUONCalibParamNI.h"
 #include "AliMUONCalibrationData.h"
+#include "AliMUONLogger.h"
+#include "AliMUONRecoParam.h"
 #include "AliMUONStringIntMap.h"
+#include "AliMUONTrackerData.h"
 #include "AliMUONVCalibParam.h"
-#include "AliMUONVTrackerData.h"
 
 #include "AliMpArea.h"
 #include "AliMpArrayI.h"
+#include "AliMpCDB.h"
 #include "AliMpConstants.h"
 #include "AliMpDDLStore.h"
 #include "AliMpDEManager.h"
 #include "AliMpDetElement.h"
 #include "AliMpDCSNamer.h"
+#include "AliMpManuIterator.h"
 #include "AliMpManuUID.h"
 
 #include "AliCDBEntry.h"
@@ -67,92 +69,44 @@ ClassImp(AliMUONPadStatusMaker)
 
 //_____________________________________________________________________________
 AliMUONPadStatusMaker::AliMUONPadStatusMaker(const AliMUONCalibrationData& calibData)
-: fCalibrationData(calibData),
+: fkCalibrationData(calibData),
 fGainA1Limits(0,1E30),
 fGainA2Limits(-1E-30,1E30),
 fGainThresLimits(0,4095),
-fHVSt12Limits(0,5000),
-fHVSt345Limits(0,5000),
 fPedMeanLimits(0,4095),
 fPedSigmaLimits(0,4095),
-fManuOccupancyLimits(0,0.1),
+fManuOccupancyLimits(0,1.0),
+fBuspatchOccupancyLimits(0,1.0),
+fDEOccupancyLimits(0,1.0),
 fStatus(new AliMUON2DMap(true)),
-fHV(new TExMap),
+fHV(0x0),
 fPedestals(calibData.Pedestals()),
 fGains(calibData.Gains()),
 fTrackerData(0x0)
 {
   /// ctor
-  AliDebug(1,Form("ped store %s gain store %s",
-                  fPedestals->ClassName(),
-                  fGains->ClassName()));
-  
-  TString qaFileName(AliQA::GetQADataFileName("MUON",calibData.RunNumber()));
-  
-  // search the QA file in memory first.
-  TFile* f = static_cast<TFile*>(gROOT->GetListOfFiles()->FindObject(qaFileName.Data()));
-
-  if (!f)
+  if ( calibData.OccupancyMap() )
   {
-    // then tries to open it
-    if ( gSystem->AccessPathName(qaFileName.Data()) == kFALSE ) 
-    {
-      f = TFile::Open(qaFileName.Data());
-      if ( f )
-      {
-        AliDebug(1,Form("Got %s from disk",qaFileName.Data()));
-      }
-    }
-  }
-  else
+    /// create a tracker data from the occupancy map
+    fTrackerData = new AliMUONTrackerData("OCC","OCC",*(calibData.OccupancyMap()));
+  }     
+  if ( calibData.HV() )
   {
-    AliDebug(1,Form("Got %s from memory",qaFileName.Data()));
+    /// Only create the fHV internal store if there are some HV values available
+    fHV = new TExMap;
   }
   
-  if (f)
-  {
-    TDirectory* d = gDirectory;
-    
-    f->cd("MUON/Raws");
-    
-    TIter next(gDirectory->GetListOfKeys());
-    TKey* key;
-    
-    while ( ( key = static_cast<TKey*>(next()) ) && !fTrackerData )
-    {
-      TString name(key->GetName());
-      
-      if ( name.Contains("CALZ") )
-      {
-        fTrackerData = dynamic_cast<AliMUONVTrackerData*>(key->ReadObj());
-      }
-      
-    }
-    
-    gDirectory = d;
-    
-    if ( fTrackerData ) 
-    {
-      AliInfo(Form("Will make a cut on MANU occupancy from TrackerData=%s",fTrackerData->GetName()));
-    }
-    else
-    {
-      AliWarning(Form("Found a QA file = %s, but could not get the expected TrackerData in there... (probably not a serious problem though)",
-                      f->GetName()));
-    }
-  }
-  else
-  {
-    AliWarning("Did not find QA file, so will not use manu occupancy as a criteria");
-  }
+  SetHVLimit(-1,0.0);
 }
 
 //_____________________________________________________________________________
 AliMUONPadStatusMaker::~AliMUONPadStatusMaker()
 {
   /// dtor.
   delete fStatus;
   delete fHV;
+  delete fTrackerData;
 }
 
 //_____________________________________________________________________________
@@ -161,12 +115,17 @@ AliMUONPadStatusMaker::AsString(Int_t status)
 {
   /// return a human readable version of the integer status
   
+  if ( status == 0 ) 
+  {
+    return "Brave New World";
+  }
+  
   Int_t pedStatus;
   Int_t gainStatus;
   Int_t hvStatus;
-  Int_t otherStatus;
+  Int_t occStatus;
   
-  DecodeStatus(status,pedStatus,hvStatus,gainStatus,otherStatus);
+  DecodeStatus(status,pedStatus,hvStatus,gainStatus,occStatus);
   
   TString s;
   
@@ -192,8 +151,12 @@ AliMUONPadStatusMaker::AsString(Int_t status)
        if ( hvStatus & kHVSwitchOFF ) s+="& HV has switch OFF ";
        if ( hvStatus & kHVMissing ) s+="& HV is missing ";
 
-  if ( otherStatus & kManuOccupancyTooHigh ) s+="& manu occupancy too high ";
-  if ( otherStatus & kManuOccupancyTooLow ) s+="& manu occupancy too low ";
+  if ( occStatus & kManuOccupancyTooHigh ) s+="& manu occupancy too high ";
+  if ( occStatus & kManuOccupancyTooLow ) s+="& manu occupancy too low ";
+  if ( occStatus & kBusPatchOccupancyTooHigh ) s+="& bus patch occupancy too high ";
+  if ( occStatus & kBusPatchOccupancyTooLow ) s+="& bus patch occupancy too low ";
+  if ( occStatus & kDEOccupancyTooHigh ) s+="& DE occupancy too high ";
+  if ( occStatus & kDEOccupancyTooLow ) s+="& DE occupancy too low ";
   
   if ( s[0] == '&' ) s[0] = ' ';
   
@@ -218,13 +181,13 @@ Int_t
 AliMUONPadStatusMaker::BuildStatus(Int_t pedStatus, 
                                    Int_t hvStatus, 
                                    Int_t gainStatus,
-                                   Int_t otherStatus)
+                                   Int_t occStatus)
 {
   /// Build a complete status from specific parts (ped,hv,gain)
   
   return ( hvStatus & 0xFF ) | ( ( pedStatus & 0xFF ) << 8 ) | 
   ( ( gainStatus & 0xFF ) << 16 ) |
-  ( ( otherStatus & 0xFF ) << 24 ) ;
+  ( ( occStatus & 0xFF ) << 24 ) ;
 }
 
 //_____________________________________________________________________________
@@ -233,11 +196,11 @@ AliMUONPadStatusMaker::DecodeStatus(Int_t status,
                                     Int_t& pedStatus, 
                                     Int_t& hvStatus, 
                                     Int_t& gainStatus,
-                                    Int_t& otherStatus)
+                                    Int_t& occStatus)
 {
   /// Decode complete status into specific parts (ped,hv,gain)
   
-  otherStatus = ( status & 0xFF000000 ) >> 24;
+  occStatus = ( status & 0xFF000000 ) >> 24;
   gainStatus = ( status & 0xFF0000 ) >> 16;
   pedStatus = ( status & 0xFF00 ) >> 8;
   hvStatus = (status & 0xFF);
@@ -256,18 +219,22 @@ AliMUONPadStatusMaker::HVSt12Status(Int_t detElemId, Int_t sector,
   /// and the switch).
   /// Returns false if hv switch changed during the run.
   
-  AliCodeTimerAuto("")
+  AliCodeTimerAuto("",0)
+  
+  if (!fHV) return kFALSE;
   
   Bool_t error = kFALSE;
   hvChannelTooLow = kFALSE;
   hvChannelTooHigh = kFALSE;
   hvChannelON = kTRUE;
 
+  Int_t chamberId = AliMpDEManager::GetChamberId(detElemId);
+  
   AliMpDCSNamer hvNamer("TRACKER");
   
   TString hvChannel(hvNamer.DCSChannelName(detElemId,sector));
   
-  TMap* hvMap = fCalibrationData.HV();
+  TMap* hvMap = fkCalibrationData.HV();
   TPair* hvPair = static_cast<TPair*>(hvMap->FindObject(hvChannel.Data()));
   if (!hvPair)
   {
@@ -285,9 +252,8 @@ AliMUONPadStatusMaker::HVSt12Status(Int_t detElemId, Int_t sector,
     }
     else
     {
-      // find out min and max value, and makes a cut
+      // find out min value, and makes a cut
       Float_t hvMin(1E9);
-      Float_t hvMax(0);
       TIter next(values);
       AliDCSValue* val;
       
@@ -295,21 +261,61 @@ AliMUONPadStatusMaker::HVSt12Status(Int_t detElemId, Int_t sector,
       {
         Float_t hv = val->GetFloat();
         hvMin = TMath::Min(hv,hvMin);
-        hvMax = TMath::Max(hv,hvMax);
       }
       
-      float lowThreshold = fHVSt12Limits.X();
-      float highThreshold = fHVSt12Limits.Y();
+      float lowThreshold = HVLimit(chamberId);
             
       if ( hvMin < lowThreshold ) hvChannelTooLow = kTRUE;
-      if ( hvMax > highThreshold ) hvChannelTooHigh = kTRUE;
-      if ( hvMin < 1 ) hvChannelON = kFALSE;
+      if ( hvMin < hvNamer.TrackerHVOFF() ) hvChannelON = kFALSE;
     }
   }
   
   return error;
 }
 
+//_____________________________________________________________________________
+Float_t
+AliMUONPadStatusMaker::SwitchValue(const TObjArray& dcsArray)
+{
+  /// Loop over the dcs value for a single switch to decide whether
+  /// we should consider it on or off
+  
+  // we'll count the number of ON/OFF for this pad, to insure
+  // consistency (i.e. if status changed during the run, we should
+  // at least notify this fact ;-) and hope it's not the norm)
+  Int_t nTrue(0);
+  Int_t nFalse(0);
+  TIter next(&dcsArray);
+  AliDCSValue* val;
+  
+  while ( ( val = static_cast<AliDCSValue*>(next()) ) )
+  {
+    if ( val->GetBool() )
+    {
+      ++nTrue;
+    }
+    else
+    {
+      ++nFalse;
+    }
+  }
+  
+  if ( (nTrue>0 && nFalse>0) )
+  {
+    // change of state during the run, consider it off
+    return 0.0;
+  }
+  
+  if ( nFalse ) 
+  {
+    /// switch = FALSE means the HV was flowding up to the PCB.
+    /// i.e. switch = FALSE = ON
+    return 1.0;    
+  }
+  
+  return 0.0;
+}
+
 //_____________________________________________________________________________
 Bool_t 
 AliMUONPadStatusMaker::HVSt345Status(Int_t detElemId, Int_t pcbIndex,
@@ -323,7 +329,9 @@ AliMUONPadStatusMaker::HVSt345Status(Int_t detElemId, Int_t pcbIndex,
   /// Returns false if something goes wrong (in particular if 
   /// hv switch changed during the run).
   
-  AliCodeTimerAuto("")
+  AliCodeTimerAuto("",0)
+  
+  if (!fHV) return kFALSE;
   
   Bool_t error = kFALSE;
   hvChannelTooLow = kFALSE;
@@ -333,9 +341,11 @@ AliMUONPadStatusMaker::HVSt345Status(Int_t detElemId, Int_t pcbIndex,
   
   AliMpDCSNamer hvNamer("TRACKER");
   
+  Int_t chamberId = AliMpDEManager::GetChamberId(detElemId);
+  
   TString hvChannel(hvNamer.DCSChannelName(detElemId));
   
-  TMap* hvMap = fCalibrationData.HV();
+  TMap* hvMap = fkCalibrationData.HV();
   
   TPair* hvPair = static_cast<TPair*>(hvMap->FindObject(hvChannel.Data()));
   if (!hvPair)
@@ -354,9 +364,8 @@ AliMUONPadStatusMaker::HVSt345Status(Int_t detElemId, Int_t pcbIndex,
     }
     else
     {
-      // find out min and max value, and makes a cut
+      // find out min value, and makes a cut
       Float_t hvMin(1E9);
-      Float_t hvMax(0);
       TIter next(values);
       AliDCSValue* val;
       
@@ -364,15 +373,12 @@ AliMUONPadStatusMaker::HVSt345Status(Int_t detElemId, Int_t pcbIndex,
       {
         Float_t hv = val->GetFloat();
         hvMin = TMath::Min(hv,hvMin);
-        hvMax = TMath::Max(hv,hvMax);
       }
 
-      float lowThreshold = fHVSt345Limits.X();
-      float highThreshold = fHVSt345Limits.Y();
+      float lowThreshold = HVLimit(chamberId);
 
       if ( hvMin < lowThreshold ) hvChannelTooLow = kTRUE;
-      else if ( hvMax > highThreshold ) hvChannelTooHigh = kTRUE;
-      if ( hvMin < 1 ) hvChannelON = kFALSE;
+      if ( hvMin < hvNamer.TrackerHVOFF() ) hvChannelON = kFALSE;
     }
   }
   
@@ -394,34 +400,8 @@ AliMUONPadStatusMaker::HVSt345Status(Int_t detElemId, Int_t pcbIndex,
     }
     else
     {
-      // we'll count the number of ON/OFF for this pad, to insure
-      // consistency (i.e. if status changed during the run, we should
-      // at least notify this fact ;-) and hope it's not the norm)
-      Int_t nTrue(0);
-      Int_t nFalse(0);
-      TIter next(values);
-      AliDCSValue* val;
-      
-      while ( ( val = static_cast<AliDCSValue*>(next()) ) )
-      {
-        if ( val->GetBool() )
-        {
-          ++nTrue;
-        }
-        else
-        {
-          ++nFalse;
-        }
-      }
-      
-      if ( (nTrue>0 && nFalse>0) )
-      {
-        AliWarning(Form("Status of HV Switch %s changed during this run nTrue=%d nFalse=%d! Will consider it OFF",
-                        hvSwitch.Data(),nTrue,nFalse));
-        error = kTRUE;
-      }
-      
-      if ( nFalse ) hvSwitchON = kFALSE;
+      Float_t sv = SwitchValue(*values);
+      if ( sv < 0.99 ) hvSwitchON = kFALSE;
     }
   }
   return error;
@@ -433,9 +413,9 @@ AliMUONPadStatusMaker::HVStatus(Int_t detElemId, Int_t manuId) const
 {
   /// Get HV status of one manu
   
-  AliCodeTimerAuto("")
+  AliCodeTimerAuto("",0)
   
-  if ( !fCalibrationData.HV() ) return kMissing;
+  if ( !fHV ) return kMissing;
 
   Long_t lint = fHV->GetValue(AliMpManuUID::BuildUniqueID(detElemId,manuId));
   
@@ -450,8 +430,7 @@ AliMUONPadStatusMaker::HVStatus(Int_t detElemId, Int_t manuId) const
   
   switch ( AliMpDEManager::GetStationType(detElemId) )
   {
-    case AliMp::kStation1:
-    case AliMp::kStation2:
+    case AliMp::kStation12:
     {
       int sector = hvNamer.ManuId2Sector(detElemId,manuId);
       if ( sector >= 0 ) 
@@ -501,7 +480,7 @@ AliMUONVCalibParam*
 AliMUONPadStatusMaker::Neighbours(Int_t detElemId, Int_t manuId) const
 {
   /// Get the neighbours parameters for a given manu
-  AliMUONVStore* neighbourStore = fCalibrationData.Neighbours();
+  AliMUONVStore* neighbourStore = fkCalibrationData.Neighbours();
   return static_cast<AliMUONVCalibParam*>(neighbourStore->FindObject(detElemId,manuId));
 }
 
@@ -510,7 +489,7 @@ AliMUONVStore*
 AliMUONPadStatusMaker::NeighboursStore() const
 {
   /// Return the store containing all the neighbours
-  return fCalibrationData.Neighbours();
+  return fkCalibrationData.Neighbours();
 }
 
 //_____________________________________________________________________________
@@ -529,7 +508,7 @@ AliMUONPadStatusMaker::ComputeStatus(Int_t detElemId, Int_t manuId) const
   
   Int_t hvStatus = HVStatus(detElemId,manuId);
 
-  Int_t otherStatus = OtherStatus(detElemId,manuId);
+  Int_t occStatus = OccupancyStatus(detElemId,manuId);
   
   for ( Int_t manuChannel = 0; manuChannel < param->Size(); ++manuChannel )
   {
@@ -569,8 +548,8 @@ AliMUONPadStatusMaker::ComputeStatus(Int_t detElemId, Int_t manuId) const
     {
       gainStatus = kGainMissing;
     }
-        
-    Int_t status = BuildStatus(pedStatus,hvStatus,gainStatus,otherStatus);
+    
+    Int_t status = BuildStatus(pedStatus,hvStatus,gainStatus,occStatus);
       
     param->SetValueAsIntFast(manuChannel,0,status);
   }
@@ -580,22 +559,52 @@ AliMUONPadStatusMaker::ComputeStatus(Int_t detElemId, Int_t manuId) const
 
 //_____________________________________________________________________________
 Int_t 
-AliMUONPadStatusMaker::OtherStatus(Int_t detElemId, Int_t manuId) const
+AliMUONPadStatusMaker::OccupancyStatus(Int_t detElemId, Int_t manuId) const
 {
   /// Get the "other" status for a given manu
+  Int_t rv(0);
+  
   if ( fTrackerData ) 
   {
-    Double_t occ = fTrackerData->Manu(detElemId,manuId,2);
-    if ( occ < fManuOccupancyLimits.X() )
+    const Int_t occIndex = 2;
+    
+    Double_t occ = fTrackerData->DetectionElement(detElemId,occIndex);
+    
+    if ( occ <= fDEOccupancyLimits.X() )
+    {
+      rv |= kDEOccupancyTooLow;
+    } 
+    else if ( occ > fDEOccupancyLimits.Y() )
     {
-      return kManuOccupancyTooLow;
+      rv |= kDEOccupancyTooHigh;
     }
-    if ( occ > fManuOccupancyLimits.Y() )
+    
+    Int_t busPatchId = AliMpDDLStore::Instance()->GetBusPatchId(detElemId,manuId);
+    
+    occ = fTrackerData->BusPatch(busPatchId,occIndex);
+
+    if ( occ <= fBuspatchOccupancyLimits.X() )
     {
-      return kManuOccupancyTooHigh;
+      rv |= kBusPatchOccupancyTooLow;
+    } 
+    else if ( occ > fBuspatchOccupancyLimits.Y() )
+    {
+      rv |= kBusPatchOccupancyTooHigh;
+    }
+    
+    occ = fTrackerData->Manu(detElemId,manuId,occIndex);
+    
+    if ( occ <= fManuOccupancyLimits.X() )
+    {
+      rv |= kManuOccupancyTooLow;
+    } 
+    else if ( occ > fManuOccupancyLimits.Y() )
+    {
+      rv |= kManuOccupancyTooHigh;
     }
   }
-  return 0;
+  return rv;
 }
 
 //_____________________________________________________________________________
@@ -608,7 +617,7 @@ AliMUONPadStatusMaker::PadStatus(Int_t detElemId, Int_t manuId) const
   if (!param)
   {
     // not already there, so compute it now
-    AliCodeTimerAuto("ComputeStatus");
+    AliCodeTimerAuto("ComputeStatus",0);
     param = ComputeStatus(detElemId,manuId);
   }
   return param;
@@ -636,7 +645,7 @@ AliMUONPadStatusMaker::SetHVStatus(Int_t detElemId, Int_t index, Int_t status) c
   /// Assign status to all manus in a given HV "zone" (defined by index, meaning
   /// is different thing from St12 and St345)
   
-  AliCodeTimerAuto("")
+  AliCodeTimerAuto("",0)
   
   AliMpDetElement* de = AliMpDDLStore::Instance()->GetDetElement(detElemId);
   
@@ -648,3 +657,123 @@ AliMUONPadStatusMaker::SetHVStatus(Int_t detElemId, Int_t index, Int_t status) c
     fHV->Add(AliMpManuUID::BuildUniqueID(detElemId,manuId),status + 1);
   }
 }
+
+//_____________________________________________________________________________
+Double_t
+AliMUONPadStatusMaker::HVLimit(Int_t chamberId) const
+{
+  /// Get HV limit for a given chamber
+  if ( chamberId >=0 && chamberId < 10 ) 
+  {
+    return fHVLimit[chamberId];
+  }
+  return 0.0;
+}
+
+//_____________________________________________________________________________
+void
+AliMUONPadStatusMaker::SetHVLimit(Int_t chamberId, Double_t hv) 
+{
+  /// Set hv limit for a given chamber (or all if chamberId==-1)
+  
+  if ( chamberId == -1 ) 
+  {
+    for ( Int_t i = 0; i < 10; ++i ) 
+    {
+      fHVLimit[i] = hv;
+    }
+  }
+  else if ( chamberId >= 0 && chamberId < 10 ) 
+  {
+    fHVLimit[chamberId]=hv;
+  }
+  else
+  {
+    AliError(Form("chamberId=%d is invalid",chamberId));
+  }
+}
+
+//_____________________________________________________________________________
+void
+AliMUONPadStatusMaker::SetLimits(const AliMUONRecoParam& recoParams) 
+{
+  /// Set the limits from the recoparam
+  
+  for ( int i = 0; i < 10; ++i )
+  {
+    SetHVLimit(i,recoParams.HVLimit(i));
+  }
+  
+  SetPedMeanLimits(recoParams.PedMeanLowLimit(),recoParams.PedMeanHighLimit());
+  SetPedSigmaLimits(recoParams.PedSigmaLowLimit(),recoParams.PedSigmaHighLimit());
+  
+  SetGainA1Limits(recoParams.GainA1LowLimit(),recoParams.GainA1HighLimit());
+  SetGainA2Limits(recoParams.GainA2LowLimit(),recoParams.GainA2HighLimit());
+  SetGainThresLimits(recoParams.GainThresLowLimit(),recoParams.GainThresHighLimit());
+  
+  SetManuOccupancyLimits(recoParams.ManuOccupancyLowLimit(),recoParams.ManuOccupancyHighLimit());
+  SetBuspatchOccupancyLimits(recoParams.BuspatchOccupancyLowLimit(),recoParams.BuspatchOccupancyHighLimit());
+  SetDEOccupancyLimits(recoParams.DEOccupancyLowLimit(),recoParams.DEOccupancyHighLimit());  
+}
+
+//_____________________________________________________________________________
+void 
+AliMUONPadStatusMaker::Report(UInt_t mask)
+{
+  /// Report the number of bad pads, according to the mask,
+  /// and the various reasons why they are bad (with occurence rates)
+  
+  AliInfo("");
+  AliCodeTimerAuto("",0);
+
+  AliMUONLogger log(1064008);
+  
+  Int_t nBadPads(0);
+  Int_t nPads(0);
+  
+  AliMpManuIterator it;
+  
+  Int_t detElemId, manuId;
+  
+  while ( it.Next(detElemId,manuId) )
+  {
+    AliMpDetElement* de = AliMpDDLStore::Instance()->GetDetElement(detElemId);
+    
+    for ( Int_t i = 0; i < AliMpConstants::ManuNofChannels(); ++i )
+    {
+      if ( de->IsConnectedChannel(manuId,i) ) 
+      {
+        ++nPads;
+        
+        Int_t status = PadStatus(detElemId,manuId,i);          
+        
+        if ( mask && ( status & mask) ) // note that if mask == 0, all pads are good...
+        {
+          ++nBadPads;
+          log.Log(AsString(status));
+        }
+      }
+    }
+  }
+  
+  if (!nPads) 
+  {
+    AliError("Got no pad from the iterator ?! That's not normal. Please check !");
+    return;
+  }
+  
+  TString msg;
+  Int_t ntimes;
+  
+  cout << Form("According to mask %x (human readable form below) %6d pads are bad (over a total of %6d, i.e. %7.2f %%)",
+               mask,nBadPads,nPads,nPads ? nBadPads*100.0/nPads : 0.0) << endl;
+  cout << AliMUONPadStatusMaker::AsCondition(mask) << endl;
+  cout << "--------" << endl;
+  
+  while ( log.Next(msg,ntimes) )
+  {
+    cout << Form("The message (%120s) occured %15d times (%7.4f %%)",msg.Data(),ntimes,ntimes*100.0/nPads) << endl;
+  }
+  
+}
+