CandTrackSRList Class Reference

#include <CandTrackSRList.h>

Inheritance diagram for CandTrackSRList:
CandTrackList CandRecoList CandBase CandRefCounted

List of all members.

Public Member Functions

 CandTrackSRList ()

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

TObjArray * fTrackClusterList
Double_t fCPUTime

Friends

class CandTrackSRListHandle

Detailed Description

Definition at line 20 of file CandTrackSRList.h.


Constructor & Destructor Documentation

CandTrackSRList::CandTrackSRList (  ) 

Definition at line 27 of file CandTrackSRList.cxx.

References Msg::kDebug, and MSG.

Referenced by Dup(), and MakeCandidate().

00027                                  :
00028   fTrackClusterList(0)
00029 , fCPUTime(0.)
00030 {
00031   MSG("Cand", Msg::kDebug)
00032             << "Begin CandTrackSRList::CandTrackSRList() ctor: " << endl
00033                                            << "UidInt = " << GetUidInt()
00034                            << ", ArchUidInt " << GetArchUidInt() << endl
00035                              << "No. of links = " << GetNLinks() << endl
00036               << "End CandTrackSRList::CandTrackSRList() ctor." << endl;
00037 }

CandTrackSRList::CandTrackSRList ( AlgHandle ah  )  [protected]

Definition at line 40 of file CandTrackSRList.cxx.

00040                                               :
00041   CandTrackList(ah)  // Should be the next class up on inheritance chain
00042 , fTrackClusterList(0)
00043 , fCPUTime(0.)
00044 {
00045 
00046 // The sole purpose of this constructor is to transmit the AlgHandle
00047 // up the inheritance chain to CandBase without having to invoke the
00048 // full constructor of an intermediate Candidate type which the highest
00049 // level Candidate might inherit from.  One only wants to create the
00050 // LocalHandle and invoke the RunAlg() method in the lowest level class.
00051 }

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

Definition at line 54 of file CandTrackSRList.cxx.

References CreateLocalHandle(), CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, MSG, and AlgHandle::RunAlg().

00055                                                                        :
00056   CandTrackList(ah)  // Should be the next class up on inheritance chain
00057 , fTrackClusterList(new TObjArray)
00058 , fCPUTime(0.)
00059 {
00060   CreateLocalHandle();
00061   MSG("Cand", Msg::kDebug)
00062   << "Begin CandTrackSRList::CandTrackSRList(AlgHandle &, CandHandle &,"
00063                                      << " CandContext &) ctor: " << endl
00064                                            << "UidInt = " << GetUidInt()
00065                            << ", ArchUidInt " << GetArchUidInt() << endl
00066                              << "No. of links = " << GetNLinks() << endl
00067    << "End CandTrackSRList::CandTrackSRList(AlgHandle &, CandHandle &, "
00068                                       << "CandContext &) ctor." << endl;
00069 
00070 // Run Algorithm to construct Candidate
00071   {                                                   // Start of scope.
00072     CandTrackSRListHandle cshl(this);       // cshl will go out of scope
00073     ch = cshl;                                      // after setting ch.
00074   }                                                     // End of scope.
00075   ah.RunAlg(ch, cx);
00076 }

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

Definition at line 79 of file CandTrackSRList.cxx.

References fTrackClusterList, CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, MSG, and tc.

00079                                                            :
00080   CandTrackList(rhs) // Should be the next class up on inheritance chain
00081 , fTrackClusterList(new TObjArray)
00082 , fCPUTime(rhs.fCPUTime)
00083 {
00084 
00085 //CreateLocalHandle(); // Moved to Dup function following copy-ctor call
00086   MSG("Cand", Msg::kDebug)
00087                              << "Begin CandTrackSRList::CandTrackSRList"
00088                         << "(const CandTrackSRList &rhs) ctor: " << endl
00089                                            << "UidInt = " << GetUidInt()
00090                            << ", ArchUidInt " << GetArchUidInt() << endl
00091                              << "No. of links = " << GetNLinks() << endl
00092                                << "End CandTrackSRList::CandTrackSRList"
00093                         << "(const CandTrackSRList &rhs) ctor." << endl;
00094 
00095   for (int i=0; i<=rhs.fTrackClusterList->GetLast(); i++) {
00096     TrackClusterSR *tc =
00097             dynamic_cast<TrackClusterSR*>(rhs.fTrackClusterList->At(i));
00098     fTrackClusterList->Add(new TrackClusterSR(*tc));
00099   }
00100 }

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

