PassThroughDPGenerator Class Reference

#include <PassThroughDPGenerator.h>

Inheritance diagram for PassThroughDPGenerator:
TVDetectorPulseGenerator

List of all members.

Public Member Functions

 PassThroughDPGenerator (TDPGeneratorOptions *opts)
virtual ~PassThroughDPGenerator ()
virtual bool ChecksForPileUp () const
virtual int ProcessPulses (DetectorPulseList &output)
void SetPulseSources (const IDs::source &fast, const IDs::source &slow)
void SetPulseLists (const AnalysedPulseList *fast, const AnalysedPulseList *slow)
void SetDebug (const bool &val=true)
bool Debug ()
TDetectorPulseMakeTDP (int fast_parent, int slow_parent) const
IDs::source GetSource () const
IDs::source GetFastSource () const
IDs::source GetSlowSource () const
void SetChannel (const IDs::channel &ch)
IDs::generator GetGeneratorID () const
const AnalysedPulseListFastPulseList () const
const AnalysedPulseListSlowPulseList () const
const AnalysedPulseListPulseList (bool getFast) const

Static Public Member Functions

static const IDs::generatorGetStaticId ()

Private Attributes

bool fUseFast

Static Private Attributes

static IDs::generator fStaticId = IDs::generator("PassThrough", IDs::kAnyConfig)

Detailed Description

Definition at line 6 of file PassThroughDPGenerator.h.


Constructor & Destructor Documentation

PassThroughDPGenerator::PassThroughDPGenerator ( TDPGeneratorOptions opts  ) 

Definition at line 10 of file PassThroughDPGenerator.cpp.

00010                                                                        :
00011     TVDetectorPulseGenerator("PassThrough",opts), fUseFast(opts->GetBool("use_fast",true)){
00012     // double check that we can use the slow source, ie. for detectors where
00013     // the fast / slow channel are different
00014 }

virtual PassThroughDPGenerator::~PassThroughDPGenerator (  )  [inline, virtual]

Definition at line 10 of file PassThroughDPGenerator.h.

00010 {};


Member Function Documentation

virtual bool PassThroughDPGenerator::ChecksForPileUp (  )  const [inline, virtual]

Implements TVDetectorPulseGenerator.

Definition at line 11 of file PassThroughDPGenerator.h.

00011 {return false;};

bool TVDetectorPulseGenerator::Debug (  )  [inline, inherited]

Definition at line 34 of file TVDetectorPulseGenerator.h.

References TVDetectorPulseGenerator::fDebug.

Referenced by MaxTimeDiffDPGenerator::ProcessPulses().

00034 {return fDebug;};

const AnalysedPulseList* TVDetectorPulseGenerator::FastPulseList (  )  const [inline, inherited]

Definition at line 53 of file TVDetectorPulseGenerator.h.

References TVDetectorPulseGenerator::fFastPulses.

Referenced by MaxTimeDiffDPGenerator::ProcessPulses().

00053 {return fFastPulses;}

IDs::source TVDetectorPulseGenerator::GetFastSource (  )  const [inline, inherited]

Definition at line 48 of file TVDetectorPulseGenerator.h.

References TVDetectorPulseGenerator::fFastSource.

Referenced by MaxTimeDiffDPGenerator::ProcessPulses().

00048 {return fFastSource;};

IDs::generator TVDetectorPulseGenerator::GetGeneratorID (  )  const [inline, inherited]
IDs::source TVDetectorPulseGenerator::GetSlowSource (  )  const [inline, inherited]

Definition at line 49 of file TVDetectorPulseGenerator.h.

References TVDetectorPulseGenerator::fSlowSource.

Referenced by MaxTimeDiffDPGenerator::ProcessPulses().

00049 {return fSlowSource;};

IDs::source TVDetectorPulseGenerator::GetSource (  )  const [inline, inherited]
static const IDs::generator& PassThroughDPGenerator::GetStaticId (  )  [inline, static]

Definition at line 12 of file PassThroughDPGenerator.h.

References fStaticId.

Referenced by PlotTDPs::BeforeFirstEntry().

00012 {return fStaticId;};

TDetectorPulse* TVDetectorPulseGenerator::MakeTDP ( int  fast_parent,
int  slow_parent 
) const [inline, inherited]

Definition at line 36 of file TVDetectorPulseGenerator.h.

