CandCluster3D Class Reference

#include <CandCluster3D.h>

Inheritance diagram for CandCluster3D:
CandReco CandBase CandRefCounted

List of all members.

Public Member Functions

 CandCluster3D ()

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

Bool_t fTrackLike
Bool_t fShowerLike

Friends

class CandCluster3DHandle

Detailed Description

Definition at line 20 of file CandCluster3D.h.


Constructor & Destructor Documentation

CandCluster3D::CandCluster3D (  ) 

Definition at line 22 of file CandCluster3D.cxx.

References Msg::kDebug, and MSG.

Referenced by Dup(), and MakeCandidate().

00022                              :
00023   fTrackLike(0),
00024   fShowerLike(0)
00025 {
00026   MSG("Cluster3D", Msg::kDebug)
00027     << "Standard constructor " << endl;
00028 }

CandCluster3D::CandCluster3D ( AlgHandle ah  )  [protected]

Definition at line 31 of file CandCluster3D.cxx.

00031                                           :
00032   CandReco(ah),   // Should be the next class up on inheritance chain
00033   fTrackLike(0),
00034   fShowerLike(0)
00035 {
00036 
00037 // The sole purpose of this constructor is to transmit the AlgHandle
00038 // up the inheritance chain to CandBase without having to invoke the
00039 // full constructor of an intermediate Candidate type which the highest
00040 // level Candidate might inherit from.  One only wants to create the
00041 // LocalHandle and invoke the RunAlg() method in the lowest level class.
00042 }

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

Definition at line 45 of file CandCluster3D.cxx.

References CreateLocalHandle(), and AlgHandle::RunAlg().

00046                                                                        :
00047   CandReco(ah),   // Should be the next class up on inheritance chain
00048   fTrackLike(0),
00049   fShowerLike(0)
00050 {
00051   CreateLocalHandle();
00052 
00053 // Run Algorithm to construct Candidate
00054   {                                                    // Start of scope
00055     CandCluster3DHandle csh(this);           // csh will go out of scope
00056     ch = csh;                                       // after setting ch.
00057   }                                                      // End of scope
00058 
00059   ah.RunAlg(ch, cx);
00060 }

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

Definition at line 63 of file CandCluster3D.cxx.

00063                                                      :
00064   CandReco(rhs),  // Should be the next class up on inheritance chain
00065   fTrackLike(0),
00066   fShowerLike(0)
00067 {
00068 
00069 //CreateLocalHandle(); // Moved to Dup function following copy-ctor call
00070 
00071 }

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

Definition at line 74 of file CandCluster3D.cxx.

References Msg::kDebug, and MSG.

00075 {
00076   MSG("Cluster3D", Msg::kDebug)
00077     << "Destructor " << endl;
00078 }


Member Function Documentation

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

Implements CandReco.

Definition at line 81 of file CandCluster3D.cxx.

References CandCluster3DHandle, and CandBase::SetLocalHandle().

Referenced by CandCluster3D(), and Dup().

00082 {
00083   SetLocalHandle(new CandCluster3DHandle(this));
00084 }

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

Implements CandReco.

Definition at line 87 of file CandCluster3D.cxx.

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

00088 {
00089 
00090 // Base copy ctor dups owned pointers, but defers copying Daughter List.
00091 // Daughter List copy is made in the derived class Dup() function.
00092 // This is because base class copy constructor hasn't yet created
00093 // fLocalHandle with a CandHandle* of the full derived type.
00094   CandCluster3D *cb = new CandCluster3D(*this);   // Copy-ctor dups ptrs
00095   cb->CreateLocalHandle();   // Initializes fLocalHandle after copy-ctor
00096   TIter iterdau = GetDaughterIterator();
00097   CandHandle *dau;
00098   while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau);
00099   return cb;
00100 }

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

Reimplemented from CandReco.

Definition at line 103 of file CandCluster3D.cxx.

References fShowerLike, fTrackLike, CandReco::IsEquivalent(), CandBase::TestDisplayCandBanner(), and CandBase::TestEquality().

00104 {
00105   Bool_t result = true;
00106   //if (!CandCluster::IsEquivalent(rhs)) result = false;// superclass test
00107   if (!CandReco::IsEquivalent(rhs)) result = false;// superclass test
00108   TestDisplayCandBanner("CandCluster3D");
00109   const CandCluster3D* rCnd = dynamic_cast<const CandCluster3D*>(rhs);
00110   if (rCnd == NULL) return false;
00111 
00112   result = TestEquality("fTrackLike", this->fTrackLike, 
00113                                       rCnd->fTrackLike)   && result;
00114 
00115   result = TestEquality("fShowerLike", this->fShowerLike,
00116                                        rCnd->fShowerLike) && result;
00117   return result;
00118 }

CandCluster3DHandle CandCluster3D::MakeCandidate ( AlgHandle ah,
CandContext cx 
) [static]

Definition at line 121 of file CandCluster3D.cxx.

References CandCluster3D().

Referenced by AlgCluster3DList::RunAlg().

00123 {
00124   // Create a handle
00125   CandCluster3DHandle csh;
00126 
00127   // Create a Candidate passing in handle, algorithm and context
00128   new CandCluster3D(ah, csh, cx);      // csh owns the new CandCluster3D
00129 
00130   return csh;
00131 }


Friends And Related Function Documentation

friend class CandCluster3DHandle [friend]

Definition at line 22 of file CandCluster3D.h.

Referenced by CreateLocalHandle().


Member Data Documentation

Bool_t CandCluster3D::fShowerLike [protected]

Definition at line 40 of file CandCluster3D.h.

Referenced by IsEquivalent().

Bool_t CandCluster3D::fTrackLike [protected]

Definition at line 39 of file CandCluster3D.h.

Referenced by IsEquivalent().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1