CandDigitHandle Class Reference

#include <CandDigitHandle.h>

Inheritance diagram for CandDigitHandle:
CandHandle CandDeMuxDigitHandle

List of all members.

Public Member Functions

 CandDigitHandle ()
 CandDigitHandle (const CandDigitHandle &cdh)
 CandDigitHandle (CandDigit *cd)
virtual ~CandDigitHandle ()
virtual CandDigitHandleDupHandle () const
RawChannelId GetChannelId () const
Float_t GetCharge (CalDigitType::CalDigitType_t=CalDigitType::kNone) const
const PlexSEIdAltLGetPlexSEIdAltL () const
PlexSEIdAltLGetPlexSEIdAltLWritable ()
Int_t GetRawDigitIndex () const
Double_t GetSubtractedTime (CalTimeType::CalTimeType_t=CalTimeType::kNone) const
Double_t GetTime (CalTimeType::CalTimeType_t=CalTimeType::kNone) const
Char_t GetVaErrorBits () const
Char_t GetQieErrorBits () const
void SetChannelId (RawChannelId chid)
void SetCharge (Float_t chg)
void SetPlexSEIdAltL (PlexSEIdAltL &altlist)
void SetRawDigitIndex (Int_t rawdigitindex)
void SetTime (Double_t time)
void SetVaErrorBits (Char_t vaerrbits)
void SetQieErrorBits (Char_t qieerrbits)
virtual void Trace (const char *c="") const

Detailed Description

Definition at line 24 of file CandDigitHandle.h.


Constructor & Destructor Documentation

CandDigitHandle::CandDigitHandle (  ) 

Definition at line 29 of file CandDigitHandle.cxx.

Referenced by DupHandle().

00030 {
00031 }

CandDigitHandle::CandDigitHandle ( const CandDigitHandle cdh  ) 

Definition at line 34 of file CandDigitHandle.cxx.

00034                                                            :
00035   CandHandle(cdh)
00036 {
00037 }

CandDigitHandle::CandDigitHandle ( CandDigit cd  ) 

Definition at line 40 of file CandDigitHandle.cxx.

00040                                               :
00041   CandHandle(cd)
00042 {
00043 }

CandDigitHandle::~CandDigitHandle (  )  [virtual]

Definition at line 46 of file CandDigitHandle.cxx.

00047 {
00048 }


Member Function Documentation

CandDigitHandle * CandDigitHandle::DupHandle (  )  const [virtual]

Reimplemented from CandHandle.

Reimplemented in CandDeMuxDigitHandle.

Definition at line 51 of file CandDigitHandle.cxx.

References CandDigitHandle().

Referenced by AlgTrackSRList::SpectrometerTracking().

00052 {
00053    return (new CandDigitHandle(*this));
00054 }

RawChannelId CandDigitHandle::GetChannelId (  )  const
Float_t CandDigitHandle::GetCharge ( CalDigitType::CalDigitType_t  caltype_t = CalDigitType::kNone  )  const

Definition at line 63 of file CandDigitHandle.cxx.

References PlexSEIdAltL::GetBestItem(), CandHandle::GetCandBase(), PlexSEIdAltL::GetDemuxVetoFlag(), PlexSEIdAltLItem::GetPE(), GetPlexSEIdAltL(), PlexSEIdAltLItem::GetSigCorr(), PlexSEIdAltLItem::GetSigLin(), Msg::kError, CalDigitType::kNone, CalDigitType::kPE, CalDigitType::kSigCorr, CalDigitType::kSigLin, Msg::kWarning, and MSG.

Referenced by DigitText::AddCandDigitText(), VaDigit::AddCrossTalk(), TridModel::AddDigit(), DmxDeMuxModule::Ana(), ChopModule::Ana(), DmxDeMuxCosmicsModule::Ana(), CandDigitModule::Ana(), GfxDigitList::DigitMasked(), DmxHypothesis::DmxHypothesis(), ChopEvaluation::Evaluate(), GfxDigitList::ExecuteEvent(), DmxUtilities::FillHitPixels(), DmxUtilities::FillPlaneArray(), AlgShowerSR::FindTimingDirection(), AlgFitTrackSR::FindTimingDirection(), AlgTrackSRList::FindTimingDirection(), AlgFitTrackCam::GenerateNDSpectStrips(), ChopHelper::GetChopHelp(), VaDigit::GetCrossTalk(), GfxDigitList::GetDigitColor(), CandTrackSRHandle::GetTimeWeight(), DmxHypothesis::GetTimingOffset(), DmxMuonPlane::GetTimingOffset(), is_in_plane_range_and_above_thr::operator()(), sum_q::operator()(), is_in_plane_and_above_thr::operator()(), AlgStripSRList::PassNearNoise(), AlgStripSRList::PassPECut(), DmxMuonPlane::PrintRecon(), PmtPixels::Refresh(), AlgFarDetShieldPlank::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), AlgFilterDigitList::RunAlg(), AlgPassThru::RunAlg(), AlgFarDetStrip::RunAlg(), AlgFilterDigitListSR::RunAlg(), EVD::SetChargeRange(), GfxDigit::SetColor(), DmxMuonPlane::SetStrips(), AlgFitTrackCam::TimingFit(), and HistPage::Update().

