Processor Class Reference

Ratpac-two: RAT::Processor Class Reference
Ratpac-two
Inheritance diagram for RAT::Processor:
RAT::AfterPulseProc RAT::ClassifyChargeBalance RAT::ClassifyTimesProc RAT::CountProc RAT::FitCentroidProc RAT::FitDirectionCenterProc RAT::FitMimirProc RAT::FitPathProc RAT::FitQuadProc RAT::ForcedTriggerProc RAT::NoiseProc RAT::OutNetProc RAT::OutNtupleProc RAT::OutROOTProc RAT::ProcBlock RAT::PruneProc RAT::PythonProc RAT::SimpleDAQProc RAT::SplitEVDAQProc RAT::WaveformAnalyzerBase RAT::WaveformPrep

Classes

class  ParamError
 
class  ParamInvalid
 
class  ParamUnknown
 

Public Types

enum  Result { OK = 0 , FAIL = 1 , ABORT = 2 }
 

Public Member Functions

 Processor (std::string _name)
 
virtual ~Processor ()
 
std::string GetName () const
 
virtual void SetI (std::string param, int value)
 
virtual void SetF (std::string param, float value)
 
virtual void SetD (std::string param, double value)
 
virtual void SetS (std::string param, std::string value)
 
virtual Processor::Result DSEvent (DS::Root *ds)
 
virtual void BeginOfRun (DS::Run *run)
 
virtual void EndOfRun (DS::Run *run)
 
virtual Processor::Result Event (DS::Root *ds, DS::EV *ev)
 

Protected Attributes

std::string name
 

Member Enumeration Documentation

◆ Result

Result codes returned by DSEvent() or Event().

Enumerator
OK 

Processor ran successfully.

FAIL 

Processor task failed, but non-fatal, so execution of later processors continues.

ABORT 

Processing of event is immediately terminated, no futher processors are run on this event

Constructor & Destructor Documentation

◆ Processor()

RAT::Processor::Processor ( std::string  _name)
inline

The short name of this processor. Create new processor.

Sets the name of the processor. This may be used to identify processors in the future. Should be set by all subclasses and look like a valid C++ identifier.

Parameters
[in]_nameShort name of processor

◆ ~Processor()

virtual RAT::Processor::~Processor ( )
inlinevirtual

Destroy processor.

Member Function Documentation

◆ DSEvent()

Processor::Result Processor::DSEvent ( DS::Root ds)
virtual

Process one physics event.

The processor can do whatever operation it likes on the event. The default implementation of this method calls Event() once for every event in the ds.ev list. Do not override DSEvent() if you plan to override Event().

Parameters
[in,out]dsData structure for current event.
Returns
Status code for successs/failure in processing this event.

Reimplemented in RAT::OutROOTProc, RAT::OutNtupleProc, RAT::OutNetProc, RAT::SplitEVDAQProc, RAT::SimpleDAQProc, RAT::NoiseProc, RAT::ForcedTriggerProc, RAT::AfterPulseProc, RAT::PythonProc, RAT::PruneProc, RAT::ProcBlock, and RAT::CountProc.

◆ Event()

Processor::Result Processor::Event ( DS::Root ds,
DS::EV ev 
)
virtual

Process one triggered event.

If you do not override DSEvent(), then this method is called once per triggered event. As a convenience, a reference is also provided to the root of the data structure associated with the triggered event.

Do not override this method if you also plan to override DSEvent().

Parameters
[in]dsRoot of data structure
[in,out]evTriggered event data structure
Returns
Status code for successs/failure in processing this event.

Reimplemented in RAT::FitMimirProc, RAT::WaveformAnalyzerBase, RAT::FitQuadProc, RAT::FitPathProc, RAT::FitDirectionCenterProc, RAT::FitCentroidProc, RAT::ClassifyTimesProc, RAT::ClassifyChargeBalance, and RAT::WaveformPrep.

◆ SetD()

void Processor::SetD ( std::string  param,
double  value 
)
virtual

Set double parameter

Parameters
[in]paramName of parameter.
[in]valueValue of parameter.
Exceptions
ParamUnknownif param is not recognized.
ParamInvalidif value is not allowed for param.

Reimplemented in RAT::NoiseProc, RAT::WaveformAnalyzerBase, RAT::WaveformAnalysisSinc, RAT::WaveformAnalysisRAVEN, RAT::WaveformAnalysisLognormal, RAT::WaveformAnalysisGaussian, RAT::FitQuadProc, RAT::FitDirectionCenterProc, RAT::FitCentroidProc, RAT::ClassifyTimesProc, RAT::WaveformPrep, RAT::SplitEVDAQProc, and RAT::AfterPulseProc.

◆ SetF()

void Processor::SetF ( std::string  param,
float  value 
)
virtual

Set float parameter.

Parameters
[in]paramName of parameter.
[in]valueValue of parameter.
Exceptions
ParamUnknownif param is not recognized.
ParamInvalidif value is not allowed for param.

◆ SetI()

void Processor::SetI ( std::string  param,
int  value 
)
virtual

Set integer parameter.

Parameters
[in]paramName of parameter.
[in]valueValue of parameter.
Exceptions
ParamUnknownif param is not recognized.
ParamInvalidif value is not allowed for param.

Reimplemented in RAT::WaveformAnalyzerBase, RAT::WaveformAnalysisSinc, RAT::WaveformAnalysisRAVEN, RAT::OutROOTProc, RAT::OutNtupleProc, RAT::OutNetProc, RAT::FitQuadProc, RAT::FitDirectionCenterProc, RAT::ClassifyTimesProc, RAT::WaveformPrep, RAT::SplitEVDAQProc, RAT::NoiseProc, RAT::AfterPulseProc, and RAT::CountProc.

◆ SetS()

void Processor::SetS ( std::string  param,
std::string  value 
)
virtual

Set string parameter.

Parameters
[in]paramName of parameter.
[in]valueValue of parameter.
Exceptions
ParamUnknownif param is not recognized.
ParamInvalidif value is not allowed for param.

Reimplemented in RAT::FitMimirProc, RAT::WaveformAnalyzerBase, RAT::OutROOTProc, RAT::OutNtupleProc, RAT::OutNetProc, RAT::FitDirectionCenterProc, RAT::ClassifyTimesProc, RAT::WaveformPrep, RAT::PythonProc, and RAT::PruneProc.


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/core/include/RAT/Processor.hh
  • /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/core/src/Processor.cc