CandDeMuxDigit Class Reference

#include <CandDeMuxDigit.h>

Inheritance diagram for CandDeMuxDigit:
CandDigit CandBase CandRefCounted

List of all members.

Public Types

enum  EDeMuxDigitFlag { kDeMuxOK = 0x00, kXTalk = 0x01, kLowSignal = 0x02 }
typedef enum
CandDeMuxDigit::EDeMuxDigitFlag 
DeMuxDigitFlag_t

Public Member Functions

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

Static Public Member Functions

static CandDeMuxDigitHandle MakeCandidate (AlgHandle &ah, CandContext &cx)
static const char * AsString (DeMuxDigitFlag_t)

Protected Member Functions

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

Protected Attributes

Int_t fDeMuxDigitFlag

Friends

class CandDeMuxDigitHandle

Detailed Description

Definition at line 23 of file CandDeMuxDigit.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
kDeMuxOK 
kXTalk 
kLowSignal 

Definition at line 29 of file CandDeMuxDigit.h.

00029                                 {
00030      kDeMuxOK = 0x00,
00031      kXTalk = 0x01,
00032      kLowSignal = 0x02
00033    } DeMuxDigitFlag_t;


Constructor & Destructor Documentation

CandDeMuxDigit::CandDeMuxDigit (  ) 

Definition at line 26 of file CandDeMuxDigit.cxx.

References Msg::kDebug, and MSG.

Referenced by Dup(), and MakeCandidate().

00026                                :
00027   fDeMuxDigitFlag(0)
00028 {
00029 
00030   MSG("Cand", Msg::kDebug)
00031               << "Begin CandDeMuxDigit::CandDeMuxDigit() ctor: " << endl
00032                                            << "UidInt = " << GetUidInt()
00033                            << ", ArchUidInt " << GetArchUidInt() << endl
00034                              << "No. of links = " << GetNLinks() << endl
00035                 << "End CandDeMuxDigit::CandDeMuxDigit() ctor." << endl;
00036 }

CandDeMuxDigit::CandDeMuxDigit ( AlgHandle ah  )  [protected]

Definition at line 39 of file CandDeMuxDigit.cxx.

00039                                             :
00040   CandDigit(ah),     // Should be the next class up on inheritance chain
00041   fDeMuxDigitFlag(0)
00042 {
00043 
00044 // The sole purpose of this constructor is to transmit the AlgHandle
00045 // up the inheritance chain to CandBase without having to invoke the
00046 // full constructor of an intermediate Candidate type which the highest
00047 // level Candidate might inherit from.  One only wants to create the
00048 // LocalHandle and invoke the RunAlg() method in the lowest level class.
00049 
00050 }

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

Definition at line 53 of file CandDeMuxDigit.cxx.

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

00054                                                                        :
00055   CandDigit(ah),     // Should be the next class up on inheritance chain
00056   fDeMuxDigitFlag(0)
00057 {
00058   CreateLocalHandle();
00059   MSG("Cand", Msg::kDebug)
00060    << "Begin CandDeMuxDigit::CandDeMuxDigit(AlgHandle &, CandHandle &, "
00061                                       << "CandContext &) ctor: " << endl
00062                                            << "UidInt = " << GetUidInt()
00063                            << ", ArchUidInt " << GetArchUidInt() << endl
00064                              << "No. of links = " << GetNLinks() << endl
00065      << "End CandDeMuxDigit::CandDeMuxDigit(AlgHandle &, CandHandle &, "
00066                                       << "CandContext &) ctor." << endl;
00067 
00068 // Run Algorithm to construct Candidate
00069    {                                                  // Start of scope.
00070      CandDeMuxDigitHandle cdh(this);         // cdh will go out of scope
00071      ch = cdh;                                      // after setting ch.
00072    }                                                    // End of scope.
00073    ah.RunAlg(ch, cx);
00074 }

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

Definition at line 77 of file CandDeMuxDigit.cxx.

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

00077                                                         :
00078   CandDigit(rhs),    // Should be the next class up on inheritance chain
00079   fDeMuxDigitFlag(rhs.fDeMuxDigitFlag)
00080 {
00081   MSG("Cand", Msg::kDebug)
00082 << "Begin CandDeMuxDigit::CandDeMuxDigit(const CandDeMuxDigit&rhs)ctor:"
00083                                                                  << endl
00084                                            << "UidInt = " << GetUidInt()
00085                            << ", ArchUidInt " << GetArchUidInt() << endl
00086                              << "No. of links = " << GetNLinks() << endl
00087 << "End CandDeMuxDigit::CandDeMuxDigit(const CandDeMuxDigit &rhs) ctor."
00088                                                                 << endl;
00089 }

CandDeMuxDigit::CandDeMuxDigit ( const CandDigit rhs  )  [protected]

Definition at line 92 of file CandDeMuxDigit.cxx.

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

