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