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

AlgMSTCluster Class Reference

#include <AlgMSTCluster.h>

Inheritance diagram for AlgMSTCluster:

AlgBase List of all members.

Public Member Functions

 AlgMSTCluster ()
virtual ~AlgMSTCluster ()
virtual void Trace (const char *c) const
virtual void RunAlg (AlgConfig &ac, CandHandle &ch, CandContext &cx)

Constructor & Destructor Documentation

AlgMSTCluster::AlgMSTCluster  ) 
 

Definition at line 37 of file AlgMSTCluster.cxx.

00038 {
00039 //
00040 //  Purpose:    Default constructor.
00041 //
00042 //  Arguments:  n/a
00043 //
00044 //  Return:     n/a
00045 //
00046 }

AlgMSTCluster::~AlgMSTCluster  )  [virtual]
 

Definition at line 50 of file AlgMSTCluster.cxx.

00051 {
00052 //
00053 //  Purpose:    Default destructor.
00054 //
00055 //  Arguments:  n/a
00056 //
00057 //  Return:     n/a
00058 //
00059 }


Member Function Documentation

void AlgMSTCluster::RunAlg AlgConfig ac,
CandHandle ch,
CandContext cx
[virtual]
 

Implements AlgBase.

Definition at line 63 of file AlgMSTCluster.cxx.

References CandHandle::AddDaughterLink(), CandClusterHandle::GetCandSlice(), CandContext::GetDataIn(), CandHandle::GetDaughterIterator(), MSG, and CandClusterHandle::SetCandSlice().

00065 {
00066 //
00067 //  Purpose:  Fills the CandMSTCluster with CandDigiPairs constructed
00068 //            using the supplied CandDigiPairList.
00069 //
00070 //  Argument:
00071 //    ac        in    AlgConfig (not used).
00072 //    ch        in    Handle to the CandMSTCluster to fill.
00073 //    cx        in    CandContext containing a CandDigiPairList.
00074 //
00075 //  Return:   n/a
00076 //
00077 
00078    MSG("BubAlg", Msg::kVerbose)
00079       << "Starting AlgMSTCluster::RunAlg()" << endl;
00080 
00081 // Check for class of handle.
00082    assert(ch.InheritsFrom("CandMSTClusterHandle"));
00083    CandMSTClusterHandle &clh = dynamic_cast<CandMSTClusterHandle&>(ch);
00084 
00085    assert(cx.GetDataIn());
00086 
00087 // Check for class of input and create iterator.
00088    TIter *chhItr = 0;
00089    if (cx.GetDataIn()->InheritsFrom("TObjArray")) {
00090       const TObjArray *toay =
00091                        dynamic_cast<const TObjArray*>(cx.GetDataIn());
00092       chhItr = new TIter(toay);
00093    }
00094    else if (cx.GetDataIn()->InheritsFrom("CandDigiPairListHandle")) {
00095       const CandDigiPairListHandle *chlh =
00096             dynamic_cast<const CandDigiPairListHandle*>(cx.GetDataIn());
00097       chhItr = new TIter(chlh->GetDaughterIterator());
00098    }
00099    else if (cx.GetDataIn()->InheritsFrom("CandMSTClusterHandle")) {
00100       const CandMSTClusterHandle *cch =
00101             dynamic_cast<const CandMSTClusterHandle *>(cx.GetDataIn());
00102       chhItr = new TIter(cch->GetDaughterIterator());
00103       clh.SetCandSlice(cch->GetCandSlice());
00104    }
00105 
00106 // Iterate over CandDigiPair daughters.
00107    while (CandDigiPairHandle *chh =
00108              dynamic_cast<CandDigiPairHandle *>((*chhItr)())) {
00109       clh.AddDaughterLink(*chh);
00110    }
00111 
00112 // Clean-up.
00113    delete chhItr;
00114    chhItr = 0;
00115 }

void AlgMSTCluster::Trace const char *  c  )  const [virtual]
 

Reimplemented from AlgBase.

Definition at line 119 of file AlgMSTCluster.cxx.

References MSG.

00120 {
00121 //
00122 //  Purpose:  Trace the AlgMSTCluster.
00123 //
00124 //  Arguments:
00125 //    c          in    String tag for the trace.
00126 //
00127 //  Return:   n/a
00128 //
00129 
00130   MSG("BubCand", Msg::kDebug)
00131      << "**********Begin AlgMSTCluster::Trace(\"" << c << "\")" << endl
00132      << "**********End AlgMSTCluster::Trace(\"" << c << "\")" << endl;
00133 }


The documentation for this class was generated from the following files:
Generated on Thu Nov 1 15:55:26 2007 for loon by  doxygen 1.3.9.1