+
+//_____________________________________________________________________________
+void
+AliMUONPadStatusMaker::SetLimits(const AliMUONRecoParam& recoParams)
+{
+ /// Set the limits from the recoparam
+
+ SetHVSt12Limits(recoParams.HVSt12LowLimit(),recoParams.HVSt12HighLimit());
+ SetHVSt345Limits(recoParams.HVSt345LowLimit(),recoParams.HVSt345HighLimit());
+
+ 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("");
+
+ 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 ( ( status & mask) || (!mask && status) )
+ {
+ ++nBadPads;
+ log.Log(AsString(status));
+ }
+ }
+ }
+ }
+
+ 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;
+ }
+
+}
+