Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CandFitTrack3.cxx

Go to the documentation of this file.
00001 
00002 // $Id: CandFitTrack3.cxx,v 1.1 2003/06/05 16:24:55 rjn Exp $
00003 //
00004 // CandFitTrack3
00005 //
00006 // This is a concrete Event Candidate (Reconstruction) object.
00007 // CandFitTrack3 is descended from CandFitTrack.
00008 //
00009 // Each concrete CandBase must define a Dup function.
00010 // CandBase must grant friendship to class CandRefer.
00011 //
00012 // Author:  R. Lee 2001.03.30
00013 //
00014 // Also see <a href="../../root_crib/index.html">The ROOT Crib</a> and 
00015 // <a href="../CandFitTrack3.html"> CandFitTrack3 Classes</a> (part of
00016 // <a href="../index.html">The MINOS Class User Guide</a>)End_Html
00018 
00019 #include "Algorithm/AlgHandle.h"
00020 #include "Algorithm/AlgConfig.h"
00021 #include "CandFitTrack3/CandFitTrack3.h"
00022 #include "CandFitTrack3/CandFitTrack3Handle.h"
00023 #include "MessageService/MsgService.h"
00024 
00025 ClassImp(CandFitTrack3)
00026 
00027 //______________________________________________________________________
00028 CVSID("$Id: CandFitTrack3.cxx,v 1.1 2003/06/05 16:24:55 rjn Exp $");
00029 
00030 //______________________________________________________________________
00031 CandFitTrack3::CandFitTrack3() 
00032 {
00033   MSG("Cand", Msg::kDebug)
00034                         << "Begin CandFitTrackSR::CandFitTrackSR() ctor: " << endl
00035                                            << "UidInt = " << GetUidInt()
00036                            << ", ArchUidInt " << GetArchUidInt() << endl
00037                              << "No. of links = " << GetNLinks() << endl
00038                           << "End CandFitTrack3::CandFitTrack3() ctor." << endl;
00039   Init();
00040 }
00041 
00042 //______________________________________________________________________
00043 CandFitTrack3::CandFitTrack3(AlgHandle &ah) :
00044   CandFitTrack(ah)    // Should be the next class up on inheritance chain
00045 {
00046 
00047 // The sole purpose of this constructor is to transmit the AlgHandle
00048 // up the inheritance chain to CandBase without having to invoke the
00049 // full constructor of an intermediate Candidate type which the highest
00050 // level Candidate might inherit from.  One only wants to create the
00051 // LocalHandle and invoke the RunAlg() method in the lowest level class.
00052 
00053  
00054 
00055 }
00056 
00057 //______________________________________________________________________
00058 CandFitTrack3::CandFitTrack3(AlgHandle &ah, CandHandle &ch, CandContext &cx) :
00059   CandFitTrack(ah)    // Should be the next class up on inheritance chain
00060 {
00061   CreateLocalHandle();
00062   MSG("Cand", Msg::kDebug)
00063              << "Begin CandFitTrack3::CandFitTrack3(AlgHandle &, CandHandle &, "
00064                                       << "CandContext &) ctor: " << endl
00065                                            << "UidInt = " << GetUidInt()
00066                            << ", ArchUidInt " << GetArchUidInt() << endl
00067                              << "No. of links = " << GetNLinks() << endl
00068                << "End CandFitTrack3::CandFitTrack3(AlgHandle &, CandHandle &, "
00069                                       << "CandContext &) ctor." << endl;
00070 
00071 
00072 // Run Algorithm to construct Candidate
00073   {                                         // Start of scope.
00074     CandFitTrack3Handle csh(this);              // csh will go out of scope
00075     ch = csh;                               // after setting ch.
00076   }
00077   ah.RunAlg(ch, cx);
00078 }
00079 
00080 //______________________________________________________________________
00081 CandFitTrack3::CandFitTrack3(const CandFitTrack3 &rhs) :
00082   CandFitTrack(rhs)  // Should be the next class up on inheritance chain
00083 {
00084 //CreateLocalHandle(); // Moved to Dup function following copy-ctor call
00085   MSG("Cand", Msg::kDebug)
00086     << "Begin CandFitTrack3::CandFitTrack3(const CandFitTrack3 &rhs) ctor: " << endl
00087                                            << "UidInt = " << GetUidInt()
00088                            << ", ArchUidInt " << GetArchUidInt() << endl
00089                              << "No. of links = " << GetNLinks() << endl
00090       << "End CandFitTrack3::CandFitTrack3(const CandFitTrack3 &rhs) ctor." << endl;
00091 
00092 }
00093 
00094 //______________________________________________________________________
00095 CandFitTrack3::~CandFitTrack3()
00096 {
00097   MSG("Cand", Msg::kDebug)
00098                        << "Begin CandFitTrack3::~CandFitTrack3() dtor: " << endl
00099                                            << "UidInt = " << GetUidInt()
00100                            << ", ArchUidInt " << GetArchUidInt() << endl
00101                              << "No. of links = " << GetNLinks() << endl
00102                          << "End CandFitTrack3::~CandFitTrack3() dtor." << endl;
00103 
00104 }
00105 
00106 //______________________________________________________________________
00107 void CandFitTrack3::CreateLocalHandle()
00108 {
00109   SetLocalHandle(new CandFitTrack3Handle(this));
00110 }
00111 
00112 //______________________________________________________________________
00113 CandFitTrack3 *CandFitTrack3::Dup() const
00114 {
00115 
00116 // Base copy ctor dups owned pointers, but defers copying Daughter List.
00117 // Daughter List copy is made in the derived class Dup() function.
00118 // This is because base class copy constructor hasn't yet created
00119 // fLocalHandle with a CandHandle* of the full derived type.
00120   CandFitTrack3 *cb = new CandFitTrack3(*this);       // Copy-ctor dups ptrs
00121   cb->CreateLocalHandle();   // Initializes fLocalHandle after copy-ctor
00122   TIter iterdau = GetDaughterIterator();
00123   CandHandle *dau;
00124   while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau);
00125   return cb;
00126 }
00127 
00128 //______________________________________________________________________
00129 CandFitTrack3Handle CandFitTrack3::MakeCandidate(AlgHandle &ah, CandContext &cx)
00130 {
00131   CandFitTrack3Handle csh;
00132   new CandFitTrack3(ah, csh, cx);          // csh owns the new CandFitTrack3
00133   return csh;
00134 }
00135 

Generated on Mon Feb 15 11:06:28 2010 for loon by  doxygen 1.3.9.1