PAASS
Software suite to Acquire and Analyze Data from Pixie16
Trace Class Reference

Store the information for a trace. More...

#include <Trace.hpp>

Inheritance diagram for Trace:
Collaboration diagram for Trace:

Public Member Functions

 Trace ()
 
 Trace (const std::vector< unsigned int > &x)
 
void InsertValue (const std::string &name, const double &value)
 
void InsertValue (const std::string &name, const int &value)
 
void SetValue (const std::string &name, const double &value)
 
void SetValue (const std::string &name, const int &value)
 
bool HasValue (const std::string &name) const
 
double GetValue (const std::string &name) const
 
std::vector< double > GetWaveform ()
 
std::vector< unsigned int > GetWaveformWithBaseline ()
 
std::vector< double > GetBaselineSubtractedTrace ()
 
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...
 
virtual void plot (int dammId, double val1, double val2=-1, double val3=-1, const char *name="h") const
 Implementation of the plot command to interface with the DAMM routines. More...
 
void Plot (int id)
 
void Plot (int id, int row)
 
void ScalePlot (int id, double scale)
 
void ScalePlot (int id, int row, double scale)
 
void OffsetPlot (int id, double offset)
 
void OffsetPlot (int id, int row, double offset)
 
void SetWaveformRange (const std::pair< unsigned int, unsigned int > &a)
 
void SetBaselineSubtractedTrace (const std::vector< double > &a)
 sets the baseline subtracted trace for use. More...
 
void SetTriggerFilter (const std::vector< double > &a)
 
void SetEnergySums (const std::vector< double > &a)
 

Private Attributes

std::pair< unsigned int, unsigned int > waveformRange_
 < The range of the waveform. More...
 
std::vector< double > baselineSubTrace_
 
std::vector< double > trigFilter_
 !< Baseline subtracted trace More...
 
std::vector< double > esums_
 The Energy sums calculated from the trace. More...
 
std::map< std::string, double > doubleTraceData
 Trace data stored as doubles. More...
 
std::map< std::string, int > intTraceData
 Trace data stored as ints. More...
 

Static Private Attributes

static Plots histo
 

Detailed Description

Store the information for a trace.

Definition at line 23 of file Trace.hpp.

Constructor & Destructor Documentation

§ Trace() [1/2]

Trace::Trace ( )
inline

Default constructor

Definition at line 26 of file Trace.hpp.

§ Trace() [2/2]

Trace::Trace ( const std::vector< unsigned int > &  x)
inline

An automatic conversion for the trace

Parameters
[in]x: the trace to store in the class

Definition at line 30 of file Trace.hpp.

Member Function Documentation

§ DeclareHistogram1D()

virtual void Trace::DeclareHistogram1D ( int  dammId,
int  xSize,
const char *  title 
)
inlinevirtual

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 108 of file Trace.hpp.

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

§ DeclareHistogram2D()

virtual void Trace::DeclareHistogram2D ( int  dammId,
int  xSize,
int  ySize,
const char *  title 
)
inlinevirtual

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 117 of file Trace.hpp.

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

§ GetBaselineSubtractedTrace()

std::vector<double> Trace::GetBaselineSubtractedTrace ( )
inline
Returns
Returns the waveform that still has the baseline

Definition at line 100 of file Trace.hpp.

Here is the caller graph for this function:

§ GetValue()

double Trace::GetValue ( const std::string &  name) const
inline

Returns the value of the requested parameter

Parameters
[in]name: the name of the parameter to get for
Returns
the requested value

Definition at line 77 of file Trace.hpp.

Here is the caller graph for this function:

§ GetWaveform()

std::vector<double> Trace::GetWaveform ( )
inline
Returns
Returns the waveform found inside the trace

Definition at line 86 of file Trace.hpp.

Here is the caller graph for this function:

§ GetWaveformWithBaseline()

std::vector<unsigned int> Trace::GetWaveformWithBaseline ( )
inline
Returns
Returns the waveform that still has the baseline

Definition at line 94 of file Trace.hpp.

§ HasValue()

bool Trace::HasValue ( const std::string &  name) const
inline

Checks to see if a parameter has a value

Parameters
[in]name: the name of the parameter to check for
Returns
true if the value exists in the trace

Definition at line 69 of file Trace.hpp.

Here is the caller graph for this function:

§ InsertValue() [1/2]

void Trace::InsertValue ( const std::string &  name,
const double &  value 
)
inline

Insert a value into the trace map

Parameters
[in]name: the name of the parameter to insert
[in]value: the value to insert into the map

Definition at line 35 of file Trace.hpp.

Here is the caller graph for this function:

§ InsertValue() [2/2]

void Trace::InsertValue ( const std::string &  name,
const int &  value 
)
inline

Insert an int value into the trace

Parameters
[in]name: the name of the variable to insert
[in]value: The integer value to insert into the map

Definition at line 42 of file Trace.hpp.

§ OffsetPlot() [1/2]

void Trace::OffsetPlot ( int  id,
double  offset 
)

plot trace with a vertical offset in a 1D histogram

