Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PlexSEIdAltL Class Reference

#include <PlexSEIdAltL.h>

List of all members.

Public Types

typedef PlexSEIdAltL::iterator PlexSEIdAltLIter
typedef PlexSEIdAltL::const_iterator PlexSEIdAltLConstIter
typedef enum PlexSEIdAltL::EErrorMasks ErrorMask_t
typedef enum PlexSEIdAltL::EFmtFlagBits FmtFlagBits_t
enum  EErrorMasks {
  kOkay = 0x0000, kBadDetector = 0x0001, kBadEnd = 0x0002, kBadPlane = 0x0004,
  kBadPlaneView = 0x0008, kUnchecked = 0x0010, kBadIsVeto = 0x0020
}
enum  EFmtFlagBits {
  fmt_Index = 0x0001, fmt_Cursor = 0x0002, fmt_Best = 0x0004, fmt_StripEnd = 0x0008,
  fmt_PixelSpot = 0x0010, fmt_Weight = 0x0020, fmt_PE = 0x0040, fmt_SigLin = 0x0080,
  fmt_SigCorr = 0x0100, fmt_Time = 0x0200
}

Public Member Functions

 PlexSEIdAltL ()
 PlexSEIdAltL (const PlexSEIdAltL &rhs)
virtual ~PlexSEIdAltL ()
void AddStripEndId (const PlexStripEndId &seid, const PlexPixelSpotId &spot, Float_t weight=0, const PlexCalib *calib=0, Int_t adc=0, Double_t time=0)
void ClearWeights ()
void DropCurrent ()
void DropZeroWeights ()
void KeepTopWeights (UInt_t n=2, Bool_t keeporder=kFALSE)
const PlexSEIdAltLItemGetBestItem () const
PlexSEIdAltLItemGetBestItem ()
PlexStripEndId GetBestSEId () const
Float_t GetBestWeight () const
const PlexSEIdAltLItemGetCurrentItem () const
PlexSEIdAltLItemGetCurrentItem ()
PlexStripEndId GetCurrentSEId () const
Float_t GetCurrentWeight () const
UShort_t GetDemuxVetoFlag () const
Bool_t IsVetoShield (Bool_t reportError=true) const
Detector::Detector_t GetDetector (Bool_t reportError=true) const
StripEnd::StripEnd_t GetEnd (Bool_t reportError=true) const
Int_t GetPlane (Bool_t reportError=true) const
PlaneView::PlaneView_t GetPlaneView (Bool_t reportError=true) const
Int_t GetError (Bool_t reportError=true) const
Bool_t SetToOppositeEnds (PlexSEIdAltL &that)
Int_t GetSize () const
Bool_t IsValid () const
void Next () const
void Previous () const
void SetFirst () const
void SetLast () const
void SetCurrentWeight (Float_t weight)
void AddToCurrentWeight (Float_t wgtadd)
void NormalizeWeights (Float_t wgtsum=1.0)
void SetDemuxVetoFlag (UShort_t flag)
UInt_t Size () const
void Push_Back (const PlexSEIdAltLItem &item)
void Print (Option_t *option="") const

Static Public Member Functions

void SetFmtFlag (const UInt_t fmtflg)
UInt_t GetFmtFlag ()

Private Member Functions

void TestConsistency (Bool_t reportError=true) const

Private Attributes

UShort_t fCurrent
UShort_t fDemuxVetoFlag
UShort_t fError

Static Private Attributes

UInt_t fgFmtFlag = 0

Friends

std::ostream & operator<< (std::ostream &os, const PlexSEIdAltL &alt)


Member Typedef Documentation

typedef enum PlexSEIdAltL::EErrorMasks PlexSEIdAltL::ErrorMask_t
 

typedef enum PlexSEIdAltL::EFmtFlagBits PlexSEIdAltL::FmtFlagBits_t
 

typedef PlexSEIdAltL::const_iterator PlexSEIdAltL::PlexSEIdAltLConstIter
 

Definition at line 41 of file PlexSEIdAltL.h.

Referenced by GetBestItem(), GetCurrentItem(), GetDetector(), GetEnd(), GetPlane(), GetPlaneView(), IsVetoShield(), and TestConsistency().

typedef PlexSEIdAltL::iterator PlexSEIdAltL::PlexSEIdAltLIter
 

Definition at line 40 of file PlexSEIdAltL.h.

Referenced by AddToCurrentWeight(), DropCurrent(), DropZeroWeights(), GetBestItem(), GetCurrentItem(), NormalizeWeights(), and SetCurrentWeight().


Member Enumeration Documentation

enum PlexSEIdAltL::EErrorMasks
 

Enumeration values:
kOkay 
kBadDetector 
kBadEnd 
kBadPlane 
kBadPlaneView 
kUnchecked 
kBadIsVeto 

Definition at line 96 of file PlexSEIdAltL.h.

00096                             {
00097       kOkay         = 0x0000,
00098       kBadDetector  = 0x0001,
00099       kBadEnd       = 0x0002,
00100       kBadPlane     = 0x0004,
00101       kBadPlaneView = 0x0008,
00102       kUnchecked    = 0x0010,
00103       kBadIsVeto    = 0x0020
00104    } ErrorMask_t;

enum PlexSEIdAltL::EFmtFlagBits
 

Enumeration values:
fmt_Index 
fmt_Cursor 
fmt_Best 
fmt_StripEnd 
fmt_PixelSpot 
fmt_Weight 
fmt_PE 
fmt_SigLin 
fmt_SigCorr 
fmt_Time 

Definition at line 106 of file PlexSEIdAltL.h.

00106                              {
00107      fmt_Index     = 0x0001,
00108      fmt_Cursor    = 0x0002,
00109      fmt_Best      = 0x0004,
00110      fmt_StripEnd  = 0x0008,
00111      fmt_PixelSpot = 0x0010,
00112      fmt_Weight    = 0x0020,
00113      fmt_PE        = 0x0040,
00114      fmt_SigLin    = 0x0080,
00115      fmt_SigCorr   = 0x0100,
00116      fmt_Time      = 0x0200
00117    } FmtFlagBits_t;


Constructor & Destructor Documentation

PlexSEIdAltL::PlexSEIdAltL  ) 
 

Definition at line 176 of file PlexSEIdAltL.cxx.

00177    : fCurrent(0), fDemuxVetoFlag(0), fError(kUnchecked)     
00178 {
00179    // Default constructor
00180 }

PlexSEIdAltL::PlexSEIdAltL const PlexSEIdAltL rhs  ) 
 

Definition at line 183 of file PlexSEIdAltL.cxx.

00184    : std::vector<PlexSEIdAltLItem>(),
00185      fCurrent(rhs.fCurrent), 
00186      fDemuxVetoFlag(rhs.fDemuxVetoFlag), 
00187      fError(kUnchecked)
00188 {
00189 
00190    // deep copy constructor
00191    for (unsigned int i=0; i<rhs.size(); ++i) {
00192       this->push_back(rhs[i]);
00193    }
00194 
00195 }

PlexSEIdAltL::~PlexSEIdAltL  )  [virtual]
 

Definition at line 198 of file PlexSEIdAltL.cxx.

00199 {
00200    // delete all the owned sub-objects
00201 }


