#include <PassThroughDPGenerator.h>
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 () |
TDetectorPulse * | MakeTDP (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 AnalysedPulseList * | FastPulseList () const |
const AnalysedPulseList * | SlowPulseList () const |
const AnalysedPulseList * | PulseList (bool getFast) const |
Static Public Member Functions | |
static const IDs::generator & | GetStaticId () |
Private Attributes | |
bool | fUseFast |
Static Private Attributes | |
static IDs::generator | fStaticId = IDs::generator("PassThrough", IDs::kAnyConfig) |
Definition at line 6 of file PassThroughDPGenerator.h.
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.
virtual bool PassThroughDPGenerator::ChecksForPileUp | ( | ) | const [inline, virtual] |
Implements TVDetectorPulseGenerator.
Definition at line 11 of file PassThroughDPGenerator.h.
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] |
Definition at line 51 of file TVDetectorPulseGenerator.h.
References TVDetectorPulseGenerator::fSource, and IDs::source::Generator().
Referenced by MakeDetectorPulses::MakeGenerator().
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] |
Definition at line 47 of file TVDetectorPulseGenerator.h.
References TVDetectorPulseGenerator::fSource.
Referenced by MakeDetectorPulses::GetPassThruGeneratorID(), and TVDetectorPulseGenerator::MakeTDP().
00047 {return fSource;};
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] |
Definition at line 55 of file TVDetectorPulseGenerator.h.
References TVDetectorPulseGenerator::fFastPulses, and TVDetectorPulseGenerator::fSlowPulses.
Referenced by ProcessPulses().
00055 {return getFast?fFastPulses:fSlowPulses;}
void TVDetectorPulseGenerator::SetChannel | ( | const IDs::channel & | ch | ) | [inline, inherited] |
Definition at line 50 of file TVDetectorPulseGenerator.h.
References IDs::source::Channel(), and TVDetectorPulseGenerator::fSource.
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;}
IDs::generator PassThroughDPGenerator::fStaticId = IDs::generator("PassThrough", IDs::kAnyConfig) [static, private] |
Definition at line 19 of file PassThroughDPGenerator.h.
Referenced by GetStaticId().
bool PassThroughDPGenerator::fUseFast [private] |
Definition at line 18 of file PassThroughDPGenerator.h.
Referenced by ProcessPulses().