AlgShowerAtNuList Class Reference

#include <AlgShowerAtNuList.h>

Inheritance diagram for AlgShowerAtNuList:
AlgBase

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 6 of file AlgShowerAtNuList.h.


Constructor & Destructor Documentation

AlgShowerAtNuList::AlgShowerAtNuList (  ) 

Definition at line 24 of file AlgShowerAtNuList.cxx.

00025 {
00026 
00027 }

AlgShowerAtNuList::~AlgShowerAtNuList (  ) 

Definition at line 29 of file AlgShowerAtNuList.cxx.

00030 {
00031 
00032 }


Member Function Documentation

void AlgShowerAtNuList::RunAlg ( AlgConfig ac,
CandHandle ch,
CandContext cx 
) [virtual]

Implements AlgBase.

Definition at line 34 of file AlgShowerAtNuList.cxx.

References CandHandle::AddDaughterLink(), AlgFactory::GetAlgHandle(), CandContext::GetCandRecord(), CandContext::GetDataIn(), AlgFactory::GetInstance(), CandContext::GetMom(), Msg::kDebug, CandShowerAtNu::MakeCandidate(), MSG, CandHandle::SetName(), and CandHandle::SetTitle().

00035 {
00036 
00037   MSG("AlgShowerAtNuList", Msg::kDebug) << "AlgShowerAtNuList::RunAlg(...)" << endl;
00038 
00039   // set name of candhandle
00040   CandShowerAtNuListHandle& showerlist = dynamic_cast<CandShowerAtNuListHandle&>(ch);
00041 
00042   // create alghandle + candcontext
00043   AlgFactory &af = AlgFactory::GetInstance();
00044   AlgHandle ah_shw = af.GetAlgHandle("AlgShowerAtNu", "default");
00045   CandRecord* candrec = (CandRecord*)(cx.GetCandRecord());
00046   CandContext cx_shw(this, cx.GetMom());
00047   cx_shw.SetCandRecord(candrec);
00048 
00049   // accessing CandContext
00050   const TObjArray *cx_in = dynamic_cast<const TObjArray*>(cx.GetDataIn());
00051   for(Int_t i=0;i<1+cx_in->GetLast();i++){
00052    
00053     // access showers
00054     TObjArray* arr = (TObjArray*)(cx_in->At(i));
00055     
00056     // create candidate shower
00057     cx_shw.SetDataIn(arr);
00058     CandShowerAtNuHandle cshwh = CandShowerAtNu::MakeCandidate(ah_shw, cx_shw);
00059     cshwh.SetName(TString("CandShowerAtNuHandle"));
00060     cshwh.SetTitle(TString("Created by AlgShowerAtNu"));
00061 
00062     // add shower to shower list
00063     showerlist.AddDaughterLink(cshwh);
00064   }
00065 
00066 }

void AlgShowerAtNuList::Trace ( const char *  c  )  const [virtual]

Reimplemented from AlgBase.

Definition at line 68 of file AlgShowerAtNuList.cxx.

00069 {
00070 
00071 }


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1