Member Function Documentation

void PlexSEIdAltL::AddStripEndId const PlexStripEndId seid,
const PlexPixelSpotId spot,
Float_t  weight = 0,
const PlexCalib calib = 0,
Int_t  adc = 0,
Double_t  time = 0
 

Definition at line 219 of file PlexSEIdAltL.cxx.

References PlexCalib::CalibStripEnd(), fError, and PlexSEIdAltLItem::SetWeight().

Referenced by CheezyDisplay::AddStripEndId(), PlexusReroot::GetSEIdAltL(), Plexus::GetSEIdAltL(), AlgMCDigit::RunAlg(), and PlexValidate::TestAltL().

00223 {
00224    // add a new item to the list
00225 
00226    fError = kUnchecked;  // adding a new strip makes consistency unknown
00227 
00228    if (calib) {
00229       PlexSEIdAltLItem item = calib->CalibStripEnd(seid,spot,adc,time);
00230       item.SetWeight(weight);
00231       this->push_back(item);
00232    }
00233    else {
00234       PlexSEIdAltLItem item(seid,spot,weight);
00235       this->push_back(item);
00236    }
00237 }

void PlexSEIdAltL::AddToCurrentWeight Float_t  wgtadd  ) 
 

Definition at line 696 of file PlexSEIdAltL.cxx.

References IsValid(), and PlexSEIdAltLIter.

00697 {
00698    // add to the weight attached to the current PlexStripEndId
00699 
00700    if (!IsValid()) return; // no list or out of range
00701    PlexSEIdAltLIter cursor = this->begin() + fCurrent;
00702    (*cursor).AddToWeight(wgtadd);
00703 
00704 }

void PlexSEIdAltL::ClearWeights  ) 
 

Definition at line 340 of file PlexSEIdAltL.cxx.

References PlexSEIdAltLItem::SetWeight().

Referenced by AlgDeMuxBeam::ReconcileShowerAndMuonRegions(), AlgAltDeMuxBase::ReMuxPlane(), AlgMCDigit::RunAlg(), DmxMuonPlane::SetStrips(), DmxHypothesis::SetStrips(), and PlexValidate::TestAltL().

00341 {
00342    // set all the weights to zero
00343 
00344    PlexSEIdAltL& self = *this;
00345    for (unsigned int i=0; i<size(); i++) (self[i]).SetWeight(0.0);
00346 }

void PlexSEIdAltL::DropCurrent  ) 
 

Definition at line 240 of file PlexSEIdAltL.cxx.

References fCurrent, MSG, and PlexSEIdAltLIter.

Referenced by PlexValidate::TestAltL().

00241 {
00242    // Remove current item from the list.
00243    // Do not reset current position of iterator.
00244    // An iterative removal should start from Last() and use Previous().
00245 
00246    UShort_t n = size();
00247 
00248    if (n <= 0) return;  // one cannot drop what one doesn't have
00249    if (fCurrent>=n) {   
00250       MSG("Plex",Msg::kWarning)
00251          << "can not DropCurrent (fCurrent=" << fCurrent 
00252          << ") on a list of " << n << " items " << endl;
00253       return;
00254    }
00255 
00256    PlexSEIdAltLIter cursor = this->begin() + fCurrent;
00257    // delete the owned item
00258    this->erase(cursor);
00259 
00260 }

void PlexSEIdAltL::DropZeroWeights  ) 
 

Definition at line 263 of file PlexSEIdAltL.cxx.

References PlexSEIdAltLIter.

Referenced by AlgMCDigit::RunAlg(), AlgDeMuxDigitList::RunAlg(), and PlexValidate::TestAltL().

00264 {
00265    // Remove pairs from the list that have weight == 0
00266 
00267    if (size() <= 0) return;  // one cannot drop what one doesn't have
00268 
00269    // move all zero items to the end
00270    PlexSEIdAltLIter new_end = 
00271       remove_if(this->begin(), this->end(), 
00272                 mem_fun_ref(&PlexSEIdAltLItem::IsZeroWeight));
00273 
00274    // erase the moved items out of the array 
00275    this->erase(new_end,this->end());
00276 
00277 }

PlexSEIdAltLItem & PlexSEIdAltL::GetBestItem  ) 
 

Definition at line 389 of file PlexSEIdAltL.cxx.

References PlexSEIdAltLItem::GetWeight(), MSG, and PlexSEIdAltLIter.

00390 {
00391    // find the PlexSEIdAltLItem with the highest weight
00392 
00393    unsigned int thesize = size();
00394    if (thesize == 0) {
00395      static int msglimit = 25;  // limit the number of complaints
00396      if (msglimit) {
00397        // Empty lists generally happen because of raw channel id's
00398        // that don't map back to real strips (for instance due to
00399        // unused pixels on a tube being illuminated by crosstalk).
00400        // Complain a bit ... but then shut up.
00401        MSG("Plex",Msg::kWarning)
00402          << "can not GetBestItem() from an empty list" << endl;
00403        if (--msglimit == 0) 
00404          MSG("Plex",Msg::kWarning)
00405            << " ... last warning of this type" << endl;
00406      }
00407      return dummyPlexSEIdAltLItem;;
00408    }
00409    else if (thesize == 1) {
00410      // simple case of only one element
00411      return (*this)[0];
00412    }
00413    
00414    PlexSEIdAltLIter cursor = this->begin();
00415    PlexSEIdAltLIter best   = this->begin();
00416    Float_t wgt, maxwgt = -1.0e-37;
00417    while (cursor != this->end()) {
00418       PlexSEIdAltLItem& item = *cursor;
00419       if ( (wgt = item.GetWeight()) > maxwgt ) {
00420          maxwgt = wgt; best = cursor;
00421       }
00422       cursor++;
00423    }
00424    return *best;
00425       
00426 }

const PlexSEIdAltLItem & PlexSEIdAltL::GetBestItem  )  const
 

Definition at line 349 of file PlexSEIdAltL.cxx.

References PlexSEIdAltLItem::GetWeight(), MSG, and PlexSEIdAltLConstIter.

Referenced by MuCalFitterModule::Ana(), FCPCFilterModule::Ana(), AltDeMuxDisplay::Ana(), GfxTrack::BuildDiscreteImp(), GfxShower::BuildDiscreteImp(), GfxTrack::BuildRealImp(), GfxShower::BuildRealImp(), AltDeMuxCalc::CalcBestEast(), AltDeMuxCalc::CalcBestWest(), GfxDigitList::Configure(), TridModelMaker::CreateChannelModels(), TridModelMaker::CreatePmtModels(), TridModelMaker::CreateStripModels(), DemuxFast::DemuxHits(), GfxDigitList::DigitMasked(), AlgAltDeMuxBase::FinalReTagCrossTalk(), GetBestSEId(), GetBestWeight(), CandDigitHandle::GetCharge(), GfxDigitList::GetDigitColor(), GfxDigit::GetDiscreteCoords(), GfxDigit::GetRealCoords(), GfxDigit::GetRelativeValue(), CandDigitHandle::GetTime(), CandDigit::IsEquivalent(), AlgAltDeMuxBase::IsXTalk(), CalHelpers::KeyFromTime(), AlgStripSRList::MakeXtalkMap(), GfxDigit::ModifyCoords(), AlgAltDeMuxBase::PredictedSpotQ(), Print(), Coroner::RecordDeadStrips(), PmtPixels::Refresh(), AlgAltDeMuxBase::ReTagCrossTalk(), select_digit(), GfxDigit::SetColor(), AlgTrackSRList::SpectrometerTracking(), StripSRKeyFromTube(), EVD::UpdateChargeHists(), AlgAltDeMuxBase::UpdateXTalkMap(), and AlgAltDeMuxBase::XTalkPixelMap().

