AlgChop Class Reference

#include <AlgChop.h>

Inheritance diagram for AlgChop:
AlgBase

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 13 of file AlgChop.h.


Constructor & Destructor Documentation

AlgChop::AlgChop (  ) 

Definition at line 38 of file AlgChop.cxx.

00039 {
00040 }

AlgChop::~AlgChop (  )  [virtual]

Definition at line 43 of file AlgChop.cxx.

00044 {
00045 }


Member Function Documentation

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

Makes a CandDigitList from a std::vector of CandDigitHandles.

Implements AlgBase.

Definition at line 49 of file AlgChop.cxx.

References digit(), CandContext::GetDataIn(), CandDigitHandle::GetPlexSEIdAltL(), CandDigitHandle::GetTime(), PlexSEIdAltL::IsVetoShield(), Msg::kError, and MSG.

00052 {
00056 
00057   const DigitVector* data_ptr =  
00058     dynamic_cast<const DigitVector*>((candContext.GetDataIn()));
00059 
00060   if(!data_ptr) {
00061     MSG("Chop",Msg::kError) << "Data input to AlgChop was bad." << std::endl;
00062     return;
00063   }
00064 
00065   assert(candHandle.InheritsFrom("CandDigitListHandle"));
00066   CandDigitListHandle &digitList = dynamic_cast<CandDigitListHandle &>(candHandle);
00067 
00068   // Loop through the digits and add them.
00069   // Select the first non-veto digit to be the start time for the slice.
00070 
00071   double tfirst = 9e99;
00072 
00073   for(UInt_t i=0;i<data_ptr->size(); i++) {
00074     CandDigitHandle digit = (*data_ptr)[i];
00075     digitList.AddDaughterLink(digit);
00076 
00077     if(! (digit.GetPlexSEIdAltL().IsVetoShield()) ) {
00078       double t = digit.GetTime();
00079       if(t<tfirst) tfirst = t;
00080     }
00081   }
00082 
00083   if(tfirst==9e99) tfirst = 0;
00084   digitList.SetAbsTime(tfirst);  
00085 }

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

Reimplemented from AlgBase.

Definition at line 88 of file AlgChop.cxx.

00089 {
00090 }


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1