CFEL - ASG Software Suite
2.5.0
CASS
|
0D,1D or 2D to 1D histogramming. More...
#include <operations.h>
Public Member Functions | |
pp60 (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 &)> | func_t |
define the function for histogramming More... | |
Protected Attributes | |
shared_pointer | _input |
processor containing result to histogram More... | |
result_t::value_t | _weight |
the weight in case it is a constant More... | |
shared_pointer | _weightProc |
processor containing the weight More... | |
func_t | _histogram |
function used for histogramming 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 or 2D to 1D histogramming.
histograms all values of 0D, 1D or 2D into a 1D result. This result holds only the histogrammed values of one event. Use Processors 61 or 62 to average or sum up this result, respectively.
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 2 bins in y. The 0th bin contains the weighted Histogram and the 1st bin contains the number of entries in the corresponding bin.
Processor/%name%/{XName}
processor name containing the values to histogram
Processor/%name%/{XNbrBins|XLow|XUp|XTitle}
properties of the resulting 1D 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 959 of file operations.h.
|
protected |
define the function for histogramming
Definition at line 976 of file operations.h.
pp60::pp60 | ( | const name_t & | name | ) |
|
protected |
histogam with user provided constant weight
In addition remember the number of counts in a bin
unused | an unused paramter |
in | iterator to the beginning of the input |
last | iterator to the end of the data input |
result | reference to the result that does the histograming |
Definition at line 1445 of file operations.cpp.
References _weight, and cass::Result< T >::histogram().
Referenced by loadSettings().
|
protected |
histogam with weights from 0D processor
In addition remember the number of counts in a bin
id | the event id to get the right weight from the processor |
in | iterator to the beginning of the input |
last | iterator to the end of the data input |
result | reference to the result that does the histograming |
Definition at line 1429 of file operations.cpp.
References _weightProc, and cass::Result< T >::histogram().
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 |
in | iterator to the beginning of the input |
last | iterator to the end of the data input |
result | reference to the result that does the histograming |
Definition at line 1413 of file operations.cpp.
References _weightProc, and cass::Result< T >::histogram().
Referenced by loadSettings().
|
protected |
histogam with user provided constant weight
unused | an unused paramter |
in | iterator to the beginning of the input |
last | iterator to the end of the data input |
result | reference to the result that does the histograming |
Definition at line 1404 of file operations.cpp.
References _weight, and cass::Result< T >::histogram().
Referenced by loadSettings().
|
protected |
histogam with weight from 0D processor
id | the event id to get the right weight from the processor |
in | iterator to the beginning of the input |
last | iterator to the end of the data input |
result | reference to the result that does the histograming |
Definition at line 1391 of file operations.cpp.
References _weightProc, 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 |
in | iterator to the beginning of the input |
last | iterator to the end of the data input |
result | reference to the result that does the histograming |
Definition at line 1378 of file operations.cpp.
References _weightProc, and cass::Result< T >::histogram().
Referenced by loadSettings().
|
virtual |
load the settings
Reimplemented from cass::Processor.
Definition at line 1301 of file operations.cpp.
References cass::Processor::_condition, _histogram, _input, _weight, _weightProc, cass::Log::add(), QSettings::beginGroup(), cass::Processor::createHistList(), QString::fromStdString(), histogramAndBinCountWithConstant(), histogramAndBinCountWithWeightFrom0D(), histogramAndBinCountWithWeights(), histogramWithConstant(), histogramWithWeightFrom0D(), histogramWithWeights(), cass::Log::INFO, cass::Processor::name(), cass::set1DHist(), cass::Processor::setupCondition(), cass::Processor::setupDependency(), cass::Processor::setupGeneral(), cass::toString(), and QSettings::value().
Referenced by pp60().
process event
Reimplemented from cass::Processor.
Definition at line 1457 of file operations.cpp.
References _histogram, _input, cass::Result< T >::begin(), cass::Result< T >::datasize(), cass::CASSEvent::id(), input, cass::Result< T >::lock, and cass::Processor::result().
|
protected |
function used for histogramming
Definition at line 1067 of file operations.h.
Referenced by loadSettings(), and process().
|
protected |
processor containing result to histogram
Definition at line 1058 of file operations.h.
Referenced by loadSettings(), and process().
|
protected |
the weight in case it is a constant
Definition at line 1061 of file operations.h.
Referenced by histogramAndBinCountWithConstant(), histogramWithConstant(), and loadSettings().
|
protected |
processor containing the weight
Definition at line 1064 of file operations.h.
Referenced by histogramAndBinCountWithWeightFrom0D(), histogramAndBinCountWithWeights(), histogramWithWeightFrom0D(), histogramWithWeights(), and loadSettings().