00350 {
00351    // find the PlexSEIdAltLItem with the highest weight (const version)
00352 
00353    unsigned int thesize = size();
00354    if (thesize == 0) {
00355      static int msglimit = 25;  // limit the number of complaints
00356      if (msglimit) {
00357        // Empty lists generally happen because of raw channel id's
00358        // that don't map back to real strips (for instance due to
00359        // unused pixels on a tube being illuminated by crosstalk).
00360        // Complain a bit ... but then shut up.
00361        MSG("Plex",Msg::kWarning)
00362          << "can not GetBestItem() from an empty list" << endl;
00363        if (--msglimit == 0) 
00364          MSG("Plex",Msg::kWarning)
00365            << " ... last warning of this type" << endl;
00366      }
00367      return dummyPlexSEIdAltLItem;;
00368    }
00369    else if (thesize == 1) {
00370      // simple case of only one element
00371      return (*this)[0];
00372    }
00373 
00374    PlexSEIdAltLConstIter cursor = this->begin();
00375    PlexSEIdAltLConstIter best   = this->begin();
00376    Float_t wgt, maxwgt = -1.0e-37;
00377    while (cursor != this->end()) {
00378       const PlexSEIdAltLItem& item = *cursor;
00379       if ( (wgt = item.GetWeight()) > maxwgt ) {
00380          maxwgt = wgt; best = cursor;
00381       }
00382       cursor++;
00383    }
00384    return *best;
00385       
00386 }

PlexStripEndId PlexSEIdAltL::GetBestSEId  )  const
 

Definition at line 429 of file PlexSEIdAltL.cxx.

References GetBestItem(), and PlexSEIdAltLItem::GetSEId().

Referenced by TridModelStrip::AddDigit(), TridModel::AddDigit(), TimeCalibratorSRModule::Ana(), ShieldPlankListModule::Ana(), RecoTreeModule::Ana(), PreFilter::Ana(), MuCalFitterModule::Ana(), MCAnalysis::Ana(), FitTrackMSListModule::Ana(), FCPCFilterModule::Ana(), DmxDeMuxModule::Ana(), DmxDeMuxCosmicsModule::Ana(), ChopModule::Ana(), AtNuTreeModule::Ana(), AltDeMuxModule::Ana(), AltDeMuxDisplay::Ana(), CheezyDisplay::BuildPolyMarker(), AlgAltDeMuxBase::CleanIsolatedHits(), DemoNPlaneCut::CountPlanes(), AlgAltDeMuxBase::DistanceToNearestInPlane(), ChopEvaluation::Evaluate(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), DmxDeMuxCosmicsModule::FindDigitsChiSq(), CalHelpers::GetBestEnd(), CalHelpers::GetBestStrip(), PreFilter::GetCDHTPos(), PreFilter::GetCDHZPos(), ChopHelper::GetChopHelp(), CDCrossTalker::GetCleanStripMap(), CandStripHandle::GetDemuxVetoFlag(), CDMapMaker::GetDigitMap(), DmxMuonPlane::GetTimingOffset(), DmxHypothesis::GetTimingOffset(), VaDigit::IsSameStrip(), DmxMuonPlane::PrintRecon(), OltEnds::Reco(), AlgDeMuxBeam::ReconcileShowerAndMuonRegions(), AlgStripSR::RunAlg(), AlgRmMu::RunAlg(), AlgFarDetStrip::RunAlg(), AlgChopListSharp2::RunAlg(), AlgStripSRList::RunAlgFar(), AlgStripSRList::RunAlgMixed(), AlgStripSRList::RunAlgNear(), PlexValidate::TestAltL(), HistPage::Update(), and Plexus::ValidateConsistency().

00430 {
00431    // find the PlexStripEndId with the highest weight and return by value
00432 
00433    return GetBestItem().GetSEId();
00434 
00435 }

Float_t PlexSEIdAltL::GetBestWeight  )  const
 

Definition at line 438 of file PlexSEIdAltL.cxx.

References GetBestItem(), and PlexSEIdAltLItem::GetWeight().

Referenced by PreFilter::Ana(), DmxDeMuxModule::Ana(), DmxDeMuxCosmicsModule::Ana(), AltDeMuxModule::Ana(), AltDeMuxDisplay::Ana(), CheezyDisplay::BuildPolyMarker(), AlgFitTrackCam::GenerateNDSpectStrips(), AlgTrackSRList::SpectrometerTracking(), and PlexValidate::TestAltL().

00439 {
00440    // find the highest weight
00441 
00442    return GetBestItem().GetWeight();
00443 
00444 }

PlexSEIdAltLItem & PlexSEIdAltL::GetCurrentItem  ) 
 

Definition at line 467 of file PlexSEIdAltL.cxx.

References IsValid(), MSG, and PlexSEIdAltLIter.

00468 {
00469    // return by value current PlexSEIdAltLItem
00470 
00471    if (!IsValid()) {
00472      if (size() <= 0) 
00473        MSG("Plex",Msg::kWarning)
00474          << "can not GetCurrentItem() from an empty list" << endl;
00475      else
00476        MSG("Plex",Msg::kWarning)
00477          << "can not GetCurrentItem() when !IsValid()" << endl;
00478      return dummyPlexSEIdAltLItem;;
00479    }
00480 
00481    PlexSEIdAltLIter cursor = this->begin() + fCurrent;
00482    return *cursor;
00483 
00484 }

const PlexSEIdAltLItem & PlexSEIdAltL::GetCurrentItem  )  const
 

Definition at line 447 of file PlexSEIdAltL.cxx.

References IsValid(), MSG, and PlexSEIdAltLConstIter.

Referenced by RateSummary::Ana(), AltDeMuxCalc::CalcEast(), AltDeMuxCalc::CalcWest(), AltDeMuxCalc::CurrentQ(), DemuxFast::DemuxHitE(), AlgAltDeMuxBase::DeMuxHitE(), DemuxFast::DemuxHitW(), AlgAltDeMuxBase::DeMuxHitW(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), GetCurrentSEId(), GetCurrentWeight(), LIPatternFinderFancy::IsLightInjectionTrash(), AlgAltDeMuxBase::IsXTalk(), AlgAltDeMuxBase::MakeAltListMap(), DemuxFast::MakeMap(), AlgAltDeMuxBase::MakePixelMap(), DemuxFast::Reco(), EVD::SetChargeRange(), Mint::UpdateDigitRanges(), and AlgAltDeMuxBase::XTalkCharge().