00065 {
00066 
00067 // Return uncalibrated charge straight away, if desired.
00068    if (caltype_t == CalDigitType::kNone) {
00069      return ((CandDigit *) GetCandBase())->fCharge;
00070    }
00071 
00072 // Check against Demux veto before returning a calibrated charge.
00073    const PlexSEIdAltL &seidl = GetPlexSEIdAltL();
00074    if (seidl.GetDemuxVetoFlag() != 0) {
00075      MSG("Cand", Msg::kWarning)
00076             << " *** Invalid PlexSEIdAltL.  DeMuxVetoFlag = "
00077             << seidl.GetDemuxVetoFlag() << endl
00078             << "Return uncalibrated charge." << endl;
00079      return ((CandDigit *) GetCandBase())->fCharge;
00080    }
00081 
00082    switch (caltype_t) {
00083      // M. Kordosky, Jan 19, 2005 ... noticed while browsing
00084      // We check for caltype_t==kNone and deal with it 
00085      // in the first line of the present function.
00086      // Why do it again?
00087      //     case (CalDigitType::kNone):
00088      //       return ((CandDigit *) GetCandBase())->fCharge;
00089      //       break;
00090      case (CalDigitType::kSigLin):
00091        return seidl.GetBestItem().GetSigLin();
00092        break;
00093      case (CalDigitType::kSigCorr):
00094        return seidl.GetBestItem().GetSigCorr();
00095        break;
00096      case (CalDigitType::kPE):
00097        return seidl.GetBestItem().GetPE();
00098        break;
00099      default:
00100        MSG("Cand", Msg::kError)
00101            << " *** Unknown Digit charge type = "
00102            << caltype_t << endl
00103            << "Return uncalibrated charge."
00104            << endl;
00105        return ((CandDigit *) GetCandBase())->fCharge;
00106        break;
00107    }
00108 }

const PlexSEIdAltL & CandDigitHandle::GetPlexSEIdAltL (  )  const

Definition at line 111 of file CandDigitHandle.cxx.

References CandHandle::GetCandBase().

Referenced by DigitText::AddCandDigitText(), TridModelStrip::AddDigit(), TridModel::AddDigit(), DmxDeMuxModule::Ana(), ChopModule::Ana(), DmxDeMuxCosmicsModule::Ana(), Truthifier::BestSEIdOfDigit(), GfxDigit::Configure(), GfxDigitList::DigitMasked(), DmxHypothesis::DmxHypothesis(), DmxMuonPlane::DmxMuonPlane(), ChopEvaluation::Evaluate(), GfxDigitList::ExecuteEvent(), GfxDigitList::ExecuteEventDigit(), DmxUtilities::FillHitPixels(), DmxUtilities::FillPlaneArray(), DmxDeMuxCosmicsModule::FindDigitsChiSq(), AlgShowerSR::FindTimingDirection(), AlgTrackSR::FindTimingDirection(), AlgFitTrackSR::FindTimingDirection(), AlgTrackSRList::FindTimingDirection(), CalHelpers::GetBestEnd(), CalHelpers::GetBestStrip(), PreFilter::GetCDHTPos(), PreFilter::GetCDHZPos(), GetCharge(), ChopHelper::GetChopHelp(), GfxDigitList::GetDigitColor(), GfxDigit::GetDiscreteCoords(), CalHelpers::GetPlane(), GfxDigit::GetRealCoords(), GfxDigit::GetRelativeValue(), GetTime(), DmxHypothesis::GetTimingOffset(), DmxMuonPlane::GetTimingOffset(), VaDigit::IsSameStrip(), AlgFilterDigitListAB::IsVetoShield(), KeyFrmDigitPlane(), KeyFromDigitPlane(), KeyFromPlane(), KeyFromPlane1(), CalHelpers::KeyFromTime(), GfxDigit::ModifyCoords(), AlgFitTrackCam::NDStripBegTime(), is_in_plane_range_and_above_thr::operator()(), min_plane::operator()(), is_east_side::operator()(), is_in_plane_and_above_thr::operator()(), DmxMuonPlane::PrintRecon(), AlgDeMuxBeam::ReconcileShowerAndMuonRegions(), PmtPixels::Refresh(), AlgChop::RunAlg(), AlgDeMuxDigitList::RunAlg(), AlgFarDetShieldPlank::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), AlgChopListSharp2::RunAlg(), AlgPassThru::RunAlg(), AlgFarDetStrip::RunAlg(), AlgFarDetStripList::RunAlg(), AlgFilterChannels::RunAlg(), AlgFilterDigitListAB::RunAlg(), AlgStripSR::RunAlg(), AlgFilterDigitListSR::RunAlg(), AlgShieldPlankList::RunAlg(), AlgStripSRList::RunAlgNear(), select_digit(), EVD::SetChargeRange(), GfxDigit::SetColor(), DmxMuonPlane::SetStrips(), DmxHypothesis::SetStrips(), AlgTrackSRList::SpectrometerTracking(), StripSRKeyFromTube(), AlgFitTrackCam::TimingFit(), HistPage::Update(), EVD::UpdateChargeHists(), and Mint::UpdateDigitRanges().

