CandDigitList Class Reference

#include <CandDigitList.h>

Inheritance diagram for CandDigitList:

CandBase CandRefCounted CandDeMuxDigitList List of all members.

Public Member Functions

 CandDigitList ()
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const

Static Public Member Functions

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

Protected Member Functions

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

Protected Attributes

Double_t fAbsTime
Bool_t fIsSparse

Friends

class CandDigitListHandle

Detailed Description

Definition at line 22 of file CandDigitList.h.


Constructor & Destructor Documentation

CandDigitList::CandDigitList (  ) 

Definition at line 27 of file CandDigitList.cxx.

References Msg::kDebug, and MSG.

Referenced by Dup(), and MakeCandidate().

00027                              :
00028   fAbsTime(0),
00029   fIsSparse(true)
00030 {
00031 //CreateLocalHandle();       // LocalHandle is now furnished by Streamer
00032   MSG("Cand", Msg::kDebug)
00033                 << "Begin CandDigitList::CandDigitList() ctor: " << endl
00034                                            << "UidInt = " << GetUidInt()
00035                            << ", ArchUidInt " << GetArchUidInt() << endl
00036                              << "No. of links = " << GetNLinks() << endl
00037                   << "End CandDigitList::CandDigitList() ctor." << endl;
00038 }

CandDigitList::CandDigitList ( AlgHandle ah  )  [protected]

Definition at line 41 of file CandDigitList.cxx.

00041                                           :
00042   CandBase(ah),      // Should be the next class up on inheritance chain
00043   fAbsTime(0),
00044   fIsSparse(true)
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 }

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

Definition at line 56 of file CandDigitList.cxx.

References CreateLocalHandle(), CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, MSG, and AlgHandle::RunAlg().

00057                                                                        :
00058   CandBase(ah),      // Should be the next class up on inheritance chain
00059   fAbsTime(0),
00060   fIsSparse(true)
00061 {
00062   CreateLocalHandle();
00063 #ifdef ENABLE_DEBUG_MSG
00064   MSG("Cand", Msg::kDebug)
00065      << "Begin CandDigitList::CandDigitList(AlgHandle &, CandHandle &, "
00066                                       << "CandContext& ) ctor: " << endl
00067                                            << "UidInt = " << GetUidInt()
00068                            << ", ArchUidInt " << GetArchUidInt() << endl
00069                              << "No. of links = " << GetNLinks() << endl
00070        << "End CandDigitList::CandDigitList(AlgHandle &, CandHandle &, "
00071                                      << "CandContext& ) ctor: " << endl;
00072 #endif
00073 
00074 // Run Algorithm to construct Candidate
00075    {                                        // Start of scope.
00076      CandDigitListHandle cdlh(this);        // cdlh will go out of scope
00077      ch = cdlh;                             // after setting ch.
00078    }                                        // End of scope.
00079    ah.RunAlg(ch, cx);
00080 }

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

Definition at line 83 of file CandDigitList.cxx.

References CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, and MSG.

00083                                                      :
00084   CandBase(rhs)      // Should be the next class up on inheritance chain
00085 , fAbsTime(rhs.fAbsTime)
00086 , fIsSparse(rhs.fIsSparse)
00087 {
00088 //CreateLocalHandle(); // Moved to Dup function following copy-ctor call
00089   MSG("Cand", Msg::kDebug)
00090          << "Begin CandDigitList::CandDigitList(const CandDigitList &) "
00091                                                      << "ctor: " << endl
00092                                            << "UidInt = " << GetUidInt()
00093                            << ", ArchUidInt " << GetArchUidInt() << endl
00094                              << "No. of links = " << GetNLinks() << endl
00095       << "End CandDigitList::CandDigitList(const CandDigitList &) ctor."
00096                                                                 << endl;
00097 }

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

Definition at line 100 of file CandDigitList.cxx.

References CandBase::GetArchUidInt(), CandRefCounted::GetNLinks(), CandBase::GetUidInt(), Msg::kDebug, and MSG.

00101 {
00102   MSG("Cand", Msg::kDebug)
00103          << "Begin CandDigitList::~CandDigitList() " << "dtor: " << endl
00104                                            << "UidInt = " << GetUidInt()
00105                            << ", ArchUidInt " << GetArchUidInt() << endl
00106                              << "No. of links = " << GetNLinks() << endl
00107                  << "End CandDigitList::~CandDigitList() dtor." << endl;
00108 }


Member Function Documentation

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

Implements CandBase.

Reimplemented in CandDeMuxDigitList.

Definition at line 111 of file CandDigitList.cxx.