00448 {
00449    // return by value current PlexSEIdAltLItem (const version)
00450 
00451    if (!IsValid()) {
00452      if (size() <= 0) 
00453        MSG("Plex",Msg::kWarning)
00454          << "can not GetCurrentItem() from an empty list" << endl;
00455      else
00456        MSG("Plex",Msg::kWarning)
00457          << "can not GetCurrentItem() when !IsValid()" << endl;
00458      return dummyPlexSEIdAltLItem;;
00459    }
00460 
00461    PlexSEIdAltLConstIter cursor = this->begin() + fCurrent;
00462    return *cursor;
00463 
00464 }

PlexStripEndId PlexSEIdAltL::GetCurrentSEId  )  const
 

Definition at line 487 of file PlexSEIdAltL.cxx.

References GetCurrentItem(), and PlexSEIdAltLItem::GetSEId().

Referenced by FarPlaneCheckout::Ana(), DmxDeMuxModule::Ana(), DmxDeMuxCosmicsModule::Ana(), AltDeMuxDisplay::Ana(), CheezyDisplay::BuildPolyMarker(), AlgAltDeMuxBase::DeMuxBigGroup(), DemuxFast::DemuxHitE(), AlgAltDeMuxBase::DeMuxHitE(), DemuxFast::DemuxHitW(), AlgAltDeMuxBase::DeMuxHitW(), DmxHypothesis::DmxHypothesis(), DmxMuonPlane::DmxMuonPlane(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), AlgAltDeMuxBase::MakePlaneMap(), Print(), RerootToRawDataModule::Reco(), AlgDeMuxBeam::ReconcileShowerAndMuonRegions(), AlgAltDeMuxBase::ReMuxPlane(), AlgAltDeMuxBase::ReMuxSingleSidedPlane(), AlgFarDetShieldPlankList::RunAlg(), AltDeMuxCalc::SetEastToStrip(), AltDeMuxCalc::SetFibreLengthE(), AltDeMuxCalc::SetFibreLengthW(), DmxMuonPlane::SetStrips(), DmxHypothesis::SetStrips(), SetToOppositeEnds(), ShieldGeom::SetupShieldGeom(), AltDeMuxCalc::SetWestToStrip(), PlexValidate::TestAltL(), AlgAltDeMuxBase::ValidateOneSidedPlaneForPattern(), AlgAltDeMuxBase::ValidatePlaneForPattern(), and AlgAltDeMuxBase::XTalkCharge().

00488 {
00489    // return by value current PlexStripEndId
00490 
00491    return GetCurrentItem().GetSEId();
00492 
00493 }

Float_t PlexSEIdAltL::GetCurrentWeight  )  const
 

Definition at line 496 of file PlexSEIdAltL.cxx.

References GetCurrentItem(), and PlexSEIdAltLItem::GetWeight().

Referenced by CheezyDisplay::BuildPolyMarker(), DmxMuonPlane::SetStrips(), and PlexValidate::TestAltL().

00497 {
00498    // return the weight attached to the current PlexStripEndId
00499 
00500    return GetCurrentItem().GetWeight();
00501 
00502 }

UShort_t PlexSEIdAltL::GetDemuxVetoFlag  )  const [inline]
 

Definition at line 61 of file PlexSEIdAltL.h.

Referenced by PreFilter::Ana(), FCPCFilterModule::Ana(), AlgTrackSRList::FindTimingDirection(), CandDigitHandle::GetCharge(), CandStripHandle::GetDemuxVetoFlag(), CandDigitHandle::GetTime(), DmxMuonPlane::GetTimingOffset(), DmxHypothesis::GetTimingOffset(), AlgDeMuxDigitList::RunAlg(), and AlgStripSRList::RunAlgFar().

00062      { return fDemuxVetoFlag; }

Detector::Detector_t PlexSEIdAltL::GetDetector Bool_t  reportError = true  )  const
 

Definition at line 505 of file PlexSEIdAltL.cxx.

References fError, PlexPlaneId::GetDetector(), PlexSEIdAltLItem::GetSEId(), kBadDetector, PlexSEIdAltLConstIter, and TestConsistency().

Referenced by CheezyDisplay::AddSEIdAltL().

00506 {
00507    // Return the Detector of the PlexStripEndID's in this list.
00508    // This is meaningful only in a correctly filled PlexSEIdAltL
00509 
00510    TestConsistency(reportError);
00511    
00512    if ( fError & kBadDetector || size() < 1 ) 
00513       return (Detector::Detector_t)0; // bad detector
00514 
00515    PlexSEIdAltLConstIter cursor = this->begin();
00516    return (*cursor).GetSEId().GetDetector();
00517 
00518 }

StripEnd::StripEnd_t PlexSEIdAltL::GetEnd Bool_t  reportError = true  )  const
 

Definition at line 538 of file PlexSEIdAltL.cxx.

References fError, PlexStripEndId::GetEnd(), kBadEnd, PlexSEIdAltLConstIter, and TestConsistency().

Referenced by CheezyDisplay::AddSEIdAltL(), RunSummary::Ana(), RateSummary::Ana(), FarmListModule::Ana(), FarDetShieldPlankListModule::Ana(), DmxDeMuxModule::Ana(), DmxDeMuxCosmicsModule::Ana(), AtNuDisplayModule::Ana(), AltDeMuxModule::Ana(), AltDeMuxDisplay::Ana(), Truthifier::BestSEIdOfDigit(), AlgAltDeMuxBase::CleanIsolatedHits(), DmxHypothesis::DmxHypothesis(), DmxUtilities::FillHitPixels(), DmxUtilities::FillPlaneArray(), AlgTrackSRList::FindTimingDirection(), AlgTrackSR::FindTimingDirection(), AlgShowerSR::FindTimingDirection(), AlgFitTrackSR::FindTimingDirection(), CandStripHandle::GetBegTime(), CandStripHandle::GetCharge(), CandStripHandle::GetEndTime(), CandStripHandle::GetNDigit(), CandStripHandle::GetTime(), DmxMuonPlane::GetTimingOffset(), DmxHypothesis::GetTimingOffset(), CDTruthifier::GetTruthHitInfo(), AlgAltDeMuxBase::MakeAltListMap(), AlgFitTrackCam::NDStripBegTime(), PEGainMuxBox::New(), is_east_side::operator()(), DmxMuonPlane::PrintRecon(), LIPatternFinderSimple::PrintSnarl(), OltTimeScan::Reco(), DemuxFast::Reco(), AlgShieldPlank::RunAlg(), AlgFarDetStripList::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), AlgFarDetShieldPlank::RunAlg(), PlexValidate::TestAltL(), and AlgFitTrackCam::TimingFit().

00539 {
00540    // Return the end (kEast,kWest) of the PlexStripEndID's in this list.
00541    // This is meaningful only in a correctly cabled detector
00542    // if there are mis-cablings then it could return nonsense.
00543 
00544    TestConsistency(reportError);
00545 
00546    if ( fError & kBadEnd || size() < 1 ) 
00547       return StripEnd::kUnknown;  // bad end
00548 
00549    PlexSEIdAltLConstIter cursor = this->begin();
00550    return (*cursor).GetSEId().GetEnd();
00551 
00552 }

Int_t PlexSEIdAltL::GetError Bool_t  reportError = true  )  const [inline]
 

Definition at line 70 of file PlexSEIdAltL.h.

References TestConsistency().

Referenced by PEGainMuxBox::MakeGraphs(), and Plexus::ValidateConsistency().

