00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00014
00015 #include "Algorithm/AlgHandle.h"
00016 #include "MessageService/MsgService.h"
00017 #include "RecoBase/CandTrackList.h"
00018 #include "RecoBase/CandTrackListHandle.h"
00019
00020 ClassImp(CandTrackList)
00021
00022
00023 CVSID("$Id: CandTrackList.cxx,v 1.7 2005/02/02 11:38:35 tagg Exp $");
00024
00025 #include "Candidate/CandBase.tpl"
00026
00027
00028 CandTrackList::CandTrackList()
00029 {
00030 MSG("Cand", Msg::kDebug)
00031 << "Begin CandTrackList::CandTrackList() ctor: " << endl
00032 << "UidInt = " << GetUidInt()
00033 << ", ArchUidInt " << GetArchUidInt() << endl
00034 << "No. of links = " << GetNLinks() << endl
00035 << "End CandTrackList::CandTrackList() ctor." << endl;
00036 }
00037
00038
00039 CandTrackList::CandTrackList(AlgHandle &ah) :
00040 CandRecoList(ah)
00041 {
00042
00043
00044
00045
00046
00047
00048 }
00049
00050
00051 CandTrackList::CandTrackList(AlgHandle &ah, CandHandle &ch,
00052 CandContext &cx) :
00053 CandRecoList(ah)
00054 {
00055 CreateLocalHandle();
00056 MSG("Cand", Msg::kDebug)
00057 << "Begin CandTrackList::CandTrackList(AlgHandle &, CandHandle &, "
00058 << "CandContext &) ctor: " << endl
00059 << "UidInt = " << GetUidInt()
00060 << ", ArchUidInt " << GetArchUidInt() << endl
00061 << "No. of links = " << GetNLinks() << endl
00062 << "End CandTrackList::CandTrackList(AlgHandle &, CandHandle &, "
00063 << "CandContext &) ctor." << endl;
00064
00065
00066 {
00067 CandTrackListHandle cdh(this);
00068 ch = cdh;
00069 }
00070 ah.RunAlg(ch, cx);
00071
00072 }
00073
00074
00075 CandTrackList::CandTrackList(const CandTrackList &rhs) :
00076 CandRecoList(rhs)
00077 {
00078
00079
00080 MSG("Cand", Msg::kDebug)
00081 << "Begin CandTrackList::CandTrackList"
00082 << "(const CandTrackList &rhs) ctor: " << endl
00083 << "UidInt = " << GetUidInt()
00084 << ", ArchUidInt " << GetArchUidInt() << endl
00085 << "No. of links = " << GetNLinks() << endl
00086 << "End CandTrackList::CandTrackList"
00087 << "(const CandTrackList &rhs) ctor." << endl;
00088 }
00089
00090
00091 CandTrackList::~CandTrackList()
00092 {
00093 MSG("Cand", Msg::kDebug)
00094 << "Begin CandTrackList::~CandTrackList() dtor: " << endl
00095 << "UidInt = " << GetUidInt()
00096 << ", ArchUidInt " << GetArchUidInt() << endl
00097 << "No. of links = " << GetNLinks() << endl
00098 << "End CandTrackList::~CandTrackList() dtor." << endl;
00099 }
00100
00101
00102 void CandTrackList::CreateLocalHandle()
00103 {
00104 SetLocalHandle(new CandTrackListHandle(this));
00105 }
00106
00107
00108 CandTrackList *CandTrackList::Dup() const
00109 {
00110
00111
00112
00113
00114
00115 CandTrackList *cb = new CandTrackList(*this);
00116 cb->CreateLocalHandle();
00117 cb->SetCandRecord(fCandRecord);
00118 TIter iterdau = GetDaughterIterator();
00119 CandHandle *dau;
00120 while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau);
00121 return cb;
00122 }
00123
00124
00125 Bool_t CandTrackList::IsEquivalent(const TObject *rhs) const
00126 {
00127 Bool_t result = true;
00128 if (!CandRecoList::IsEquivalent(rhs)) result = false;
00129 TestDisplayCandBanner("CandTrackList");
00130 const CandTrackList* rCnd = dynamic_cast<const CandTrackList*>(rhs);
00131 if (rCnd == NULL) return false;
00132
00133 TestNothing("CandTrackList");
00134
00135 return result;
00136 }
00137
00138
00139 CandTrackListHandle CandTrackList::MakeCandidate(AlgHandle &ah,
00140 CandContext &cx)
00141 {
00142 CandTrackListHandle cdh;
00143 new CandTrackList(ah, cdh, cx);
00144 return cdh;
00145 }