+ // accounting of channels
+
+ AliMpManuIterator it;
+
+ Int_t totalNumberOfChannels(0);
+ Int_t removedChannels(0);
+ Int_t badChannels(0);
+ Int_t badAndRemovedChannels(0);
+ Int_t badOrRemovedChannels(0);
+
+ Int_t detElemId, manuId;
+
+ while ( it.Next(detElemId,manuId) )
+ {
+ AliMpDetElement* de = AliMpDDLStore::Instance()->GetDetElement(detElemId);
+ for ( Int_t i = 0; i < AliMpConstants::ManuNofChannels(); ++i )
+ {
+ Int_t busPatchId = AliMpDDLStore::Instance()->GetBusPatchId(detElemId,manuId);
+
+ if ( de->IsConnectedChannel(manuId,i) )
+ {
+ ++totalNumberOfChannels;
+ Bool_t badBusPatch = ( buspatches.GetValue(busPatchId) == 0x0 );
+
+ if ( withStatusMap )
+ {
+ Bool_t badChannel = ( statusMapMaker->StatusMap(detElemId,manuId,i) & AliMUONPadStatusMapMaker::SelfDeadMask() != 0);
+ if ( badChannel ) ++badChannels;
+ if ( badBusPatch && badChannel ) ++badAndRemovedChannels;
+ if ( badBusPatch || badChannel ) ++badOrRemovedChannels;
+ }
+
+ if ( badBusPatch) ++removedChannels;
+ }
+ }
+ }
+