00071       { TestConsistency(reportError); return fError; }

UInt_t PlexSEIdAltL::GetFmtFlag  )  [inline, static]
 

Definition at line 120 of file PlexSEIdAltL.h.

Referenced by operator<<(), and TestConsistency().

00120 { return fgFmtFlag; }

Int_t PlexSEIdAltL::GetPlane Bool_t  reportError = true  )  const
 

Definition at line 555 of file PlexSEIdAltL.cxx.

References fError, PlexPlaneId::GetPlane(), kBadPlane, PlexSEIdAltLConstIter, and TestConsistency().

Referenced by DigitText::AddCandDigitText(), UberDST::Ana(), RunSummary::Ana(), PreFilter::Ana(), NoiseFilterModule::Ana(), LIRawNt::Ana(), FarmListModule::Ana(), DmxDeMuxModule::Ana(), ChopModule::Ana(), AltDeMuxModule::Ana(), AltDeMuxDisplay::Ana(), PEGainModule::analyseMeanSigmaFile(), PmtMap::BuildMap(), AlgAltDeMuxBase::DistanceToNearestInPlane(), ChopEvaluation::Evaluate(), NtpMaker::FillDeMuxInfo(), NtpSRModule::FillNtpDataQuality(), DmxUtilities::FillPlaneArray(), MCAnalysis::FillPlnInfo(), DmxDeMuxCosmicsModule::FindDigitsChiSq(), Blinder::GetInfo(), LILookup::GetPinDiodePlanes(), CalHelpers::GetPlane(), RawReadout::GetReadoutType(), AlgAltDeMuxBase::IsXTalk(), KeyFrmDigitPlane(), KeyFromDigitPlane(), KeyFromPlane(), KeyFromPlane1(), AlgAltDeMuxBase::MakeAltListMap(), AlgAltDeMuxBase::MakePixelMap(), PEGainMuxBox::New(), min_plane::operator()(), is_in_plane_range_and_above_thr::operator()(), is_in_plane_and_above_thr::operator()(), LIPatternFinderSimple::PrintSnarl(), UberModuleLite::Reco(), UberModule::Reco(), OltTimeScan::Reco(), OltTimePlot::Reco(), OltNewModule::Reco(), DemuxFast::Reco(), LISummarySorter::ReconstructStripEnd(), AlgShieldPlankList::RunAlg(), AlgShieldPlank::RunAlg(), AlgMergeEvent::RunAlg(), AlgFilterDigitListSR::RunAlg(), AlgFilterDigitListAB::RunAlg(), AlgFarDetStripList::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), AlgFarDetShieldPlank::RunAlg(), AlgStripSRList::RunAlgFar(), AlgStripSRList::RunAlgMixed(), AlgStripSRList::RunAlgNear(), DmxMuonPlane::SetStrips(), AlgAltDeMuxBase::StripCrossTalkSingles(), AlgAltDeMuxBase::TagCrossTalk(), PlexValidate::TestAltL(), and Detector::Update().

00556 {
00557    // Return the plane # of the PlexStripEndId's in this list.
00558    // This is meaningful only in a correctly cabled detector
00559    // if there are mis-cablings then it could return nonsense.
00560 
00561    TestConsistency(reportError);
00562 
00563    if ( fError & kBadPlane || size() < 1 )
00564       return -1;  // bad plane
00565 
00566    PlexSEIdAltLConstIter cursor = this->begin();
00567    return (*cursor).GetSEId().GetPlane();
00568 
00569 }

PlaneView::PlaneView_t PlexSEIdAltL::GetPlaneView Bool_t  reportError = true  )  const
 

Definition at line 573 of file PlexSEIdAltL.cxx.

References fError, PlexPlaneId::GetPlaneView(), kBadPlaneView, PlexSEIdAltLConstIter, and TestConsistency().

Referenced by CheezyDisplay::AddSEIdAltL(), PreFilter::Ana(), AltDeMuxModule::Ana(), AltDeMuxDisplay::Ana(), GfxDigit::Configure(), AlgAltDeMuxBase::DeMuxHits(), AlgAltDeMuxBase::DeMuxSingleHitE(), AlgAltDeMuxBase::DeMuxSingleHitW(), DmxDeMuxCosmicsModule::FindDigitsChiSq(), AlgTrackSRList::FindTimingDirection(), AlgAltDeMuxBase::MakeAltListMap(), AlgAltDeMuxBase::MakePlaneMap(), LISummarySorter::ReconstructStripEnd(), select_digit(), EVD::SetChargeRange(), HistPage::Update(), EVD::UpdateChargeHists(), Mint::UpdateDigitRanges(), and AlgAltDeMuxBase::ValidatePlaneForPattern().

00574 {
00575    // Return the PlaneView of the PlexStripEndID's in this list.
00576    // This is meaningful only in a correctly cabled detector
00577    // if there are mis-cablings then it could return nonsense.
00578 
00579    TestConsistency(reportError);
00580 
00581    if ( fError & kBadPlaneView || size() < 1 )
00582       return PlaneView::kUnknown;  // bad view
00583 
00584    PlexSEIdAltLConstIter cursor = this->begin();
00585    return (*cursor).GetSEId().GetPlaneView();
00586 
00587 }

Int_t PlexSEIdAltL::GetSize  )  const [inline]
 

Definition at line 75 of file PlexSEIdAltL.h.

Referenced by TridModelMaker::CreateChannelModels(), TridModelMaker::CreatePmtModels(), TridModelMaker::CreateStripModels(), NtpSRModule::FillNtpShieldStrip(), AlgAltDeMuxBase::FinalReTagCrossTalk(), AlgShieldPlankList::RunAlg(), AlgStripSRList::RunAlgFar(), AlgStripSRList::RunAlgMixed(), AlgStripSRList::RunAlgNear(), SetLast(), ShieldGeom::SetupShieldGeom(), and EVD::UpdateChargeHists().

00075 { return this->size(); } 

Bool_t PlexSEIdAltL::IsValid  )  const
 

Definition at line 618 of file PlexSEIdAltL.cxx.

References fCurrent.

Referenced by AddToCurrentWeight(), ShieldPlankListModule::Ana(), RunSummary::Ana(), RateSummary::Ana(), FarPlaneCheckout::Ana(), FarmListModule::Ana(), DmxDeMuxModule::Ana(), DmxDeMuxCosmicsModule::Ana(), AltDeMuxDisplay::Ana(), CheezyDisplay::BuildPolyMarker(), AlgAltDeMuxBase::DeMuxBigGroup(), DemuxFast::DemuxHitE(), AlgAltDeMuxBase::DeMuxHitE(), DemuxFast::DemuxHitW(), AlgAltDeMuxBase::DeMuxHitW(), DmxHypothesis::DmxHypothesis(), DmxMuonPlane::DmxMuonPlane(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), NtpSRModule::FillNtpDataQuality(), AlgAltDeMuxBase::FinalReTagCrossTalk(), GetCurrentItem(), RawReadout::GetReadoutType(), LIPatternFinderFancy::IsLightInjectionTrash(), RerootToRawDataModule::Reco(), AlgDeMuxBeam::ReconcileShowerAndMuonRegions(), AlgAltDeMuxBase::ReTagCrossTalk(), AlgFarDetShieldPlankList::RunAlg(), EVD::SetChargeRange(), SetCurrentWeight(), AltDeMuxCalc::SetEastToStrip(), DmxMuonPlane::SetStrips(), DmxHypothesis::SetStrips(), SetToOppositeEnds(), ShieldGeom::SetupShieldGeom(), AltDeMuxCalc::SetWestToStrip(), PlexValidate::TestAltL(), Mint::UpdateDigitRanges(), and AlgAltDeMuxBase::XTalkCharge().

