PAASS
Software suite to Acquire and Analyze Data from Pixie16
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. More...
 
std::set< std::string > associatedTypes
 Set of associated types for Processor. More...
 
bool initDone
 True if the initialization has finished. More...
 
bool didProcess
 True if the process finished. More...
 
std::map< std::string, const DetectorSummary * > sumMap
 Map of associated detector summary. More...
 
Plots histo
 

Private Attributes

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

Detailed Description

Class to handle event processing.

Definition at line 25 of file EventProcessor.hpp.

Constructor & Destructor Documentation

§ EventProcessor() [1/2]

EventProcessor::EventProcessor ( )

Default Constructor

Definition at line 25 of file EventProcessor.cpp.

§ EventProcessor() [2/2]

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

Definition at line 31 of file EventProcessor.cpp.

§ ~EventProcessor()

EventProcessor::~EventProcessor ( )
virtual

Default Destructor

Definition at line 37 of file EventProcessor.cpp.

Member Function Documentation

§ DeclareHistogram1D()

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

Definition at line 134 of file EventProcessor.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ DeclareHistogram2D()

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

Definition at line 144 of file EventProcessor.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ DeclarePlots()

§ DidProcess()

virtual bool EventProcessor::DidProcess ( void  ) const
inlinevirtual
Returns
The status of the Processor

Definition at line 49 of file EventProcessor.hpp.

Here is the call graph for this function:

§ EndProcess()

void EventProcessor::EndProcess ( void  )

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

Reset the beginning time so multiple calls of EndProcess from derived classes work properly

Definition at line 96 of file EventProcessor.cpp.

Here is the caller graph for this function:

§ GetName()

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

Get the name of the processor

Returns
Name of the processor

Definition at line 84 of file EventProcessor.hpp.

Here is the caller graph for this function:

§ GetTypes()

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

Definition at line 44 of file EventProcessor.hpp.

§ HasEvent()

bool EventProcessor::HasEvent ( void  ) const
virtual

See if the detectors of interest have any events

Returns
True if there was an event

Definition at line 44 of file EventProcessor.cpp.

Here is the caller graph for this function:

§ Init()

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.

Definition at line 54 of file EventProcessor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ plot()

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

Definition at line 124 of file EventProcessor.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ PreProcess()

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, Dssd4SHEProcessor, BetaScintProcessor, VandleProcessor, IS600Processor, TemplateExpProcessor, LogicProcessor, CrosstalkProcessor, DoubleBetaProcessor, GeCalibProcessor, PspmtProcessor, TemplateProcessor, TeenyVandleProcessor, Labr3TestProcessor, LiquidProcessor, BetaProcessor, ScintProcessor, LiquidScintProcessor, NeutronProcessor, Hen3Processor, and NeutronScintProcessor.

Definition at line 80 of file EventProcessor.cpp.

Here is the caller graph for this function:

§ Process()

bool EventProcessor::Process ( RawEvent event)
virtual

Process an event. PreProcess function should fill correlation tree and all processors should have basic parameters calculated during PreProccessing. This also starts the processing timer.

Parameters
[in]event: The Event to be processed
Returns
True if success

Reimplemented in GeProcessor, Dssd4SHEProcessor, PositionProcessor, BetaScintProcessor, VandleProcessor, ImplantSsdProcessor, RootProcessor, IS600Processor, TemplateExpProcessor, IonChamberProcessor, LogicProcessor, Anl1471Processor, WalkVandleBetaProcessor, CrosstalkProcessor, DoubleBetaProcessor, GeCalibProcessor, LitePositionProcessor, PspmtProcessor, TemplateProcessor, BetaProcessor, TeenyVandleProcessor, Labr3TestProcessor, LiquidProcessor, ScintProcessor, ValidProcessor, Ge4Hen3Processor, TwoChanTimingProcessor, LiquidScintProcessor, NeutronProcessor, SsdProcessor, Hen3Processor, SsdProcessor, VandleOrnl2012Processor, NeutronScintProcessor, McpProcessor, DssdProcessor, and Beta4Hen3Processor.

Definition at line 86 of file EventProcessor.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

§ associatedTypes

std::set<std::string> EventProcessor::associatedTypes
protected

Set of associated types for Processor.

Definition at line 105 of file EventProcessor.hpp.

§ clocksPerSecond

double EventProcessor::clocksPerSecond
private

The number of clock cycles per second.

Definition at line 153 of file EventProcessor.hpp.

§ didProcess

bool EventProcessor::didProcess
protected

True if the process finished.

Definition at line 107 of file EventProcessor.hpp.

§ histo

Plots EventProcessor::histo
protected

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

Definition at line 112 of file EventProcessor.hpp.

§ initDone

bool EventProcessor::initDone
protected

True if the initialization has finished.

Definition at line 106 of file EventProcessor.hpp.

§ name

std::string EventProcessor::name
protected

Name of the Processor.

Definition at line 104 of file EventProcessor.hpp.

§ sumMap

std::map<std::string, const DetectorSummary *> EventProcessor::sumMap
protected

Map of associated detector summary.

Definition at line 108 of file EventProcessor.hpp.

§ systemTime

double EventProcessor::systemTime
private

The system time spent in the processor.

Definition at line 152 of file EventProcessor.hpp.

§ tmsBegin

tms EventProcessor::tmsBegin
private

The beginning processor time.

Definition at line 150 of file EventProcessor.hpp.

§ userTime

double EventProcessor::userTime
private

The user time spent in the processor.

Definition at line 151 of file EventProcessor.hpp.


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