|
PAASS
Software suite to Acquire and Analyze Data from Pixie16
|
DetectorDriver controls event processing. More...
#include <DetectorDriver.hpp>

Public Member Functions | |
| virtual void | plot (int dammId, double val1, double val2=-1, double val3=-1, const char *name="h") |
| Plots into histogram defined by dammId. More... | |
| void | ProcessEvent (RawEvent &rawev) |
| Control of the event processing. More... | |
| int | ThreshAndCal (ChanEvent *chan, RawEvent &rawev) |
| Check threshold and calibrate each channel. Check the thresholds and calibrate the energy for each channel using the calibrations contained in the calibration vector filled during ReadCal() More... | |
| void | Init (RawEvent &rawev) |
| int | PlotRaw (const ChanEvent *chan) |
| int | PlotCal (const ChanEvent *) |
| void | DeclarePlots () |
| void | SanityCheck (void) const |
| void | CorrelateClock (double d, time_t t) |
| time_t | GetWallTime (double d) const |
| const std::vector< EventProcessor * > & | GetProcessors (void) const |
| EventProcessor * | GetProcessor (const std::string &name) const |
| const std::set< std::string > & | GetUsedDetectors (void) const |
| virtual | ~DetectorDriver () |
Static Public Member Functions | |
| static DetectorDriver * | get () |
Data Fields | |
| WalkCorrector | walk |
| Instance of the walk correction. More... | |
| Calibrator | cali |
| Instance of the calibrator. More... | |
| Plots | histo |
| Instance of the histogram class. More... | |
Private Member Functions | |
| DetectorDriver () | |
| DetectorDriver (const DetectorDriver &) | |
| Overloaded constructor. More... | |
| DetectorDriver & | operator= (DetectorDriver const &) |
| Equality constructor. More... | |
| virtual void | DeclareHistogram1D (int dammId, int xSize, const char *title) |
| virtual void | DeclareHistogram2D (int dammId, int xSize, int ySize, const char *title) |
| Declares a 2D histogram calls the C++ wrapper for DAMM. More... | |
| void | LoadProcessors (Messenger &m) |
| void | ReadCalXml () |
| void | ReadWalkXml () |
Private Attributes | |
| std::vector< EventProcessor * > | vecProcess |
| std::vector< TraceAnalyzer * > | vecAnalyzer |
| std::set< std::string > | knownDetectors |
| std::string | cfg_ |
| The configuration file to read. More... | |
| std::pair< double, time_t > | pixieToWallClock |
Static Private Attributes | |
| static DetectorDriver * | instance = NULL |
| The only instance of DetectorDriver. More... | |
DetectorDriver controls event processing.
This class controls the processing of each event and includes the calibration of all raw energies, the plotting of raw and calibrated energies, and any experiment specific processing requirements
Definition at line 59 of file DetectorDriver.hpp.
|
virtual |
Default Destructor - Not called due to singleton nature
Definition at line 102 of file DetectorDriver.cpp.

|
private |
Constructor that initializes the various processors and analyzers.
Any exception in registering plots in Processors and possible other exceptions in creating Processors will be intercepted here
Definition at line 81 of file DetectorDriver.cpp.


|
private |
Overloaded constructor.
|
inline |
Correlates the pixie clock to the wall clock
| [in] | d | : the pixie time to correlate |
| [in] | t | : the wall time to correlate |
Definition at line 131 of file DetectorDriver.hpp.
|
inlineprivatevirtual |
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 178 of file DetectorDriver.hpp.


|
inlineprivatevirtual |
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 187 of file DetectorDriver.hpp.


| void DetectorDriver::DeclarePlots | ( | void | ) |
Declares the raw plots that are used, and loops over all the declare plots methods in all of the analyzers and processors.
Declare some of the raw and basic plots that are going to be used in the analysis of the data. These include raw and calibrated energy spectra, information about the run time, and count rates on the detectors. This also calls the DeclarePlots method that is present in all of the Analyzers and Processors.
Definition at line 396 of file DetectorDriver.cpp.


|
static |
Definition at line 75 of file DetectorDriver.cpp.

| EventProcessor * DetectorDriver::GetProcessor | ( | const std::string & | name | ) | const |
| [in] | name | : the name of the processor to return |
Definition at line 569 of file DetectorDriver.cpp.

|
inline |
Definition at line 144 of file DetectorDriver.hpp.


| const std::set<std::string>& DetectorDriver::GetUsedDetectors | ( | void | ) | const |

|
inline |
| [in] | d | : the pixie time to convert to wall time |
Definition at line 137 of file DetectorDriver.hpp.


