CFEL - ASG Software Suite
2.5.0
CASS
|
0D, 1D, and 2D to 2D histogramming. More...
#include <operations.h>
Public Member Functions | |
pp65 (const name_t &name) | |
constructor More... | |
virtual void | process (const CASSEvent &, result_t &) |
process event More... | |
virtual void | loadSettings (size_t) |
load the settings More... | |
![]() | |
Processor (const name_t &name) | |
constructor More... | |
virtual | ~Processor () |
virtual destructor More... | |
virtual void | processEvent (const CASSEvent &event) |
process the event More... | |
virtual const result_t & | result (const CASSEvent::id_t eventid=0) |
retrieve a result for a given id. More... | |
virtual void | releaseEvent (const CASSEvent &event) |
tell the list that the result for event can be overwritten More... | |
result_t::shared_pointer | resultCopy (const uint64_t eventid) |
retrieve histogram for id More... | |
virtual void | load () |
load the general settings More... | |
virtual void | aboutToQuit () |
function that will be called when the processor is about to be deleted More... | |
const names_t & | dependencies () |
Define all processors keys a processor depends on. More... | |
void | clearDependencies () |
clear the dependenies More... | |
void | clearHistograms () |
clear the histograms More... | |
virtual void | processCommand (std::string command) |
process command in pp More... | |
const name_t | name () const |
retrieve the name of this processor More... | |
bool | hide () const |
retrieve the hide flag of this processor More... | |
const std::string & | comment () const |
retrieve the comment of this processor More... | |
Protected Types | |
typedef std::tr1::function< void(CASSEvent::id_t, result_t::const_iterator, result_t::const_iterator, result_t::const_iterator, result_t &)> | func_t |
define the function for histogramming More... | |
Protected Attributes | |
shared_pointer | _xInput |
processor containing X axis value More... | |
shared_pointer | _yInput |
processor containing Y-axis value More... | |
result_t::value_t | _weight |
the constant weight More... | |
shared_pointer | _weightInput |
processor containing the weights More... | |
result_t::axe_t | _origYAxis |
y-axis object of the original size (without the nbr fills part) More... | |
func_t | _histogram |
the function to histogram the values More... | |
![]() | |
const name_t | _name |
the processors name More... | |
bool | _hide |
flag to tell whether this pp should be hidden in the dropdown list More... | |
std::string | _comment |
optional comment that one can add to a processor. More... | |
CachedList | _resultList |
the list of results More... | |
names_t | _dependencies |
the list of dependencies More... | |
shared_pointer | _condition |
pointer to the processor that will contain the condition More... | |
Additional Inherited Members | |
![]() | |
typedef std::tr1::shared_ptr< Processor > | shared_pointer |
a shared pointer of this More... | |
typedef std::string | name_t |
define the name type More... | |
typedef std::list< name_t > | names_t |
define the list of names More... | |
typedef CachedList::item_type | result_t |
define the results More... | |
typedef CachedList::item_sp | resultsp_t |
define the shared pointer to the result More... | |
0D, 1D, and 2D to 2D histogramming.
histograms two 0D, 1D or 2D values into one 2D result. The result contains only the information from the current event. To get an average or sum use Processor 61 or 62.
It has the capability to histogram the values with user provided weights, which can either be a provided constant or taken from another processor. In case the weight processor contains a 0D value, the value will be taked as a constant. Othwerwise the processor containing the weights has to have the same shape as the input values.
In case the option that allows remembering how many times a bin has been filled the result is a 2D result with twice as many bins in y. the first n entries in y contain the (weighted) histogram whereas the y-entries is n..2*n contain the info about how many times the corresponding bin has been filled. Use pp70 to extract the two informations.
Processor/%name%/{XName|YName}
processor names containing the values to histogram. Both need to be of the same shape.
Processor/%name%/{XNbrBins|XLow|XUp|XTitle|YNbrBins|YLow|YUp|YTitle}
properties of the 2d histogram
Processor/%name%/{Weight}
The weight, Can either be a constant value or a processor name containing the weights. The processor needs to be either of the same shape as the input, in which case the individual entires are the weights of the corresponding bins in the input, or contain a 0D value, in which case this will be used as weight for all the input values. Please see details for details about this option. Default 1
Processor/%name%/{RememberCounts}
This flag allows to enable the option of remembering the number of times a given bin has been filled. See detailed description for more info about this option. Default is false
Definition at line 1354 of file operations.h.
|
protected |
define the function for histogramming
Definition at line 1372 of file operations.h.
pp65::pp65 | ( | const name_t & | name | ) |
|
protected |
histogam with constant weight
In addition remember the number of counts in a bin
id | the event id to get the right weight from the processor |
xin | iterator to the beginning of the x input |
xlast | iterator to the end of the x data input |
yin | iterator to the begining of the y input |
result | reference to the result that does the histograming |
Definition at line 1978 of file operations.cpp.
References _origYAxis, _weight, cass::Result< T >::axis(), cass::histogramming::bin(), cass::Axis< T >::nBins, and cass::Result< float >::xAxis.
Referenced by loadSettings().
|
protected |
histogam with constant weight from input
In addition remember the number of counts in a bin
id | the event id to get the right weight from the processor |
xin | iterator to the beginning of the x input |
xlast | iterator to the end of the x data input |
yin | iterator to the begining of the y input |
result | reference to the result that does the histograming |
Definition at line 1958 of file operations.cpp.
References _origYAxis, _weightInput, cass::Result< T >::axis(), cass::histogramming::bin(), cass::Axis< T >::nBins, and cass::Result< float >::xAxis.
Referenced by loadSettings().
|
protected |
histogam with weights from another processor
In addition remember the number of counts in a bin
id | the event id to get the right weight from the processor |
xin | iterator to the beginning of the x input |
xlast | iterator to the end of the x data input |
yin | iterator to the begining of the y input |
result | reference to the result that does the histograming |
Definition at line 1938 of file operations.cpp.
References _origYAxis, _weightInput, cass::Result< T >::axis(), cass::histogramming::bin(), cass::Axis< T >::nBins, and cass::Result< float >::xAxis.
Referenced by loadSettings().
|
protected |
histogam with constant weight
unused | an unused paramter |
xin | iterator to the beginning of the x input |
xlast | iterator to the end of the x data input |
yin | iterator to the begining of the y input |
result | reference to the result that does the histograming |
Definition at line 1928 of file operations.cpp.
References _weight, and cass::Result< T >::histogram().
Referenced by loadSettings().
|
protected |
histogam with constant weight from input
id | the event id to get the right weight from the processor |
xin | iterator to the beginning of the x input |
xlast | iterator to the end of the x data input |
yin | iterator to the begining of the y input |
result | reference to the result that does the histograming |
Definition at line 1914 of file operations.cpp.
References _weightInput, and cass::Result< T >::histogram().
Referenced by loadSettings().
|
protected |
histogam with weights from another processor
id | the event id to get the right weight from the processor |
xin | iterator to the beginning of the x input |
xlast | iterator to the end of the x data input |
yin | iterator to the begining of the y input |
result | reference to the result that does the histograming |
Definition at line 1900 of file operations.cpp.
References _weightInput, and cass::Result< T >::histogram().
Referenced by loadSettings().
|
virtual |
load the settings
Reimplemented from cass::Processor.
Definition at line 1807 of file operations.cpp.
References cass::Processor::_condition, _histogram, _origYAxis, _weight, _weightInput, _xInput, _yInput, cass::Log::add(), QSettings::beginGroup(), cass::Processor::createHistList(), QString::fromStdString(), histogramAndBinCountWithConstant(), histogramAndBinCountWithWeightFrom0DInput(), histogramAndBinCountWithWeights(), histogramWithConstant(), histogramWithWeightFrom0DInput(), histogramWithWeights(), cass::Log::INFO, cass::Axis< T >::low, cass::Processor::name(), cass::Axis< T >::nBins, cass::set2DHist(), cass::Processor::setupCondition(), cass::Processor::setupDependency(), cass::Processor::setupGeneral(), cass::Axis< T >::title, cass::toString(), cass::Axis< T >::up, and QSettings::value().
Referenced by pp65().
process event
Reimplemented from cass::Processor.
Definition at line 1994 of file operations.cpp.
References _histogram, _xInput, _yInput, cass::Result< T >::begin(), cass::Result< T >::datasize(), cass::CASSEvent::id(), cass::Result< T >::lock, and cass::Processor::result().
|
protected |
the function to histogram the values
Definition at line 1481 of file operations.h.
Referenced by loadSettings(), and process().
|
protected |
y-axis object of the original size (without the nbr fills part)
Definition at line 1478 of file operations.h.
Referenced by histogramAndBinCountWithConstant(), histogramAndBinCountWithWeightFrom0DInput(), histogramAndBinCountWithWeights(), and loadSettings().
|
protected |
the constant weight
Definition at line 1472 of file operations.h.
Referenced by histogramAndBinCountWithConstant(), histogramWithConstant(), and loadSettings().
|
protected |
processor containing the weights
Definition at line 1475 of file operations.h.
Referenced by histogramAndBinCountWithWeightFrom0DInput(), histogramAndBinCountWithWeights(), histogramWithWeightFrom0DInput(), histogramWithWeights(), and loadSettings().
|
protected |
processor containing X axis value
Definition at line 1466 of file operations.h.
Referenced by loadSettings(), and process().
|
protected |
processor containing Y-axis value
Definition at line 1469 of file operations.h.
Referenced by loadSettings(), and process().