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