00112 {
00113    return ((CandDigit *) GetCandBase())->fPlexSEIdAltL;
00114 }

PlexSEIdAltL & CandDigitHandle::GetPlexSEIdAltLWritable (  ) 
Char_t CandDigitHandle::GetQieErrorBits (  )  const

Definition at line 192 of file CandDigitHandle.cxx.

References CandHandle::GetCandBase().

Referenced by AlgFilterDigitList::RunAlg(), and AlgPassThru::RunAlg().

00193 {
00194    return ((CandDigit *) GetCandBase())->fQieErrorBits;
00195 }

Int_t CandDigitHandle::GetRawDigitIndex (  )  const
Double_t CandDigitHandle::GetSubtractedTime ( CalTimeType::CalTimeType_t  caltype_t = CalTimeType::kNone  )  const

Definition at line 129 of file CandDigitHandle.cxx.

References CandDigitListHandle::GetAbsTime(), CandHandle::GetMother(), and GetTime().

Referenced by CandDigitModule::Ana(), KeyFromDigitTime(), AlgFitTrackCam::NDStripBegTime(), AlgFarDetShieldPlank::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), AlgFilterDigitList::RunAlg(), AlgFarDetStrip::RunAlg(), and AlgFilterDigitListSR::RunAlg().

00131 {
00132 
00133 // Return GetTime() value minus mother CandDigitList GetAbsTime() offset
00134 // No offset subtraction is done if no CandDigitList mother exists.
00135    const CandDigitListHandle *mother =
00136                  dynamic_cast<const CandDigitListHandle *>(GetMother());
00137    if (mother) return GetTime(caltype_t) - mother->GetAbsTime();
00138    else return GetTime(caltype_t);
00139 }

Double_t CandDigitHandle::GetTime ( CalTimeType::CalTimeType_t  caltype_t = CalTimeType::kNone  )  const

Definition at line 142 of file CandDigitHandle.cxx.

References PlexSEIdAltL::GetBestItem(), CandHandle::GetCandBase(), PlexSEIdAltL::GetDemuxVetoFlag(), GetPlexSEIdAltL(), PlexSEIdAltLItem::GetTime(), Msg::kError, CalTimeType::kNone, CalTimeType::kT0, Msg::kWarning, and MSG.

Referenced by TridModel::AddDigit(), DmxDeMuxModule::Ana(), ChopModule::Ana(), DmxDeMuxCosmicsModule::Ana(), GfxDigitList::DigitMasked(), ChopHelper::GetChopHelp(), GfxDigitList::GetDigitColor(), GetSubtractedTime(), DmxHypothesis::GetTimingOffset(), DmxMuonPlane::GetTimingOffset(), VaDigit::IsSameTime(), CalHelpers::KeyFromDigitTime(), compareDigitTimes::operator()(), AlgChop::RunAlg(), AlgFarDetShieldPlankList::RunAlg(), AlgChopListSharp2::RunAlg(), AlgPassThru::RunAlg(), AlgFilterDigitListAB::RunAlg(), AlgFilterDigitListSR::RunAlg(), AlgStripSRList::RunAlgMixed(), AlgStripSRList::RunAlgNear(), and StripSRKeyFromTime().

