Pixie16 Analysis Software Suite
Analysis code for processing of .ldf files
EventProcessor Class Reference

Class to handle event processing. More...

#include <EventProcessor.hpp>

Inheritance diagram for EventProcessor:
Collaboration diagram for EventProcessor:

Public Member Functions

 EventProcessor ()
 
 EventProcessor (int offset, int range, std::string name)
 
virtual ~EventProcessor ()
 
virtual void DeclarePlots (void)
 
virtual const std::set< std::string > & GetTypes (void) const
 
virtual bool DidProcess (void) const
 
virtual bool HasEvent (void) const
 
virtual bool Init (RawEvent &event)
 
virtual bool PreProcess (RawEvent &event)
 
virtual bool Process (RawEvent &event)
 
void EndProcess (void)
 
std::string GetName (void) const
 

Protected Member Functions

virtual void plot (int dammId, double val1, double val2=-1, double val3=-1, const char *name="h")
 Implementation of the plot command to interface with the DAMM routines. More...
 
virtual void DeclareHistogram1D (int dammId, int xSize, const char *title)
 Declares a 1D histogram calls the C++ wrapper for DAMM. More...
 
virtual void DeclareHistogram2D (int dammId, int xSize, int ySize, const char *title)
 Declares a 2D histogram calls the C++ wrapper for DAMM. More...
 

Protected Attributes

std::string name
 Name of the Processor.
 
std::set< std::string > associatedTypes
 Set of associated types for Processor.
 
bool initDone
 True if the initialization has finished.
 
bool didProcess
 True if the process finished.
 
std::map< std::string, const DetectorSummary * > sumMap
 Map of associated detector summary.
 
Plots histo
 

Private Attributes

tms tmsBegin
 The beginning processor time.
 
double userTime
 The user time spent in the processor.
 
double systemTime
 The system time spent in the processor.
 
double clocksPerSecond
 The number of clock cycles per second.
 

Detailed Description

Class to handle event processing.

Constructor & Destructor Documentation

EventProcessor::EventProcessor ( )

Default Constructor

EventProcessor::EventProcessor ( int  offset,
int  range,
std::string  name 
)

Constructor taking histogram information

Parameters
[in]offset: the offset for the histograms
[in]range: the range of the histograms
[in]name: the name of the processor
virtual EventProcessor::~EventProcessor ( )
virtual

Default Destructor

Member Function Documentation

virtual void EventProcessor::DeclareHistogram1D ( int  dammId,
int  xSize,
const char *  title 
)
inlineprotectedvirtual

Declares a 1D histogram calls the C++ wrapper for DAMM.

Parameters
[in]dammId: The histogram number to define
[in]xSize: The range of the x-axis
[in]title: The title for the histogram
virtual void EventProcessor::DeclareHistogram2D ( int  dammId,
int  xSize,
int  ySize,
const char *  title 
)
inlineprotectedvirtual

Declares a 2D histogram calls the C++ wrapper for DAMM.

Parameters
[in]dammId: The histogram number to define
[in]xSize: The range of the x-axis
[in]ySize: The range of the y-axis
[in]title: The title of the histogram
virtual bool EventProcessor::DidProcess ( void  ) const
inlinevirtual
Returns
The status of the Processor
void EventProcessor::EndProcess ( void  )

Wrap up the processing and update the time spent by this processor

std::string EventProcessor::GetName ( void  ) const
inline

Get the name of the processor

Returns
Name of the processor
virtual const std::set<std::string>& EventProcessor::GetTypes ( void  ) const
inlinevirtual

Sets the associated types for the derived classes

Returns
The types associated with a Processor
virtual bool EventProcessor::HasEvent ( void  ) const
virtual

See if the detectors of interest have any events

Returns
True if there was an event
virtual bool EventProcessor::Init ( RawEvent event)
virtual

Initialize the processor if the detectors that require it are used in the analysis

Parameters
[in]event: the event to initialize with
Returns
True on success

Reimplemented in PositionProcessor, RootProcessor, and LitePositionProcessor.

virtual void EventProcessor::plot ( int  dammId,
double  val1,
double  val2 = -1,
double  val3 = -1,
const char *  name = "h" 
)
inlineprotectedvirtual

Implementation of the plot command to interface with the DAMM routines.

This is also done in the Trace class, redundant?

Parameters
[in]dammId: The histogram number to plot into
[in]val1: The x value to plot
[in]val2: The y value to plot (if 2D histogram)
[in]val3: The z value to plot (if 2D histogram)
[in]name: The name of the histogram
virtual bool EventProcessor::PreProcess ( RawEvent event)
virtual

Process an event. In PreProcess correlator should filled (for all derived classes) and basic analysis is done. More sophisticated analysis (which might also depend on other processors) should be done in Process() function. PreProcess will be first called for all Processors and only afterwards the Process function will be called.

Parameters
[in]event: The Event to be processed
Returns
true if successfully completed

Reimplemented in GeProcessor, BetaScintProcessor, VandleProcessor, BeamLogicProcessor, DoubleBetaProcessor, GeCalibProcessor, TeenyVandleProcessor, LiquidProcessor, MtcProcessor, TemplateProcessor, BetaProcessor, ScintProcessor, LiquidScintProcessor, NeutronProcessor, Hen3Processor, and NeutronScintProcessor.

virtual bool EventProcessor::Process ( RawEvent event)
virtual

Field Documentation

Plots EventProcessor::histo
protected

Plots class for given Processor, takes care of declaration and plotting within boundaries allowed by PlotsRegistry


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