#include <CandCluster.h>
Inheritance diagram for CandCluster:

Public Member Functions | |
| CandCluster () | |
| virtual std::ostream & | FormatToOStream (std::ostream &os, Option_t *option="") const |
Static Public Member Functions | |
| static CandClusterHandle | MakeCandidate (AlgHandle &ah, CandContext &cx) |
Protected Member Functions | |
| CandCluster (AlgHandle &ah) | |
| CandCluster (AlgHandle &ah, CandHandle &ch, CandContext &cx) | |
| CandCluster (const CandCluster &rhs) | |
| virtual | ~CandCluster () |
| virtual void | CreateLocalHandle () |
| virtual CandCluster * | Dup () const |
| virtual Bool_t | IsEquivalent (const TObject *rhs) const |
Protected Attributes | |
| CandSliceHandle * | fCandSlice |
| Bool_t | fTrackLike |
| Bool_t | fShowerLike |
Friends | |
| class | CandClusterHandle |
Definition at line 21 of file CandCluster.h.
| CandCluster::CandCluster | ( | ) |
Definition at line 32 of file CandCluster.cxx.
References CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, and MSG.
Referenced by Dup(), and MakeCandidate().
00032 : 00033 fCandSlice(0), 00034 fTrackLike(0), 00035 fShowerLike(0) 00036 { 00037 MSG("Cand", Msg::kDebug) 00038 << "Begin CandCluster::CandCluster() ctor: " << endl 00039 << "UidInt = " << GetUidInt() 00040 << ", ArchUidInt " << GetArchUidInt() << endl 00041 << "No. of links = " << GetNLinks() << endl 00042 << "End CandCluster::CandCluster() ctor." << endl; 00043 }
| CandCluster::CandCluster | ( | AlgHandle & | ah | ) | [protected] |
Definition at line 46 of file CandCluster.cxx.
00046 : 00047 CandBase(ah), // Should be the next class up on inheritance chain 00048 fCandSlice(0), 00049 fTrackLike(0), 00050 fShowerLike(0) 00051 { 00052 00053 // The sole purpose of this constructor is to transmit the AlgHandle 00054 // up the inheritance chain to CandBase without having to invoke the 00055 // full constructor of an intermediate Candidate type which the highest 00056 // level Candidate might inherit from. One only wants to create the 00057 // LocalHandle and invoke the RunAlg() method in the lowest level class. 00058 }
| CandCluster::CandCluster | ( | AlgHandle & | ah, | |
| CandHandle & | ch, | |||
| CandContext & | cx | |||
| ) | [protected] |
Definition at line 61 of file CandCluster.cxx.
References CreateLocalHandle(), CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, MSG, and AlgHandle::RunAlg().
00062 : 00063 CandBase(ah), // Should be the next class up on inheritance chain 00064 fCandSlice(0), 00065 fTrackLike(0), 00066 fShowerLike(0) 00067 { 00068 CreateLocalHandle(); 00069 MSG("Cand", Msg::kDebug) 00070 << "Begin CandCluster::CandCluster(AlgHandle &, CandHandle &, " 00071 << "CandContext &) ctor: " << endl 00072 << "UidInt = " << GetUidInt() 00073 << ", ArchUidInt " << GetArchUidInt() << endl 00074 << "No. of links = " << GetNLinks() << endl 00075 << "End CandCluster::CandCluster(AlgHandle &, CandHandle &, " 00076 << "CandContext &) ctor." << endl; 00077 00078 // Run Algorithm to construct Candidate 00079 { // Start of scope. 00080 CandClusterHandle cdh(this); // cdh will go out of scope 00081 ch = cdh; // after setting ch. 00082 } // End of scope. 00083 ah.RunAlg(ch, cx); 00084 }
| CandCluster::CandCluster | ( | const CandCluster & | rhs | ) | [protected] |
Definition at line 87 of file CandCluster.cxx.
References fCandSlice, CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, and MSG.
00087 : 00088 CandBase(rhs), // Should be the next class up on inheritance chain 00089 fCandSlice(0), 00090 fTrackLike(rhs.fTrackLike), 00091 fShowerLike(rhs.fShowerLike) 00092 { 00093 00094 //CreateLocalHandle(); // Moved to Dup function following copy-ctor call 00095 MSG("Cand", Msg::kDebug) 00096 << "Begin CandCluster::CandCluster(const CandCluster &rhs) ctor: " 00097 << endl 00098 << "UidInt = " << GetUidInt() 00099 << ", ArchUidInt " << GetArchUidInt() << endl 00100 << "No. of links = " << GetNLinks() << endl 00101 << "End CandCluster::CandCluster(const CandCluster &rhs) ctor." 00102 << endl; 00103 00104 if (rhs.fCandSlice) // Make an owned CandHandle* 00105 fCandSlice = (rhs.fCandSlice)->DupHandle(); 00106 00107 }
| CandCluster::~CandCluster | ( | ) | [protected, virtual] |
Definition at line 110 of file CandCluster.cxx.
References fCandSlice, CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, and MSG.
00111 { 00112 MSG("Cand", Msg::kDebug) 00113 << "Begin CandCluster::~CandCluster() dtor: " << endl 00114 << "UidInt = " << GetUidInt() 00115 << ", ArchUidInt " << GetArchUidInt() << endl 00116 << "No. of links = " << GetNLinks() << endl 00117 << "End CandCluster::~CandCluster() dtor." << endl; 00118 00119 // fCandSlice is an owned CandHandle* starting at CandCluster version 2 00120 delete fCandSlice; 00121 }
| void CandCluster::CreateLocalHandle | ( | ) | [protected, virtual] |
Implements CandBase.
Definition at line 124 of file CandCluster.cxx.
References CandClusterHandle, and CandBase::SetLocalHandle().
Referenced by CandCluster(), and Dup().
00125 { 00126 SetLocalHandle(new CandClusterHandle(this)); 00127 }
| CandCluster * CandCluster::Dup | ( | ) | const [protected, virtual] |
Implements CandBase.
Definition at line 130 of file CandCluster.cxx.
References CandBase::AddDaughterLink(), CandCluster(), CreateLocalHandle(), CandBase::fCandRecord, CandBase::GetDaughterIterator(), and CandBase::SetCandRecord().
00131 { 00132 00133 // Base copy ctor dups owned pointers, but defers copying Daughter List. 00134 // Daughter List copy is made in the derived class Dup() function. 00135 // This is because base class copy constructor hasn't yet created 00136 // fLocalHandle with a CandHandle* of the full derived type. 00137 CandCluster *cb = new CandCluster(*this); // Copy-ctor dups ptrs 00138 cb->CreateLocalHandle(); // Initializes fLocalHandle after copy-ctor 00139 cb->SetCandRecord(fCandRecord); 00140 TIter iterdau = GetDaughterIterator(); 00141 CandHandle *dau; 00142 while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau); 00143 return cb; 00144 }
| std::ostream & CandCluster::FormatToOStream | ( | std::ostream & | os, | |
| Option_t * | option = "" | |||
| ) | const [virtual] |
Reimplemented from CandBase.
Definition at line 175 of file CandCluster.cxx.
References CandBase::FormatToOStream(), fShowerLike, fTrackLike, CandBase::GetDataIndent(), and CandBase::GetIndentString().
00177 { 00178 CandBase::FormatToOStream(os,option); 00179 00180 00181 TString opt(option); 00182 if (!opt.Contains("v0")) { // v0 means suppress the data values 00183 const TString& indent = GetIndentString(); 00184 00185 os << indent << GetDataIndent() 00186 << "TrackLike=" << (fTrackLike?"true":"false") 00187 << " ShowerLike=" << (fShowerLike?"true":"false") 00188 << endl; 00189 } 00190 return os; 00191 00192 }
| Bool_t CandCluster::IsEquivalent | ( | const TObject * | rhs | ) | const [protected, virtual] |
Reimplemented from CandBase.
Definition at line 147 of file CandCluster.cxx.
References fCandSlice, fShowerLike, fTrackLike, CandBase::IsEquivalent(), CandBase::TestCandHandleDup(), CandBase::TestDisplayCandBanner(), and CandBase::TestEquality().
00148 { 00149 Bool_t result = true; 00150 if (!CandBase::IsEquivalent(rhs)) result = false; // superclass test 00151 TestDisplayCandBanner("CandCluster"); 00152 const CandCluster* rCnd = dynamic_cast<const CandCluster*>(rhs); 00153 if (rCnd == NULL) return false; 00154 00155 result = TestCandHandleDup("fCandSlice", this->fCandSlice, 00156 rCnd->fCandSlice) && result; 00157 result = TestEquality("fTrackLike", this->fTrackLike, 00158 rCnd->fTrackLike) && result; 00159 00160 result = TestEquality("fShowerLike", this->fShowerLike, 00161 rCnd->fShowerLike) && result; 00162 return result; 00163 }
| CandClusterHandle CandCluster::MakeCandidate | ( | AlgHandle & | ah, | |
| CandContext & | cx | |||
| ) | [static] |
Definition at line 166 of file CandCluster.cxx.
References CandCluster().
Referenced by AlgEventSRList::BuildEventFromUnassoc(), AlgEventSRList::CreatePrimaryShower(), AlgEventSRList::MergeShowers(), and AlgClusterSRList::RunAlg().
00168 { 00169 CandClusterHandle cdh; 00170 new CandCluster(ah, cdh, cx); // cdh owns the new CandCluster 00171 return cdh; 00172 }
friend class CandClusterHandle [friend] |
CandSliceHandle* CandCluster::fCandSlice [protected] |
Definition at line 44 of file CandCluster.h.
Referenced by CandCluster(), IsEquivalent(), and ~CandCluster().
Bool_t CandCluster::fShowerLike [protected] |
Bool_t CandCluster::fTrackLike [protected] |
1.4.7