CandStrip Class Reference

#include <CandStrip.h>

Inheritance diagram for CandStrip:

CandBase CandRefCounted FarDetStrip List of all members.

Public Member Functions

 CandStrip ()
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const

Static Public Member Functions

static CandStripHandle MakeCandidate (AlgHandle &ah, CandContext &cx)

Protected Member Functions

 CandStrip (AlgHandle &ah)
 CandStrip (AlgHandle &ah, CandHandle &ch, CandContext &cx)
 CandStrip (const CandStrip &rhs)
virtual ~CandStrip ()
virtual void CreateLocalHandle ()
virtual CandStripDup () const
virtual Bool_t IsEquivalent (const TObject *rhs) const

Protected Attributes

Double_t fTPos
Double_t fZPos
CalTimeType::CalTimeType_t fCalTimeType
PlexStripEndId fBestStripEnd

Friends

class CandStripHandle

Detailed Description

Definition at line 22 of file CandStrip.h.


Constructor & Destructor Documentation

CandStrip::CandStrip (  ) 

A CandStrip contains all CandDigits belonging to a given strip. Strip end matching is performed for far detector analysis after the demultiplexer has determined the best of the possible strip end alternatives. For the near detector, CandDigits for a given strip in a snarl are combined to form a CandStrip based on timing.

Definition at line 32 of file CandStrip.cxx.

Referenced by Dup(), and MakeCandidate().

00032                      :
00033   fTPos(0.),
00034   fZPos(0.),
00035   fCalTimeType(CalTimeType::kT0)
00036 {
00037 }

CandStrip::CandStrip ( AlgHandle ah  )  [protected]

Definition at line 40 of file CandStrip.cxx.

00040                                   :
00041   CandBase(ah),    
00042   fTPos(0.),
00043   fZPos(0.),
00044   fCalTimeType(CalTimeType::kT0)
00045 {
00046 }

CandStrip::CandStrip ( AlgHandle ah,
CandHandle ch,
CandContext cx 
) [protected]

Definition at line 49 of file CandStrip.cxx.

References CreateLocalHandle(), and AlgHandle::RunAlg().

00049                                                                    :
00050   CandBase(ah),  
00051   fTPos(0.),
00052   fZPos(0.),
00053   fCalTimeType(CalTimeType::kT0)
00054 {
00055   CreateLocalHandle();
00056 
00057 // Run Algorithm to construct Candidate
00058   {                                                   // Start of scope.
00059     CandStripHandle csh(this);               // csh will go out of scope
00060     ch = csh;                                       // after setting ch.
00061   }                                                     // End of scope.
00062   ah.RunAlg(ch, cx);
00063 }

CandStrip::CandStrip ( const CandStrip rhs  )  [protected]

Definition at line 66 of file CandStrip.cxx.

References fBestStripEnd.

00066                                          :
00067   CandBase(rhs),    
00068   fTPos(rhs.fTPos),
00069   fZPos(rhs.fZPos),
00070   fCalTimeType(rhs.fCalTimeType)
00071 {
00072   fBestStripEnd = rhs.fBestStripEnd;
00073 }

CandStrip::~CandStrip (  )  [protected, virtual]

Definition at line 76 of file CandStrip.cxx.

00077 {
00078 }


Member Function Documentation

void CandStrip::CreateLocalHandle (  )  [protected, virtual]

Implements CandBase.

Reimplemented in FarDetStrip.

Definition at line 81 of file CandStrip.cxx.

References CandStripHandle, and CandBase::SetLocalHandle().

Referenced by CandStrip(), and Dup().

00082 {
00083   SetLocalHandle(new CandStripHandle(this));
00084 }

CandStrip * CandStrip::Dup (  )  const [protected, virtual]

Implements CandBase.

Reimplemented in FarDetStrip.

Definition at line 87 of file CandStrip.cxx.

References CandBase::AddDaughterLink(), CandStrip(), CreateLocalHandle(), CandBase::fCandRecord, CandBase::GetDaughterIterator(), and CandBase::SetCandRecord().

00088 {
00089 
00090 // Base copy ctor dups owned pointers, but defers copying Daughter List.
00091 // Daughter List copy is made in the derived class Dup() function.
00092 // This is because base class copy constructor hasn't yet created
00093 // fLocalHandle with a CandHandle* of the full derived type.
00094   CandStrip *cb = new CandStrip(*this);           // Copy-ctor dups ptrs
00095   cb->CreateLocalHandle();   // Initializes fLocalHandle after copy-ctor
00096   cb->SetCandRecord(fCandRecord);
00097   TIter iterdau = GetDaughterIterator();
00098   CandHandle *dau;
00099   while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau);
00100   return cb;
00101 }