00619 {
00620    // is current position a valid entry
00621 
00622   return size()>0 && fCurrent<size(); 
00623 
00624 }

Bool_t PlexSEIdAltL::IsVetoShield Bool_t  reportError = true  )  const
 

Definition at line 521 of file PlexSEIdAltL.cxx.

References fError, PlexPlaneId::IsVetoShield(), kBadIsVeto, PlexSEIdAltLConstIter, and TestConsistency().

Referenced by RunSummary::Ana(), RateSummary::Ana(), PreFilter::Ana(), NoiseFilterModule::Ana(), FCPCFilterModule::Ana(), FarmListModule::Ana(), AltDeMuxModule::Ana(), AltDeMuxDisplay::Ana(), GfxDigitList::Configure(), GfxDigit::Configure(), NtpMaker::FillDeMuxInfo(), NtpSRModule::FillNtpDataQuality(), NtpSRModule::FillNtpShieldStrip(), DmxUtilities::FillPlaneArray(), RawReadout::GetReadoutType(), GfxDigit::GetRealCoords(), AlgFilterDigitListAB::IsVetoShield(), AlgAltDeMuxBase::MakeAltListMap(), AlgAltDeMuxBase::MakePixelMap(), GfxDigit::ModifyCoords(), DemuxFast::Reco(), BiggestChopModule::Reco(), RejectHelper::reject_veto(), AlgShieldPlankList::RunAlg(), AlgFilterDigitListSR::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), AlgChop::RunAlg(), AlgStripSRList::RunAlgFar(), select_digit(), GfxDigit::SetColor(), and AlgAltDeMuxBase::StripCrossTalkSingles().

00522 {
00523    // Return the whether this alt-list reflect veto shield strips
00524    // This is meaningful only in a correctly filled PlexSEIdAltL
00525 
00526    TestConsistency(reportError);
00527    
00528    // if inconsistent ... don't take it as part of veto shield
00529    // "nothing" isn't part of a veto shield
00530    if ( fError & kBadIsVeto || size() < 1 ) return false;
00531 
00532    PlexSEIdAltLConstIter cursor = this->begin();
00533    return (*cursor).GetSEId().IsVetoShield();
00534 
00535 }

void PlexSEIdAltL::KeepTopWeights UInt_t  n = 2,
Bool_t  keeporder = kFALSE
 

Definition at line 280 of file PlexSEIdAltL.cxx.

References clear(), and PlexSEIdAltLItem::GetWeight().

Referenced by AlgDeMuxDigitList::RunAlg(), and PlexValidate::TestAltL().

00281 {
00282    // Remove all but "n" pairs from the list (top "n" sorted by weight)
00283    // Final relative order of elements in the list is unchanged
00284    // if keeporder=kTRUE otherwise list ordered by decending weights.
00285    // If "n" would separate values of the same weight then
00286    // more than "n" are kept.
00287 
00288    unsigned int i, cnt = size();
00289 
00290    if (cnt <= 0) return;  // one cannot drop what one doesn't have
00291 
00292    if (n >= cnt) {
00293       if (keeporder) return; // keep everything, no change in order
00294       else n = cnt;          // perform sort but don't go beyond end
00295    }
00296 
00297    PlexSEIdAltL& self = *this;
00298 
00299    if (n <= 0) { // special case for new size=0
00300       this->clear();
00301       return;
00302    }
00303 
00304    // make a copy of the weights
00305    // sort it
00306    // select the nth down the list for lowest weight value to keep
00307    Float_t *sortedwgt = new Float_t[cnt];
00308 #if ROOT_VERSION_CODE < ROOT_VERSION(5,21,5)
00309    Int_t   *sortedindx = new Int_t[cnt];
00310 #else
00311    UInt_t  *sortedindx = new UInt_t[cnt];
00312 #endif
00313    for (i=0; i<cnt; i++) sortedwgt[i] = self[i].GetWeight();
00314    Bool_t down=kTRUE;
00315    TMath::Sort(cnt,sortedwgt,sortedindx,down);
00316    // n-1 because C arrays start with 0
00317    Int_t   icut = sortedindx[n-1];
00318    Float_t  cut = sortedwgt[icut]; 
00319 
00320    // count final size
00321    // may not be ==n because of two entries with same weight
00322    vector<PlexSEIdAltLItem> tempVector;
00323    for (i=0; i<cnt; i++) {
00324       unsigned int indxold = i;
00325       if (!keeporder) indxold = sortedindx[i];
00326       if (self[indxold].GetWeight() >= cut) {
00327          tempVector.push_back(self[indxold]);
00328       }
00329    }
00330 
00331    // replace current vector with newly created temporary
00332    this->swap(tempVector);
00333 
00334    delete [] sortedwgt;
00335    delete [] sortedindx;
00336 
00337 }

void PlexSEIdAltL::Next  )  const [inline]
 

Definition at line 78 of file PlexSEIdAltL.h.

References fCurrent.

Referenced by RateSummary::Ana(), FarPlaneCheckout::Ana(), DmxDeMuxModule::Ana(), DmxDeMuxCosmicsModule::Ana(), CheezyDisplay::BuildPolyMarker(), AlgAltDeMuxBase::DeMuxBigGroup(), DemuxFast::DemuxHitE(), AlgAltDeMuxBase::DeMuxHitE(), DemuxFast::DemuxHitW(), AlgAltDeMuxBase::DeMuxHitW(), DmxHypothesis::DmxHypothesis(), DmxMuonPlane::DmxMuonPlane(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), LIPatternFinderSimple::IsLightInjectionTrash(), LIPatternFinderFancy::IsLightInjectionTrash(), RerootToRawDataModule::Reco(), AlgDeMuxBeam::ReconcileShowerAndMuonRegions(), AlgFarDetShieldPlankList::RunAlg(), EVD::SetChargeRange(), AltDeMuxCalc::SetEastToStrip(), DmxMuonPlane::SetStrips(), DmxHypothesis::SetStrips(), SetToOppositeEnds(), ShieldGeom::SetupShieldGeom(), AltDeMuxCalc::SetWestToStrip(), PlexValidate::TestAltL(), Mint::UpdateDigitRanges(), and AlgAltDeMuxBase::XTalkCharge().

00078 { fCurrent++; }

void PlexSEIdAltL::NormalizeWeights Float_t  wgtsum = 1.0  ) 
 

Definition at line 707 of file PlexSEIdAltL.cxx.

References PlexSEIdAltLIter.

Referenced by AlgDeMuxDigitList::RunAlg(), and PlexValidate::TestAltL().