00092                                                    : // Special method
00093   CandDigit(rhs),    // Should be the next class up on inheritance chain
00094   fDeMuxDigitFlag(0)
00095 {
00096   MSG("Cand", Msg::kDebug)
00097 << "Begin CandDeMuxDigit::CandDeMuxDigit(const CandDigit&rhs)ctor:"
00098                                                                  << endl
00099                                            << "UidInt = " << GetUidInt()
00100                            << ", ArchUidInt " << GetArchUidInt() << endl
00101                              << "No. of links = " << GetNLinks() << endl
00102 << "End CandDeMuxDigit::CandDeMuxDigit(const CandDigit &rhs) ctor."
00103                                                                 << endl;
00104 }

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

Definition at line 107 of file CandDeMuxDigit.cxx.

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

00108 {
00109   MSG("Cand", Msg::kDebug)
00110              << "Begin CandDeMuxDigit::~CandDeMuxDigit() dtor: " << endl
00111                                            << "UidInt = " << GetUidInt()
00112                            << ", ArchUidInt " << GetArchUidInt() << endl
00113                              << "No. of links = " << GetNLinks() << endl
00114                << "End CandDeMuxDigit::~CandDeMuxDigit() dtor." << endl;
00115 }


Member Function Documentation

const char * CandDeMuxDigit::AsString ( DeMuxDigitFlag_t  dflag  )  [static]

Definition at line 182 of file CandDeMuxDigit.cxx.

References Form(), kDeMuxOK, kLowSignal, and kXTalk.

Referenced by FormatToOStream().

00183 {
00184   if (dflag == kDeMuxOK) return "=DeMuxOK=";
00185   
00186   std::string result("=");
00187   if (dflag & kXTalk     ) result += "XTalk,";
00188   if (dflag & kLowSignal ) result += "LowSignal,";
00189 
00190   static Int_t unknownBits = ~(kXTalk|kLowSignal);
00191   if ( dflag & unknownBits ) return Form("0x%8.8x",dflag);  // dump hex if unknown bits
00192 
00193   // replace trailing ',' with = delimiter
00194   result.replace(result.size()-1,1,"=");
00195   return Form("%s",result.c_str());
00196 }

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

Reimplemented from CandDigit.

Definition at line 118 of file CandDeMuxDigit.cxx.

References CandDeMuxDigitHandle, and CandBase::SetLocalHandle().

Referenced by CandDeMuxDigit(), Dup(), and CandDeMuxDigitHandle::DupCandFromBase().

00119 {
00120   SetLocalHandle(new CandDeMuxDigitHandle(this));
00121 }

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

Reimplemented from CandDigit.

Definition at line 124 of file CandDeMuxDigit.cxx.

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

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

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

Reimplemented from CandDigit.

Definition at line 165 of file CandDeMuxDigit.cxx.

References AsString(), fDeMuxDigitFlag, CandBase::GetDataIndent(), and CandBase::GetIndentString().

00167 {
00168   CandDigit::FormatToOStream(os,option);
00169 
00170   TString opt(option);
00171   if (!opt.Contains("v0")) { // v0 means suppress the data values
00172     const TString& indent = GetIndentString();
00173     os << indent << GetDataIndent()
00174        << AsString((DeMuxDigitFlag_t)fDeMuxDigitFlag)
00175        << endl;
00176   }
00177   return os;
00178   
00179 }

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

Reimplemented from CandDigit.

Definition at line 140 of file CandDeMuxDigit.cxx.

References fDeMuxDigitFlag, CandDigit::IsEquivalent(), CandBase::TestDisplayCandBanner(), and CandBase::TestEquality().

00141 {
00142   Bool_t result = true;
00143   if (!CandDigit::IsEquivalent(rhs)) result = false;  // superclass test
00144   TestDisplayCandBanner("CandDeMuxDigit");
00145   const CandDeMuxDigit* rCnd = dynamic_cast<const CandDeMuxDigit*>(rhs);
00146   if (rCnd == NULL) return false;
00147   
00148   result = TestEquality("fDeMuxDigitFlag",
00149                                        this->fDeMuxDigitFlag,
00150                                        rCnd->fDeMuxDigitFlag) && result;
00151 
00152   return result;
00153 }

CandDeMuxDigitHandle CandDeMuxDigit::MakeCandidate ( AlgHandle ah,
CandContext cx 
) [static]

Reimplemented from CandDigit.

Definition at line 156 of file CandDeMuxDigit.cxx.

References CandDeMuxDigit().

00158 {
00159   CandDeMuxDigitHandle cdh;
00160   new CandDeMuxDigit(ah, cdh, cx);    // cdh owns the new CandDeMuxDigit
00161   return cdh;
00162 }


Friends And Related Function Documentation

friend class CandDeMuxDigitHandle [friend]

Definition at line 26 of file CandDeMuxDigit.h.

Referenced by CreateLocalHandle().


Member Data Documentation

Definition at line 46 of file CandDeMuxDigit.h.

Referenced by FormatToOStream(), and IsEquivalent().


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

Generated on 25 Sep 2017 for loon by  doxygen 1.6.1