std::ostream & CandStrip::FormatToOStream ( std::ostream &  os,
Option_t *  option = "" 
) const [virtual]

Reimplemented from CandBase.

Definition at line 133 of file CandStrip.cxx.

References CalTimeType::AsString(), PlexStripEndId::AsString(), fBestStripEnd, fCalTimeType, CandBase::FormatToOStream(), fTPos, fZPos, CandBase::GetDataIndent(), and CandBase::GetIndentString().

00135 {
00136   CandBase::FormatToOStream(os,option);
00137 
00138   TString opt(option);
00139   if (!opt.Contains("v0")) { // v0 means suppress the data values
00140     const TString& indent = GetIndentString();
00141 
00142     static MsgFormat tfmt("f6.3");
00143     static MsgFormat zfmt("f8.3");
00144     static MsgFormat indxfmt("i6");
00145     static MsgFormat ifmt("i4");
00146     static MsgFormat timefmt("f10.9");
00147     os << indent << GetDataIndent()
00148        << fBestStripEnd.AsString("c")
00149        << " T=" << tfmt(fTPos)
00150        << " Z=" << zfmt(fZPos)
00151        << " CalTime=" << CalTimeType::AsString(fCalTimeType)
00152        << endl;
00153   }
00154   return os;
00155   
00156 }

Bool_t CandStrip::IsEquivalent ( const TObject *  rhs  )  const [protected, virtual]

Reimplemented from CandBase.

Definition at line 104 of file CandStrip.cxx.

References fBestStripEnd, fCalTimeType, fTPos, fZPos, CandBase::IsEquivalent(), CandBase::TestDisplayCandBanner(), and CandBase::TestEquality().

00105 {
00106   Bool_t result = true;
00107   if (!CandBase::IsEquivalent(rhs)) result = false;   // superclass test
00108   TestDisplayCandBanner("CandStrip");
00109   const CandStrip* rCnd = dynamic_cast<const CandStrip*>(rhs);
00110   if (rCnd == NULL) return false;
00111  
00112   result = TestEquality("fTPos",         this->fTPos,
00113                                          rCnd->fTPos)         && result;
00114   result = TestEquality("fZPos",         this->fZPos,
00115                                          rCnd->fZPos)         && result;
00116   result = TestEquality("fBestStripEnd", this->fBestStripEnd,
00117                                          rCnd->fBestStripEnd) && result;
00118   result = TestEquality("fCalTimeType",  this->fCalTimeType,
00119                                          rCnd->fCalTimeType)  && result;
00120 
00121   return result;
00122 }

CandStripHandle CandStrip::MakeCandidate ( AlgHandle ah,
CandContext cx 
) [static]

Reimplemented in FarDetStrip.

Definition at line 125 of file CandStrip.cxx.

References CandStrip().

Referenced by AlgFitTrackCam::GenerateNDSpectStrips(), AlgStripSRList::RunAlgFar(), AlgStripSRList::RunAlgMixed(), AlgStripSRList::RunAlgNear(), and AlgTrackSRList::SpectrometerTracking().

00126 {
00127   CandStripHandle csh;
00128   new CandStrip(ah, csh, cx);              // csh owns the new CandStrip
00129   return csh;
00130 }


Friends And Related Function Documentation

friend class CandStripHandle [friend]

Definition at line 24 of file CandStrip.h.

Referenced by CreateLocalHandle().


Member Data Documentation

PlexStripEndId CandStrip::fBestStripEnd [protected]

Definition at line 45 of file CandStrip.h.

Referenced by CandStrip(), FormatToOStream(), CandStripHandle::GetStripEndId(), IsEquivalent(), and CandStripHandle::SetBestStripEndId().

CalTimeType::CalTimeType_t CandStrip::fCalTimeType [protected]

Definition at line 44 of file CandStrip.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandStrip::fTPos [protected]

Definition at line 42 of file CandStrip.h.

Referenced by FormatToOStream(), and IsEquivalent().

Double_t CandStrip::fZPos [protected]

Definition at line 43 of file CandStrip.h.

Referenced by FormatToOStream(), and IsEquivalent().


The documentation for this class was generated from the following files:
Generated on Wed Sep 10 22:50:57 2014 for loon by  doxygen 1.4.7