00708 {
00709    // normalize the weights so sum adds up to "wgtsum"
00710    // if all values are exactly zero, then this sets them
00711    // to wgtsum/fSize
00712 
00713    unsigned int n=size();
00714 
00715    if (n < 1) return;
00716 
00717    Float_t sum = 0.0;
00718 
00719    PlexSEIdAltLIter iter, the_end=this->end();
00720 
00721    iter = this->begin();
00722    while (iter != the_end) { sum += (*iter).GetWeight(); iter++; }
00723 
00724    iter = this->begin();
00725    if ( sum != 0.0 ) {
00726       Float_t scale = wgtsum/sum;
00727       while (iter != the_end) {
00728          Float_t wgt = (*iter).GetWeight() * scale;
00729          (*iter).SetWeight(wgt);
00730          iter++;
00731       }
00732    } else {
00733       // all weight values were zero
00734       Float_t equalwgt = wgtsum/(float)n;
00735       while (iter != the_end) { (*iter).SetWeight(equalwgt); iter++; }
00736    }
00737 
00738 }

void PlexSEIdAltL::Previous  )  const [inline]
 

Definition at line 79 of file PlexSEIdAltL.h.

References fCurrent.

Referenced by PlexValidate::TestAltL().

00079 { fCurrent--; }

void PlexSEIdAltL::Print Option_t *  option = ""  )  const
 

Definition at line 627 of file PlexSEIdAltL.cxx.

References StripEnd::AsString(), PlaneCoverage::AsString(), PlaneView::AsString(), GetBestItem(), GetCurrentSEId(), PlexPlaneId::GetDetector(), PlexStripEndId::GetEnd(), PlexPlaneId::GetPlane(), PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::GetPlaneView(), PlexSEIdAltLItem::GetSEId(), PlexStripEndId::GetStrip(), PlexStripEndId::GetSubPart(), PlexSEIdAltLItem::GetWeight(), and option.

Referenced by CheezyDisplay::AddSEIdAltL(), PlexValidate::TestAltL(), TestConsistency(), and Plexus::ValidateConsistency().

00628 {
00629    // Print out the list
00630 
00631    unsigned int n = size();
00632 
00633    if (n <= 0) {
00634       printf("Empty PlexSEIdAltL\n");
00635       return;
00636    }
00637 
00638    const PlexSEIdAltLItem& best = GetBestItem();
00639 
00640    const PlexSEIdAltL& self = *this;
00641    unsigned int i;
00642    char cursormarker, bestmarker;
00643    PlexStripEndId seid;
00644 //   Float_t        weight;
00645 
00646    switch (option[0]) {
00647    case 'c':
00648    case 'C':
00649       // compact notation assumes that there isn't a mixup
00650       // and all items share a common detector/plane/subpart/end
00651       seid = GetCurrentSEId(); // any will do
00652       printf("[%1.1s|%4d %1.1s%1.1s|%1.1s%1.1s]",
00653              Detector::AsString(seid.GetDetector()),
00654              seid.GetPlane(),
00655              PlaneView::AsString(seid.GetPlaneView()),
00656              PlaneCoverage::AsString(seid.GetPlaneCoverage()),
00657              StripEnd::AsString(seid.GetSubPart()),
00658              StripEnd::AsString(seid.GetEnd()));
00659       for (i=0; i<n; i++) {
00660          const PlexSEIdAltLItem& item = self[i];
00661          bestmarker   = (item == best)     ? '!' : ' ';
00662          cursormarker = (i    == fCurrent) ? '@' : ' ';
00663          seid   = item.GetSEId();
00664          printf(" %c%c%3d",bestmarker,cursormarker,seid.GetStrip());
00665 
00666       }
00667       if (option[0] == 'C') {
00668          printf("\n          wgt ");
00669          for (i=0; i<n; i++) {
00670             const PlexSEIdAltLItem& item = self[i];
00671             printf(" %5.3f",item.GetWeight());
00672          }
00673       }
00674       printf("\n");
00675 
00676       break;
00677    default:
00678 
00679      cout << *this;
00680 
00681    }
00682 }

void PlexSEIdAltL::Push_Back const PlexSEIdAltLItem item  )  [inline]
 

Definition at line 92 of file PlexSEIdAltL.h.

00092 { this->push_back(item); }

void PlexSEIdAltL::SetCurrentWeight Float_t  weight  ) 
 

Definition at line 685 of file PlexSEIdAltL.cxx.

References IsValid(), and PlexSEIdAltLIter.

Referenced by AlgAltDeMuxBase::DeMuxBigGroup(), DemuxFast::DemuxHitE(), AlgAltDeMuxBase::DeMuxHitE(), DemuxFast::DemuxHitW(), AlgAltDeMuxBase::DeMuxHitW(), DmxMuonPlane::DmxMuonPlane(), AlgDeMuxBeam::ReconcileShowerAndMuonRegions(), DmxMuonPlane::SetStrips(), and DmxHypothesis::SetStrips().

00686 {
00687    // set the weight attached to the current PlexStripEndId
00688 
00689    if (!IsValid()) return; // no list or out of range
00690    PlexSEIdAltLIter cursor = this->begin() + fCurrent;
00691    (*cursor).SetWeight(weight);
00692 
00693 }

void PlexSEIdAltL::SetDemuxVetoFlag UShort_t  flag  )  [inline]
 

Definition at line 87 of file PlexSEIdAltL.h.

References fDemuxVetoFlag.

Referenced by DmxMuonPlane::DmxMuonPlane(), DmxUtilities::FillPlaneArray(), DmxMuonPlane::SetStrips(), and DmxHypothesis::SetStrips().

00087 { fDemuxVetoFlag = flag; }

void PlexSEIdAltL::SetFirst  )  const [inline]
 

Definition at line 80 of file PlexSEIdAltL.h.

References fCurrent.

Referenced by RateSummary::Ana(), FarPlaneCheckout::Ana(), DmxDeMuxModule::Ana(), DmxDeMuxCosmicsModule::Ana(), AltDeMuxDisplay::Ana(), CheezyDisplay::BuildPolyMarker(), AlgAltDeMuxBase::DeMuxBigGroup(), DemuxFast::DemuxHitE(), AlgAltDeMuxBase::DeMuxHitE(), DemuxFast::DemuxHitW(), AlgAltDeMuxBase::DeMuxHitW(), DmxHypothesis::DmxHypothesis(), DmxMuonPlane::DmxMuonPlane(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), AlgAltDeMuxBase::FinalReTagCrossTalk(), LIPatternFinderFancy::IsLightInjectionTrash(), DemuxFast::MakeMap(), AlgAltDeMuxBase::MakePixelMap(), AlgAltDeMuxBase::MakePlaneMap(), RerootToRawDataModule::Reco(), DemuxFast::Reco(), AlgDeMuxBeam::ReconcileShowerAndMuonRegions(), AlgAltDeMuxBase::ReMuxPlane(), AlgAltDeMuxBase::ReMuxSingleSidedPlane(), AlgAltDeMuxBase::ReTagCrossTalk(), AlgFarDetShieldPlankList::RunAlg(), EVD::SetChargeRange(), AltDeMuxCalc::SetEastToStrip(), DmxMuonPlane::SetStrips(), DmxHypothesis::SetStrips(), SetToOppositeEnds(), ShieldGeom::SetupShieldGeom(), AltDeMuxCalc::SetWestToStrip(), AlgAltDeMuxBase::StripCrossTalkSingles(), PlexValidate::TestAltL(), Mint::UpdateDigitRanges(), AlgAltDeMuxBase::ValidateOneSidedPlaneForPattern(), AlgAltDeMuxBase::ValidatePlaneForPattern(), and AlgAltDeMuxBase::XTalkCharge().