Definition at line 103 of file CandTrackSRList.cxx.

References fTrackClusterList, CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, MSG, and tc.

00104 {
00105   MSG("Cand", Msg::kDebug)
00106            << "Begin CandTrackSRList::~CandTrackSRList() dtor: " << endl
00107                                            << "UidInt = " << GetUidInt()
00108                            << ", ArchUidInt " << GetArchUidInt() << endl
00109                              << "No. of links = " << GetNLinks() << endl
00110              << "End CandTrackSRList::~CandTrackSRList() dtor." << endl;
00111 
00112   if (fTrackClusterList) {
00113     for (int i=0; i<=fTrackClusterList->GetLast(); i++) {
00114       TrackClusterSR *tc =
00115                 dynamic_cast<TrackClusterSR*>(fTrackClusterList->At(i));
00116       delete tc;
00117     }
00118     delete fTrackClusterList;
00119   }
00120 }


Member Function Documentation

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

Reimplemented from CandTrackList.

Definition at line 123 of file CandTrackSRList.cxx.

References CandTrackSRListHandle, and CandBase::SetLocalHandle().

Referenced by CandTrackSRList(), and Dup().

00124 {
00125   SetLocalHandle(new CandTrackSRListHandle(this));
00126 }

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

Reimplemented from CandTrackList.

Definition at line 129 of file CandTrackSRList.cxx.

References CandBase::AddDaughterLink(), CandTrackSRList(), CreateLocalHandle(), and CandBase::GetDaughterIterator().

00130 {
00131 
00132 // Base copy ctor dups owned pointers, but defers copying Daughter List.
00133 // Daughter List copy is made in the derived class Dup() function.
00134 // This is because base class copy constructor hasn't yet created
00135 // fLocalHandle with a CandHandle* of the full derived type.
00136   CandTrackSRList *cb = new CandTrackSRList(*this);         // Copy-ctor
00137   cb->CreateLocalHandle();   // Initializes fLocalHandle after copy-ctor
00138   TIter iterdau = GetDaughterIterator();
00139   CandHandle *dau;
00140   while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau);
00141   return cb;
00142 }

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

Reimplemented from CandTrackList.

Definition at line 145 of file CandTrackSRList.cxx.

References fCPUTime, fTrackClusterList, CandTrackList::IsEquivalent(), CandBase::TestDisplayCandBanner(), and CandBase::TestEquality().

00146 {
00147   Bool_t result = true;
00148   if (!CandTrackList::IsEquivalent(rhs)) result = false;   // superclass
00149   TestDisplayCandBanner("CandTrackSRList");
00150   const CandTrackSRList* rCnd =
00151                               dynamic_cast<const CandTrackSRList*>(rhs);
00152   if (rCnd == NULL) return false;
00153 
00154   result = TestGenericElemPtrTObjArrayPtrEquivalence<TrackClusterSR>(
00155                                                 "fTrackClusterList",
00156                                                 this->fTrackClusterList,
00157                                                 rCnd->fTrackClusterList,
00158                                                        kTRUE) && result;
00159   result = TestEquality("fCPUTime", this->fCPUTime, rCnd->fCPUTime)
00160                                                               && result;
00161 
00162   return result;
00163 }

CandTrackSRListHandle CandTrackSRList::MakeCandidate ( AlgHandle ah,
CandContext cx 
) [static]

Reimplemented from CandTrackList.

Definition at line 166 of file CandTrackSRList.cxx.

References CandTrackSRList().

Referenced by TrackSRListModule::Reco().

00168 {
00169   CandTrackSRListHandle cshl;
00170   new CandTrackSRList(ah, cshl, cx); //cshl owns the new CandTrackSRList
00171   return cshl;
00172 }


Friends And Related Function Documentation

friend class CandTrackSRListHandle [friend]

Definition at line 22 of file CandTrackSRList.h.

Referenced by CreateLocalHandle().


Member Data Documentation

Double_t CandTrackSRList::fCPUTime [protected]

Definition at line 40 of file CandTrackSRList.h.

Referenced by IsEquivalent().

TObjArray* CandTrackSRList::fTrackClusterList [protected]

Definition at line 38 of file CandTrackSRList.h.

Referenced by CandTrackSRList(), IsEquivalent(), and ~CandTrackSRList().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1