| void DetectorDriver::Init | ( | RawEvent & | rawev | ) |
Called from PixieStd.cpp during initialization. The calibration file Config.xml is read using the function ReadCal() and checked to make sure that all channels have a calibration.
| [in] | rawev | : the raw event to initialize with |
Any exception in reading calibration and walk correction will be intercepted here
Definition at line 304 of file DetectorDriver.cpp.


|
private |
Load the processors from the XML file
| [in] | m | : the messenger to pass the loading messages through |
Definition at line 115 of file DetectorDriver.cpp.


|
private |
Equality constructor.

|
inlinevirtual |
Plots into histogram defined by dammId.
| [in] | dammId | : The histogram number to define |
| [in] | val1 | : the x value |
| [in] | val2 | : the y value |
| [in] | val3 | : the z value |
| [in] | name | : the name of the histogram |
Definition at line 74 of file DetectorDriver.hpp.


| int DetectorDriver::PlotCal | ( | const ChanEvent * | chan | ) |
Plot the calibrated energies of each channel into the damm spectrum number assigned to it in the map file with an offset as defined in DammPlotIds.hpp
Definition at line 564 of file DetectorDriver.cpp.


| int DetectorDriver::PlotRaw | ( | const ChanEvent * | chan | ) |
Plot the raw energies of each channel into the damm spectrum number assigned to it in the map file with an offset as defined in DammPlotIds.hpp
| [in] | chan | : the channel to plot |
Definition at line 559 of file DetectorDriver.cpp.


| void DetectorDriver::ProcessEvent | ( | RawEvent & | rawev | ) |
Control of the event processing.
The ProcessEvent() function is called from ScanList() in PixieStd.cpp after an event has been constructed. This function is passed the mode the analysis is currently in (the options are either "scan" or "standaloneroot"). The function checks the thresholds for the individual channels in the event and calibrates their energies. The raw and calibrated energies are plotted if the appropriate DAMM spectra have been created. Then experiment specific processing is performed. Currently, both RMS and MTC processing is available. After all processing has occured, appropriate plotting routines are called.
| [in] | rawev | : the raw event to process |
First round is preprocessing, where process result must be guaranteed to not to be dependent on results of other Processors.
In the second round the Process is called, which may depend on other Processors.
Any exception in activation of basic places, PreProcess and Process will be intercepted here
Definition at line 334 of file DetectorDriver.cpp.


|
private |
Read in the Calibration parameters from the Config.xml
Note that before this reading in of the xml file, it was already processed for the purpose of creating the channels map. Some sanity checks (module and channel number) were done there so they are not repeated here/
Definition at line 578 of file DetectorDriver.cpp.


|
private |
Read in the Walk correction parameters from the Config.xml
See comment in the similiar place at ReadCalXml()
Definition at line 650 of file DetectorDriver.cpp.


|
inline |
Use Exceptions to throw an exception here if sanity check was not succesful
Definition at line 126 of file DetectorDriver.hpp.

Check threshold and calibrate each channel. Check the thresholds and calibrate the energy for each channel using the calibrations contained in the calibration vector filled during ReadCal()
| [in] | chan | : the channel to do the calibration on |
| [in] | rawev | : the raw event to write the information into |
Calibrate pulses numbered 2 and forth, add filterEnergyXCal to the trace
otherwise, use the Pixie on-board calculated energy add a random number to convert an integer value to a uniformly distributed floating point
Calibrate energy and apply the walk correction.
Definition at line 460 of file DetectorDriver.cpp.


| Calibrator DetectorDriver::cali |
Instance of the calibrator.
Definition at line 65 of file DetectorDriver.hpp.
|
private |
The configuration file to read.
Definition at line 170 of file DetectorDriver.hpp.
| Plots DetectorDriver::histo |
Instance of the histogram class.
Definition at line 66 of file DetectorDriver.hpp.
|
staticprivate |
The only instance of DetectorDriver.
Definition at line 162 of file DetectorDriver.hpp.
|
private |
list of valid detectors that can be used as detector types
Definition at line 168 of file DetectorDriver.hpp.
|
private |
rough estimate of pixie to wall clock
Definition at line 171 of file DetectorDriver.hpp.
|
private |
object which analyzes traces of channels to extract energy and time information
Definition at line 166 of file DetectorDriver.hpp.
|
private |
vector of processors to handle each event
Definition at line 164 of file DetectorDriver.hpp.
| WalkCorrector DetectorDriver::walk |
Instance of the walk correction.
Definition at line 64 of file DetectorDriver.hpp.