Parameters
[in]id: histogram ID to plot into
[in]offset: the offset for the trace

Definition at line 46 of file Analysis/Utkscan/core/source/trace.cpp.

Here is the caller graph for this function:

§ OffsetPlot() [2/2]

void Trace::OffsetPlot ( int  id,
int  row,
double  offset 
)

plot trace with a vertical offset in a 2D histogram

Parameters
[in]id: histogram ID to plot into
[in]row: the row to plot the trace into
[in]offset: the offset for the trace

Definition at line 52 of file Analysis/Utkscan/core/source/trace.cpp.

§ plot()

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

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

This is also done in the EventProcessor 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 131 of file Trace.hpp.

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

§ Plot() [1/2]

void Trace::Plot ( int  id)

plot trace into a 1D histogram

Parameters
[in]id: histogram ID to plot into

Definition at line 22 of file Analysis/Utkscan/core/source/trace.cpp.

Here is the caller graph for this function:

§ Plot() [2/2]

void Trace::Plot ( int  id,
int  row 
)

plot trace into row of a 2D histogram

Parameters
[in]id: histogram ID to plot into
[in]row: the row to plot into

Definition at line 28 of file Analysis/Utkscan/core/source/trace.cpp.

§ ScalePlot() [1/2]

void Trace::ScalePlot ( int  id,
double  scale 
)

plot trace absolute value and scaled into a 1D histogram

Parameters
[in]id: histogram ID to plot into
[in]scale: the scaling for the trace

Definition at line 34 of file Analysis/Utkscan/core/source/trace.cpp.

Here is the caller graph for this function:

§ ScalePlot() [2/2]

void Trace::ScalePlot ( int  id,
int  row,
double  scale 
)

plot trace absolute value and scaled into a 2D histogram

Parameters
[in]id: histogram ID to plot into
[in]row: the row to plot the histogram into
[in]scale: the scaling for the trace

Definition at line 40 of file Analysis/Utkscan/core/source/trace.cpp.

§ SetBaselineSubtractedTrace()

void Trace::SetBaselineSubtractedTrace ( const std::vector< double > &  a)
inline

sets the baseline subtracted trace for use.

Parameters
[in]a: The vector that we are going to assign.

Definition at line 175 of file Trace.hpp.

Here is the caller graph for this function:

§ SetEnergySums()

void Trace::SetEnergySums ( const std::vector< double > &  a)
inline

sets the energy sums vector if we are using the TriggerFilterAnalyzer

Parameters
[in]a: the vector of energy sums

Definition at line 185 of file Trace.hpp.

Here is the caller graph for this function:

§ SetTriggerFilter()

void Trace::SetTriggerFilter ( const std::vector< double > &  a)
inline

sets the trigger filter if we are using the TriggerFilterAnalyzer

Parameters
[in]a: the vector with the trigger filter

Definition at line 181 of file Trace.hpp.

Here is the caller graph for this function:

§ SetValue() [1/2]

void Trace::SetValue ( const std::string &  name,
const double &  value 
)
inline

Set the double value of a parameter in the trace

Parameters
[in]name: the name of the parameter to set
[in]value: the double value to set the parameter to

Definition at line 49 of file Trace.hpp.

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

§ SetValue() [2/2]

void Trace::SetValue ( const std::string &  name,
const int &  value 
)
inline

Set the integer value of a parameter in the trace

Parameters
[in]name: the name of the parameter to set
[in]value: the int value to set the parameter to

Definition at line 59 of file Trace.hpp.

Here is the call graph for this function:

§ SetWaveformRange()

void Trace::SetWaveformRange ( const std::pair< unsigned int, unsigned int > &  a)
inline

sets the waveform low and high bounds.

Parameters
[in]a: the range we want to set

Definition at line 169 of file Trace.hpp.

Here is the caller graph for this function:

Field Documentation

§ baselineSubTrace_

std::vector<double> Trace::baselineSubTrace_
private

Definition at line 191 of file Trace.hpp.

§ doubleTraceData

std::map<std::string, double> Trace::doubleTraceData
private

Trace data stored as doubles.

Definition at line 195 of file Trace.hpp.

§ esums_

std::vector<double> Trace::esums_
private

The Energy sums calculated from the trace.

Definition at line 193 of file Trace.hpp.

§ histo

Plots Trace::histo
staticprivate

This field is static so all instances of Trace class have access to the same plots and plots range.

This creates the static instance of the Plots class before main. This may cause a static initialization order fiasco. Be AWARE!!

Definition at line 200 of file Trace.hpp.

§ intTraceData

std::map<std::string, int> Trace::intTraceData
private

Trace data stored as ints.

Definition at line 196 of file Trace.hpp.

§ trigFilter_

std::vector<double> Trace::trigFilter_
private

!< Baseline subtracted trace

The trigger filter for the trace

Definition at line 192 of file Trace.hpp.

§ waveformRange_

std::pair<unsigned int, unsigned int> Trace::waveformRange_
private

< The range of the waveform.

Definition at line 189 of file Trace.hpp.


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