PAASS
Software suite to Acquire and Analyze Data from Pixie16
|
Class to handle event processing. More...
#include <EventProcessor.hpp>
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... | |
Class to handle event processing.
Definition at line 25 of file EventProcessor.hpp.
EventProcessor::EventProcessor | ( | ) |
Default Constructor
Definition at line 25 of file EventProcessor.cpp.
EventProcessor::EventProcessor | ( | int | offset, |
int | range, | ||
std::string | name | ||
) |
Constructor taking histogram information
[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.
|
virtual |
Default Destructor
Definition at line 37 of file EventProcessor.cpp.
|
inlineprotectedvirtual |
Declares a 1D histogram calls the C++ wrapper for DAMM.
[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.
|
inlineprotectedvirtual |
Declares a 2D histogram calls the C++ wrapper for DAMM.
[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.
|
inlinevirtual |
Declares the plots for the class
Reimplemented in GeProcessor, Dssd4SHEProcessor, PositionProcessor, BetaScintProcessor, ImplantSsdProcessor, IonChamberProcessor, VandleProcessor, GeCalibProcessor, LitePositionProcessor, BetaProcessor, IS600Processor, TemplateExpProcessor, LiquidProcessor, ScintProcessor, Ge4Hen3Processor, LiquidScintProcessor, LogicProcessor, NeutronProcessor, Hen3Processor, NeutronScintProcessor, DoubleBetaProcessor, PspmtProcessor, CrosstalkProcessor, TemplateProcessor, WalkVandleBetaProcessor, SsdProcessor, TeenyVandleProcessor, Anl1471Processor, Beta4Hen3Processor, Labr3TestProcessor, VandleOrnl2012Processor, DssdProcessor, and McpProcessor.
Definition at line 40 of file EventProcessor.hpp.
|
inlinevirtual |
Definition at line 49 of file EventProcessor.hpp.
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.
|
inline |
Get the name of the processor
Definition at line 84 of file EventProcessor.hpp.
|
inlinevirtual |
Sets the associated types for the derived classes
Definition at line 44 of file EventProcessor.hpp.
|
virtual |
See if the detectors of interest have any events
Definition at line 44 of file EventProcessor.cpp.
|
virtual |
Initialize the processor if the detectors that require it are used in the analysis
[in] | event | : the event to initialize with |
Reimplemented in PositionProcessor, RootProcessor, and LitePositionProcessor.
Definition at line 54 of file EventProcessor.cpp.
|
inlineprotectedvirtual |
Implementation of the plot command to interface with the DAMM routines.
This is also done in the Trace class, redundant?
[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.
|
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.
[in] | event | : The Event to be processed |
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.
|
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.
[in] | event | : The Event to be processed |
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.
|
protected |
Set of associated types for Processor.
Definition at line 105 of file EventProcessor.hpp.
|
private |
The number of clock cycles per second.
Definition at line 153 of file EventProcessor.hpp.
|
protected |
True if the process finished.
Definition at line 107 of file EventProcessor.hpp.
|
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.
|
protected |
True if the initialization has finished.
Definition at line 106 of file EventProcessor.hpp.
|
protected |
Name of the Processor.
Definition at line 104 of file EventProcessor.hpp.
|
protected |
Map of associated detector summary.
Definition at line 108 of file EventProcessor.hpp.
|
private |
The system time spent in the processor.
Definition at line 152 of file EventProcessor.hpp.
|
private |
The beginning processor time.
Definition at line 150 of file EventProcessor.hpp.
|
private |
The user time spent in the processor.
Definition at line 151 of file EventProcessor.hpp.