AlgTrackAtNuList Class Reference

#include <AlgTrackAtNuList.h>

Inheritance diagram for AlgTrackAtNuList:
AlgBase

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 6 of file AlgTrackAtNuList.h.


Constructor & Destructor Documentation

AlgTrackAtNuList::AlgTrackAtNuList (  ) 

Definition at line 24 of file AlgTrackAtNuList.cxx.

00025 {
00026 
00027 }

AlgTrackAtNuList::~AlgTrackAtNuList (  ) 

Definition at line 29 of file AlgTrackAtNuList.cxx.

00030 {
00031 
00032 }


Member Function Documentation

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

Implements AlgBase.

Definition at line 34 of file AlgTrackAtNuList.cxx.

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

00035 {
00036 
00037   MSG("AlgTrackAtNuList", Msg::kDebug) << "AlgTrackAtNuList::RunAlg(...)" << endl;
00038 
00039   // set name of candhandle
00040   CandTrackAtNuListHandle& tracklist = dynamic_cast<CandTrackAtNuListHandle&>(ch);
00041 
00042   // create alghandle + candcontext
00043   AlgFactory &af = AlgFactory::GetInstance();
00044   AlgHandle ah_trk = af.GetAlgHandle("AlgTrackAtNu", "default");
00045   CandRecord* candrec = (CandRecord*)(cx.GetCandRecord());
00046   CandContext cx_trk(this, cx.GetMom());
00047   cx_trk.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     // unpack tracks    
00054     TObjArray* arr = (TObjArray*)(cx_in->At(i));
00055 
00056     // create candidate track
00057     cx_trk.SetDataIn(arr);
00058     CandTrackAtNuHandle cth = CandTrackAtNu::MakeCandidate(ah_trk, cx_trk);
00059     cth.SetName(TString("CandTrackAtNuHandle"));
00060     cth.SetTitle(TString("Created by AlgTrackAtNu"));
00061 
00062     // add candtrack to candtracklist
00063     tracklist.AddDaughterLink(cth);
00064 
00065   }
00066 
00067 }

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

Reimplemented from AlgBase.

Definition at line 69 of file AlgTrackAtNuList.cxx.

00070 {
00071 
00072 }


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1