00080 { fCurrent = 0; }

void PlexSEIdAltL::SetFmtFlag const UInt_t  fmtflg  )  [inline, static]
 

Definition at line 119 of file PlexSEIdAltL.h.

References fgFmtFlag.

Referenced by TestConsistency().

00119 { fgFmtFlag = fmtflg; }

void PlexSEIdAltL::SetLast  )  const [inline]
 

Definition at line 81 of file PlexSEIdAltL.h.

References fCurrent, and GetSize().

Referenced by PlexValidate::TestAltL().

00081 { fCurrent = GetSize()-1; }

Bool_t PlexSEIdAltL::SetToOppositeEnds PlexSEIdAltL that  ) 
 

Definition at line 590 of file PlexSEIdAltL.cxx.

References fCurrent, GetCurrentSEId(), PlexStripEndId::IsOppositeStripEnd(), IsValid(), Next(), and SetFirst().

00591 {
00592    // Given two PlexSEIdAltL's set both "current" iterators
00593    // to entries that are at opposite ends of the same strip
00594    // and return true.  If no legal combination exists then
00595    // return false leaving current positions unchanged.
00596 
00597    UInt_t where_this =      fCurrent;
00598    UInt_t where_that = that.fCurrent;
00599 
00600    this->SetFirst();
00601    while (this->IsValid()) {
00602       PlexStripEndId seid_this = this->GetCurrentSEId();
00603       that.SetFirst();
00604       while (that.IsValid()) {
00605          PlexStripEndId seid_that = that.GetCurrentSEId();
00606          if (seid_this.IsOppositeStripEnd(seid_that)) return true;
00607          that.Next();
00608       }
00609       this->Next();
00610    }
00611    // fell through means no legal match
00612    fCurrent      = where_this;
00613    that.fCurrent = where_that;
00614    return false;
00615 
00616 }

UInt_t PlexSEIdAltL::Size void   )  const [inline]
 

Definition at line 91 of file PlexSEIdAltL.h.

00091 { return this->size(); }

void PlexSEIdAltL::TestConsistency Bool_t  reportError = true  )  const [private]
 

Definition at line 742 of file PlexSEIdAltL.cxx.

References fError, fmt_Index, fmt_PixelSpot, fmt_StripEnd, PlexPlaneId::GetDetector(), PlexStripEndId::GetEnd(), GetFmtFlag(), PlexPlaneId::GetPlane(), PlexPlaneId::GetPlaneView(), PlexPlaneId::IsVetoShield(), kBadDetector, kBadEnd, kBadPlane, kOkay, kUnchecked, MSG, PlexSEIdAltLConstIter, Print(), and SetFmtFlag().

Referenced by GetDetector(), GetEnd(), GetError(), GetPlane(), GetPlaneView(), and IsVetoShield().

00743 {
00744    // Set the fError flag if the list is inconsistent
00745    // in terms of GetDetector, GetEnd, GetPlane, GetPlaneView
00746 
00747    // skip if already checked (adding values clears this flag)
00748    if ( kUnchecked != fError ) return;
00749 
00750    // clear all errors
00751    fError = 0;
00752 
00753    unsigned int n = size();
00754 
00755    // a single entry is consistent with itself
00756    if ( 1 == n ) return;
00757 
00758    // an empty list is consistent with nothing
00759    // and asking for these value will be problematic
00760    if ( 0 == n ) {
00761       fError = kBadDetector | kBadEnd | kBadPlane | kBadPlaneView;
00762       return;
00763    }
00764 
00765    PlexSEIdAltLConstIter iter = this->begin();
00766    PlexSEIdAltLConstIter the_end = this->end();
00767 
00768    PlexStripEndId first_seid = (*iter).GetSEId();
00769    Detector::Detector_t     firstdet = first_seid.GetDetector();
00770    StripEnd::StripEnd_t     firstend = first_seid.GetEnd();
00771    Int_t                    firstpln = first_seid.GetPlane();
00772    PlaneView::PlaneView_t   firstpvw = first_seid.GetPlaneView();
00773    Bool_t                   firstisv = first_seid.IsVetoShield();
00774 
00775    iter++;  // no need to recheck the first against itself
00776    while (iter != the_end) {
00777       PlexStripEndId alt_seid = (*iter).GetSEId();
00778       Detector::Detector_t     altdet = alt_seid.GetDetector();
00779       StripEnd::StripEnd_t     altend = alt_seid.GetEnd();
00780       Int_t                    altpln = alt_seid.GetPlane();
00781       PlaneView::PlaneView_t   altpvw = alt_seid.GetPlaneView();
00782       Bool_t                   altisv = alt_seid.IsVetoShield();
00783       if ( altdet != firstdet ) fError |= kBadDetector;
00784       if ( altend != firstend ) fError |= kBadEnd;
00785       // veto shield connections span modules (and thus "planes"
00786       // and "planeviews")
00787       if ( ! altisv ) {
00788         if ( altpln != firstpln ) fError |= kBadPlane;
00789         if ( altpvw != firstpvw ) fError |= kBadPlaneView;
00790       }
00791       if ( altisv != firstisv ) fError |= kBadIsVeto;
00792       iter++;
00793    }
00794    
00795    if ( fError != kOkay && reportError ) {
00796       MSG("Plex",Msg::kWarning)
00797          << "PlexSEIdAltL::TestConsistency - list is inconsistent " 
00798          << "(0x" << hex << setfill('0') << setw(2) << fError
00799          << setfill(' ') << dec << ")" << endl;
00800 
00801       UInt_t old_fmt = GetFmtFlag();
00802       SetFmtFlag(fmt_Index|fmt_StripEnd|fmt_PixelSpot);
00803       this->Print();
00804       SetFmtFlag(old_fmt);
00805    }
00806 
00807 }


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  os,
const PlexSEIdAltL alt
[friend]
 


Member Data Documentation

UShort_t PlexSEIdAltL::fCurrent [mutable, private]
 

Definition at line 128 of file PlexSEIdAltL.h.

Referenced by DropCurrent(), IsValid(), Next(), Previous(), SetFirst(), SetLast(), and SetToOppositeEnds().

UShort_t PlexSEIdAltL::fDemuxVetoFlag [private]
 

Definition at line 129 of file PlexSEIdAltL.h.

Referenced by SetDemuxVetoFlag().

UShort_t PlexSEIdAltL::fError [mutable, private]
 

Definition at line 130 of file PlexSEIdAltL.h.

Referenced by AddStripEndId(), GetDetector(), GetEnd(), GetPlane(), GetPlaneView(), IsVetoShield(), and TestConsistency().

UInt_t PlexSEIdAltL::fgFmtFlag = 0 [static, private]
 

Definition at line 34 of file PlexSEIdAltL.cxx.

Referenced by SetFmtFlag().


The documentation for this class was generated from the following files:
Generated on Sat Nov 21 22:51:44 2009 for loon by  doxygen 1.3.9.1