References TVDetectorPulseGenerator::fFastPulses, TVDetectorPulseGenerator::fSlowPulses, and TVDetectorPulseGenerator::GetSource().

Referenced by ProcessPulses(), and MaxTimeDiffDPGenerator::ProcessPulses().

00036                                                                 {
00037       TDetectorPulse* pulse=NULL;
00038       const TAnalysedPulse* fast=NULL;
00039       if(fFastPulses && fast_parent>=0) fast=fFastPulses->at(fast_parent);
00040       const TAnalysedPulse* slow=NULL;
00041       if(fSlowPulses && slow_parent>=0) slow=fSlowPulses->at(slow_parent);
00042       if(fast || slow) {
00043           pulse=new TDetectorPulse(GetSource(),fast_parent,fast,slow_parent,slow);
00044       }
00045       return pulse;
00046   }

int PassThroughDPGenerator::ProcessPulses ( DetectorPulseList output  )  [virtual]

Implements TVDetectorPulseGenerator.

Definition at line 16 of file PassThroughDPGenerator.cpp.

References fUseFast, TVDetectorPulseGenerator::MakeTDP(), TVDetectorPulseGenerator::PulseList(), and TVDetectorPulseGenerator::SetPulseLists().

00016                                                                    {
00017     const AnalysedPulseList* pulses=PulseList(fUseFast);
00018     // Major hack to force fill both channels in the produced TDP which makes
00019     // later analysis easier
00020     SetPulseLists(pulses,pulses);
00021     for(AnalysedPulseList::const_iterator i_pulse=pulses->begin();
00022             i_pulse!=pulses->end(); i_pulse++){
00023         TDetectorPulse* det_pulse = MakeTDP(i_pulse-pulses->begin(),i_pulse-pulses->begin()); // Create the TDetectorPulse
00024         output.push_back(det_pulse);
00025     }
00026     return 0;
00027 }

const AnalysedPulseList* TVDetectorPulseGenerator::PulseList ( bool  getFast  )  const [inline, inherited]
void TVDetectorPulseGenerator::SetChannel ( const IDs::channel ch  )  [inline, inherited]

Definition at line 50 of file TVDetectorPulseGenerator.h.

References IDs::source::Channel(), and TVDetectorPulseGenerator::fSource.

00050 {fSource.Channel()=ch;};

void TVDetectorPulseGenerator::SetDebug ( const bool &  val = true  )  [inline, inherited]

Definition at line 33 of file TVDetectorPulseGenerator.h.

References TVDetectorPulseGenerator::fDebug.

Referenced by MakeDetectorPulses::MakeGenerator().

00033 {fDebug=val;};

void TVDetectorPulseGenerator::SetPulseLists ( const AnalysedPulseList fast,
const AnalysedPulseList slow 
) [inline, inherited]

Definition at line 28 of file TVDetectorPulseGenerator.h.

References TVDetectorPulseGenerator::fFastPulses, and TVDetectorPulseGenerator::fSlowPulses.

Referenced by ProcessPulses().

00028                                                                                  {
00029       fFastPulses=fast;
00030       fSlowPulses=slow;
00031   }

void TVDetectorPulseGenerator::SetPulseSources ( const IDs::source fast,
const IDs::source slow 
) [inline, inherited]

Definition at line 24 of file TVDetectorPulseGenerator.h.

References TVDetectorPulseGenerator::fFastSource, and TVDetectorPulseGenerator::fSlowSource.

Referenced by MakeDetectorPulses::MakeGenerator().

00024                                                                     {
00025       fFastSource=fast;
00026       fSlowSource=slow;
00027   }

const AnalysedPulseList* TVDetectorPulseGenerator::SlowPulseList (  )  const [inline, inherited]

Definition at line 54 of file TVDetectorPulseGenerator.h.

References TVDetectorPulseGenerator::fSlowPulses.

Referenced by MaxTimeDiffDPGenerator::ProcessPulses().

00054 {return fSlowPulses;}


Member Data Documentation

IDs::generator PassThroughDPGenerator::fStaticId = IDs::generator("PassThrough", IDs::kAnyConfig) [static, private]

Definition at line 19 of file PassThroughDPGenerator.h.

Referenced by GetStaticId().

Definition at line 18 of file PassThroughDPGenerator.h.

Referenced by ProcessPulses().


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

Generated on 15 Jun 2016 for AlcapDAQ by  doxygen 1.6.1