AlgDIConvert Class Reference

#include <AlgDIConvert.h>

Inheritance diagram for AlgDIConvert:
AlgBase

List of all members.

Public Member Functions

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

Detailed Description

Definition at line 7 of file AlgDIConvert.h.


Constructor & Destructor Documentation

AlgDIConvert::AlgDIConvert (  ) 

Definition at line 25 of file AlgDIConvert.cxx.

00026 {
00027 }

AlgDIConvert::~AlgDIConvert (  )  [virtual]

Definition at line 29 of file AlgDIConvert.cxx.

00030 {
00031 }


Member Function Documentation

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

Implements AlgBase.

Definition at line 33 of file AlgDIConvert.cxx.

References ElecChannel::adc, CandContext::GetCandRecord(), CandContext::GetDataIn(), RawChannelId::GetElecType(), PlexHandle::GetSEIdAltL(), Calibrator::GetTimeFromTDC(), RecMinos::GetVldContext(), ElecChannel::index, Calibrator::Instance(), Msg::kDebug, Msg::kError, ElecType::kQIE, MSG, ElecChannel::rcid, Calibrator::ReInitialise(), and ElecChannel::tdc.

00034 {
00035  
00036   MSG("RmMu", Msg::kDebug) << " AlgDIConvert::RunAlg() " << endl;   
00037   assert(ch.InheritsFrom("CandDigitHandle"));
00038     
00039   //
00040   //Setup output digit
00041   //
00042   CandDigitHandle &digitout = (CandDigitHandle &) ch;
00043   
00044   //
00045   //Get the input data
00046   //
00047   const ElecChannel* input = dynamic_cast<const ElecChannel*>(cx.GetDataIn());
00048   if(input==NULL){
00049     MSG("RmMu", Msg::kError) << " Unable to get input data "<<endl;
00050     return;
00051   }
00052   
00053   //
00054   //Set up calibrator
00055   //
00056   Calibrator& calibrator = Calibrator::Instance();
00057   const VldContext &vldc = *(cx.GetCandRecord()->GetVldContext());
00058   calibrator.ReInitialise(vldc);
00059 
00060   //
00061   //Set the CandDigit parameters
00062   //
00063   
00064   // channel ID
00065   RawChannelId channel(input->rcid);
00066   digitout.SetChannelId(channel);
00067 
00068   // Charge
00069   Double_t adc_offset  = 0.;
00070   if (channel.GetElecType()==ElecType::kQIE) {
00071     adc_offset = 50.;
00072   }
00073   digitout.SetCharge(input->adc - adc_offset);
00074   
00075   // Time
00076   Double_t t = calibrator.GetTimeFromTDC(input->tdc, channel);
00077   digitout.SetTime(t);
00078 
00079   
00080   //
00081   //Plex solutions
00082   PlexHandle ph(vldc);
00083   PlexSEIdAltL altlist = ph.GetSEIdAltL(channel, 
00084                                         &(calibrator), 
00085                                         (int)(input->adc - adc_offset), 
00086                                         digitout.GetTime());
00087   digitout.SetPlexSEIdAltL(altlist);
00088   digitout.SetRawDigitIndex(input->index);
00089   
00090 }

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

Reimplemented from AlgBase.

Definition at line 93 of file AlgDIConvert.cxx.

00094 {
00095 }


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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1