00144 {
00145 
00146 // Return digit time without CandDigitList GetAbsTime offset subtraction
00147 
00148 // Return uncalibrated time straight away, if desired.
00149    if (caltype_t == CalTimeType::kNone) {
00150      return ((CandDigit *) GetCandBase())->fTime;
00151    }
00152 
00153 // Check against Demux veto before returning a calibrated time.
00154    const PlexSEIdAltL &seidl = GetPlexSEIdAltL();
00155    if (seidl.GetDemuxVetoFlag() != 0) {
00156      MSG("Cand", Msg::kWarning)
00157             << " *** Invalid PlexSEIdAltL.  DeMuxVetoFlag = "
00158             << seidl.GetDemuxVetoFlag() << endl
00159             << "Return uncalibrated time." << endl;
00160      return ((CandDigit *) GetCandBase())->fTime;
00161    }
00162 
00163    switch (caltype_t) {
00164      // M. Kordosky, Jan 19, 2005 ... noticed while browsing
00165      // We check for caltype_t==kNone and deal with it 
00166      // in the first line of the present function.
00167      // Why do it again?
00168      //     case (CalTimeType::kNone):
00169      //       return ((CandDigit *) GetCandBase())->fTime;
00170      //       break;
00171      case (CalTimeType::kT0):
00172        return seidl.GetBestItem().GetTime();
00173        break;
00174      default:
00175        MSG("Cand", Msg::kError)
00176            << " *** Unknown Digit time type = "
00177            << caltype_t << endl
00178            << "Return uncalibrated time."
00179            << endl;
00180        return ((CandDigit *) GetCandBase())->fTime;
00181        break;
00182    }
00183 }

Char_t CandDigitHandle::GetVaErrorBits (  )  const

Definition at line 186 of file CandDigitHandle.cxx.

References CandHandle::GetCandBase().

Referenced by AlgFilterDigitList::RunAlg(), and AlgPassThru::RunAlg().

00187 {
00188    return ((CandDigit *) GetCandBase())->fVaErrorBits;
00189 }

void CandDigitHandle::SetChannelId ( RawChannelId  chid  ) 

Definition at line 198 of file CandDigitHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgPassThru::RunAlg().

00199 {
00200    ((CandDigit *) GetOwnedCandBase())->fChannelId = chid;
00201 }

void CandDigitHandle::SetCharge ( Float_t  chg  ) 

Definition at line 204 of file CandDigitHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgPassThru::RunAlg().

00205 {
00206    ((CandDigit *) GetOwnedCandBase())->fCharge = chg;
00207 }

void CandDigitHandle::SetPlexSEIdAltL ( PlexSEIdAltL altlist  ) 

Definition at line 210 of file CandDigitHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgPassThru::RunAlg().

00211 {
00212    ((CandDigit *) GetOwnedCandBase())->fPlexSEIdAltL = altlist;
00213 }

void CandDigitHandle::SetQieErrorBits ( Char_t  qieerrbits  ) 

Definition at line 234 of file CandDigitHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgPassThru::RunAlg().

00235 {
00236    ((CandDigit *) GetOwnedCandBase())->fQieErrorBits = qieerrbits;
00237 }

void CandDigitHandle::SetRawDigitIndex ( Int_t  rawdigitindex  ) 

Definition at line 216 of file CandDigitHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgCaldetDigitList::RunAlg(), AlgDigitList::RunAlg(), AlgPassThru::RunAlg(), and AlgMCDigitList::RunAlg().

00217 {
00218    ((CandDigit *) GetOwnedCandBase())->fRawDigitIndex = rawdigitindex;
00219 }

void CandDigitHandle::SetTime ( Double_t  time  ) 

Definition at line 222 of file CandDigitHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgPassThru::RunAlg().

00223 {
00224    ((CandDigit *) GetOwnedCandBase())->fTime = time;
00225 }

void CandDigitHandle::SetVaErrorBits ( Char_t  vaerrbits  ) 

Definition at line 228 of file CandDigitHandle.cxx.

References CandHandle::GetOwnedCandBase().

Referenced by AlgPassThru::RunAlg().

00229 {
00230    ((CandDigit *) GetOwnedCandBase())->fVaErrorBits = vaerrbits;
00231 }

void CandDigitHandle::Trace ( const char *  c = ""  )  const [virtual]

Reimplemented from CandHandle.

Reimplemented in CandDeMuxDigitHandle.

Definition at line 240 of file CandDigitHandle.cxx.

References Msg::kDebug, and MSG.

00241 {
00242   MSG("Cand", Msg::kDebug)
00243     << "**********Begin CandDigitHandle::Trace(\"" << c << "\")" << endl
00244            << "Information from CandDigitHandle's CandHandle: " << endl;
00245   CandHandle::Trace(c);
00246   MSG("Cand", Msg::kDebug)
00247      << "**********End CandDigitHandle::Trace(\"" << c << "\")" << endl;
00248 }


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1