AlgSliceListFromChopList Class Reference

#include <AlgSliceListFromChopList.h>

Inheritance diagram for AlgSliceListFromChopList:
AlgBase

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 13 of file AlgSliceListFromChopList.h.


Constructor & Destructor Documentation

AlgSliceListFromChopList::AlgSliceListFromChopList (  ) 

Definition at line 41 of file AlgSliceListFromChopList.cxx.

00042 {
00043 }

AlgSliceListFromChopList::~AlgSliceListFromChopList (  )  [virtual]

Definition at line 46 of file AlgSliceListFromChopList.cxx.

00047 {
00048 }


Member Function Documentation

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

Looks at the Chop list. Takes each Chop (which is a digit list) and hands it to the strip maker algorithm to make a strip list, which is in fact a slice.

Implements AlgBase.

Definition at line 52 of file AlgSliceListFromChopList.cxx.

References CandHandle::AddDaughterLink(), Form(), AlgFactory::GetAlgHandle(), CandHandle::GetCandRecord(), Registry::GetCharString(), CandContext::GetDataIn(), CandHandle::GetDaughterIterator(), AlgFactory::GetInstance(), CandContext::GetMom(), Msg::kError, CandSlice::MakeCandidate(), MSG, CandHandle::SetName(), and CandHandle::SetTitle().

00055 {
00061 
00062   // Make sure output is the right kind.
00063   assert(candHandle.InheritsFrom("CandSliceListHandle"));
00064 
00065   // Get config parameters.
00066   const char* stripListAlgorithm = algConfig.GetCharString("StripListAlgorithm");
00067   const char* stripListAlgConfig = algConfig.GetCharString("StripListAlgConfig");
00068 
00069   // Set up the strip maker.
00070   AlgFactory &af = AlgFactory::GetInstance();
00071   AlgHandle ah = af.GetAlgHandle(stripListAlgorithm,stripListAlgConfig);
00072   CandContext cxx(this,candContext.GetMom());
00073   cxx.SetCandRecord(candHandle.GetCandRecord());
00074 
00075   // Get the input data (the list of Chops)
00076   const CandChopListHandle* chopList = 
00077     dynamic_cast<const CandChopListHandle*>(candContext.GetDataIn());
00078     
00079   if(!chopList) {
00080     MSG("Chop",Msg::kError) << "Data input to AlgSliceListFromChopList was bad." << std::endl;
00081     return;
00082   }
00083 
00084   Int_t nslice=0;
00085   CandDigitListHandleItr chopItr(chopList->GetDaughterIterator());
00086   while( CandDigitListHandle* chop = chopItr()) {
00087     cxx.SetDataIn(chop);
00088     CandSliceHandle slice = CandSlice::MakeCandidate(ah,cxx); // Some slight jiggery-pokery here: 
00089                                                               // I'm running a strip algorithm to make a slice
00090     slice.SetName(Form("Slice%d",nslice));
00091     slice.SetTitle(Form("Slice%d from %s",nslice,chop->GetName()));
00092     candHandle.AddDaughterLink(slice);
00093     nslice++;
00094   }
00095  
00096 }

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

Reimplemented from AlgBase.

Definition at line 99 of file AlgSliceListFromChopList.cxx.

00100 {
00101 }


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1