References CandDigitListHandle, and CandBase::SetLocalHandle().

Referenced by CandDigitList(), and Dup().

00112 {
00113   SetLocalHandle(new CandDigitListHandle(this));
00114 }

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

Implements CandBase.

Reimplemented in CandDeMuxDigitList.

Definition at line 117 of file CandDigitList.cxx.

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

00118 {
00119 
00120 // Base copy ctor dups owned pointers, but defers copying Daughter List.
00121 // Daughter List copy is made in the derived class Dup() function.
00122 // This is because base class copy constructor hasn't yet created
00123 // fLocalHandle with a CandHandle* of the full derived type.
00124   CandDigitList *cb = new CandDigitList(*this);   // Copy-ctor dups ptrs
00125   cb->CreateLocalHandle();   // Initializes fLocalHandle after copy-ctor
00126   TIter iterdau = GetDaughterIterator();
00127   CandHandle *dau;
00128   while ((dau=(CandHandle *) iterdau())) cb->AddDaughterLink(*dau);
00129   return cb;
00130 }

std::ostream & CandDigitList::FormatToOStream ( std::ostream &  os,
Option_t *  option = "" 
) const [virtual]

Reimplemented from CandBase.

Reimplemented in CandDeMuxDigitList.

Definition at line 159 of file CandDigitList.cxx.

References fAbsTime, fIsSparse, CandBase::FormatToOStream(), CandBase::GetDataIndent(), and CandBase::GetIndentString().

Referenced by CandDeMuxDigitList::FormatToOStream().

00161 {
00162   CandBase::FormatToOStream(os,option);
00163 
00164   TString opt(option);
00165   if (!opt.Contains("v0")) { // v0 means suppress the data values
00166     const TString& indent = GetIndentString();
00167 
00168     static MsgFormat timefmt("f18.9");
00169     os << indent << GetDataIndent()
00170        << "AbsTime " << timefmt(fAbsTime) 
00171        << " " << (fIsSparse?"Is":"IsNot") << "Sparse"
00172        << endl;
00173   }
00174   return os;
00175   
00176 }

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

Reimplemented from CandBase.

Reimplemented in CandDeMuxDigitList.

Definition at line 133 of file CandDigitList.cxx.

References fAbsTime, fIsSparse, CandBase::IsEquivalent(), CandBase::TestDisplayCandBanner(), and CandBase::TestEquality().

Referenced by CandDeMuxDigitList::IsEquivalent().

00134 {
00135   Bool_t result = true;
00136   if (!CandBase::IsEquivalent(rhs)) result = false;   // superclass test
00137   TestDisplayCandBanner("CandDigitList");
00138   const CandDigitList* rCnd = dynamic_cast<const CandDigitList*>(rhs);
00139   if (rCnd == NULL) return false;
00140 
00141   result = TestEquality("fAbsTime",  this->fAbsTime,
00142                                      rCnd->fAbsTime)  && result;
00143   result = TestEquality("fIsSparse", this->fIsSparse,
00144                                      rCnd->fIsSparse) && result;
00145 
00146   return result;
00147 }

CandDigitListHandle CandDigitList::MakeCandidate ( AlgHandle ah,
CandContext cx 
) [static]

Reimplemented in CandDeMuxDigitList.

Definition at line 150 of file CandDigitList.cxx.

References CandDigitList().

Referenced by RemoveMuon::Reco(), MergeEvent::Reco(), FilterDigitListModule::Reco(), DigitListModule::Reco(), BiggestChopModule::Reco(), AlgChopListSharp2::RunAlg(), AlgChopListSharp::RunAlg(), AlgChopListPerfectMC::RunAlg(), AlgChopListMitre::RunAlg(), and AlgChopListFar::RunAlg().

00152 {
00153   CandDigitListHandle cdlh;
00154   new CandDigitList(ah, cdlh, cx);    // cdlh owns the new CandDigitList
00155   return cdlh;
00156 }


Friends And Related Function Documentation

friend class CandDigitListHandle [friend]

Definition at line 25 of file CandDigitList.h.

Referenced by CreateLocalHandle().


Member Data Documentation

Double_t CandDigitList::fAbsTime [protected]

Definition at line 36 of file CandDigitList.h.

Referenced by FormatToOStream(), and IsEquivalent().

Bool_t CandDigitList::fIsSparse [protected]

Definition at line 37 of file CandDigitList.h.

Referenced by FormatToOStream(), and IsEquivalent().


The documentation for this class was generated from the following files:
Generated on Wed Sep 10 22:50:55 2014 for loon by  doxygen 1.4.7