12 #ifndef _OPERATIONS_H_
13 #define _OPERATIONS_H_
15 #include <tr1/functional>
77 std::tr1::function<result_t::value_t(result_t::value_t, result_t::value_t)>
_op;
139 typedef std::tr1::function<result_t::value_t(result_t::value_t,result_t::value_t)>
binaryoperation_t;
145 typedef std::tr1::function<unaryoperation_t(result_t::value_t)>
setParamPos_t;
272 std::pair<result_t::value_t,result_t::value_t>
_range;
1163 std::tr1::function<result_t::value_t(result_t::value_t,result_t::value_t,result_t::value_t)>
_func;
1166 std::tr1::function<result_t::value_t()>
_scale;
1721 std::tr1::function<result_t::const_iterator(result_t::const_iterator,result_t::const_iterator)>
_func;
1936 std::tr1::function<result_t::const_iterator(result_t::const_iterator,result_t::const_iterator)>
_func;
2017 std::tr1::function<cumstat_t::value_type(const cumstat_t&)>
_val;
2020 std::tr1::function<result_t::value_t(const result_t&)>
_value;
2238 std::tr1::function<result_t::value_t(const result_t::axe_t&)>
_func;
2408 std::tr1::function<bool(const result_t::value_t&, const result_t::value_t&)>
_op;
virtual void releaseEvent(const CASSEvent &)
overwrite the release
std::tr1::function< result_t::value_t()> _scale
function that will return the scale that should be used for the average
virtual void process(const CASSEvent &, result_t &)
process event
CachedList::item_type result_t
define the results
result_t::value_t cumulativeScale()
retrieve the cumulative scale for the current datum
shared_pointer _two
processor containing 0D result
result_t::value_t _weight
the constant weight
storage_t::const_iterator const_iterator
a const iterator on the storage
axis_name
which axis one wants to have
virtual void process(const CASSEvent &, result_t &)
process event
func_t _histogram
function used for histogramming
result_t::value_t movingScale()
retrieve the moving average scale after the initialization of the "first" point
ColumnNames
enum describing the contents of the resulting table
std::pair< int, int > _baselineRange
range we want to have the baseline for the integral over in result bins
shared_pointer _pHist
processor containing the 2d result we want to project
Event to store all LCLS Data.
result_t::value_t _alpha
alpha for the running average
std::tr1::function< result_t::value_t(const result_t::axe_t &)> _func
function to retrieve the parameter from the axis
void applyConstantThreshold(const result_t &in, result_t &out, const CASSEvent::id_t &id)
apply a constant threshold
shared_pointer _pHist
processor containing result to store
virtual void process(const CASSEvent &, result_t &)
process event
virtual void process(const CASSEvent &, result_t &)
process event
virtual void loadSettings(size_t)
load the settings of the pp
pp57(const name_t &name)
constructor
pp64(const name_t &)
constructor
float baselineFromInput(const result_t &input)
get the baseline for the integration
shared_pointer _weightInput
processor containing the weights
std::vector< value_t > storage_t
the storage of this container
binaryoperation_t _op
the operand
std::pair< int, int > _xRangeStep
the requested x-axis limits for find the step in bins
pp65(const name_t &name)
constructor
virtual void loadSettings(size_t)
load the settings
virtual void process(const CASSEvent &evt, result_t &)
process event
const name_t name() const
retrieve the name of this processor
virtual void process(const CASSEvent &, result_t &)
process event
pp86(const name_t &name)
constructor
void histogramAndBinCountWithWeights(CASSEvent::id_t id, result_t::const_iterator in, result_t::const_iterator last, result_t &result)
histogam with weights from another processor
pp40(const name_t &name)
constructor
check if FEL is off by checking for bykick which is eventid
result_t::value_t _userVal
the value that will be set
file contains declaration of the CASSEvent
float value_t
the values of this container
std::tr1::function< void(result_t::const_iterator, result_t::iterator)> _func
function to retrieve the parameter from the axis
void highPass(result_t::const_iterator orig, result_t::iterator filtered)
high pass filtering function
virtual void loadSettings(size_t)
load the settings
result_t::value_t cummulativeStatistics(const result_t &res)
retrieve the statistics value from the cummulative statistics calculator
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
std::tr1::function< cumstat_t::value_type(const cumstat_t &)> _val
the type of function used to retrive the wanted element
result_t::axe_t _origYAxis
y-axis object of the original size (without the nbr fills part)
std::vector< uint64_t > _list
the list of ids
float constantBaseline(const result_t &)
get constant baseline
retrieve user choosable type of bin of 1D result
result_t _previous
the previous result
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
shared_pointer _input
processor containing input result
std::tr1::function< result_t::value_t(const result_t &)> _value
function to retrieve the statistics type
pp69(const name_t &name)
constructor
shared_pointer _hist
processor containing input result
virtual void loadSettings(size_t)
load the settings of the pp
void histogramWithWeightFrom0D(CASSEvent::id_t id, result_t::const_iterator in, result_t::const_iterator last, result_t &result)
histogam with weight from 0D processor
virtual void loadSettings(size_t)
load the settings of the pp
pp78(const name_t &name)
constructor
void lowPass(result_t::const_iterator orig, result_t::iterator filtered)
low pass filtering function
shared_pointer _one
pp containing input result
result_t::value_t _difference
the maximum difference to previous val that is accepted
0D, 1D, and 2D to 2D histogramming.
void histogramAndBinCountWithConstant(CASSEvent::id_t unused, result_t::const_iterator in, result_t::const_iterator last, result_t &result)
histogam with user provided constant weight
result_t::value_t _threshold
the threshold
pp66(const name_t &name)
constructor
shared_pointer _one
processor containing result
uint64_t id_t
define the id type
virtual void loadSettings(size_t)
load the settings of the pp
shared_pointer _yInput
processor containing Y-axis value
shared_pointer _pHist
processor containing input result
virtual void loadSettings(size_t)
load the settings of the pp
statistics calculator for a cummulative statistic
virtual void loadSettings(size_t)
load the settings
virtual void process(const CASSEvent &, result_t &)
process event
virtual void process(const CASSEvent &, result_t &)
process event
result_t::value_t _previousVal
the value of the previous event
virtual void process(const CASSEvent &, result_t &)
process event
float _excludeVal
the value that should be excluded in the summation
virtual void process(const CASSEvent &, result_t &)
process event
void histogramAndBinCountWithConstant(CASSEvent::id_t unused, result_t::const_iterator xin, result_t::const_iterator xlast, result_t::const_iterator yin, result_t &result)
histogam with constant weight
unaryoperation_t ValAtFirst(result_t::value_t val)
bind the value to the first parameter of the binaryoperation
void histogramAndBinCountWithWeightFrom0D(CASSEvent::id_t id, result_t::const_iterator in, result_t::const_iterator last, result_t &result)
histogam with weights from 0D processor
shared_pointer _two
processor containing input when false result
size_t _nX
the size of the original image in X
shared_pointer _one
processor containing x-axis 0D result
virtual void process(const CASSEvent &, result_t &)
process event
shared_pointer _two
processor containing y-axis 0D result
size_t _nbrEventsAccumulated
the number of events the processor has accumulated
shared_pointer _hist
processor containing input result
shared_pointer _input
pp containing input histogram
void projectToY(result_t::const_iterator src, result_t::iterator result, result_t::iterator norm)
integrate the columns
void histogramAndBinCountWithWeights(CASSEvent::id_t id, result_t::const_iterator xin, result_t::const_iterator xlast, result_t::const_iterator yin, result_t &result)
histogam with weights from another processor
std::tr1::function< result_t::value_t(result_t::value_t, result_t::value_t)> binaryoperation_t
define the binary operation
virtual void loadSettings(size_t)
load the settings of this pp
result_t::value_t _weight
the weight in case it is a constant
pp50(const name_t &name)
constructor
virtual void process(const CASSEvent &, result_t &)
process event
0D,1D or 2D to 1D histogramming.
pp1(const name_t &name)
constructor
std::tr1::function< bool(const result_t::value_t &, const result_t::value_t &)> _op
operation to find the extreme point
virtual void loadSettings(size_t)
load the settings of the pp
virtual void process(const CASSEvent &, result_t &)
process event
pp68(const name_t &name)
constructor
return full width at half maximum in given range of 1D result
virtual void process(const CASSEvent &, result_t &)
process event
std::pair< int, int > _range
range we want to have the integral over in result bins
Axis< double > axe_t
the axis descriptions of this container
result_t::value_t checkrange(result_t::value_t val, result_t::value_t checkval)
check if value is in range and return another value
std::tr1::function< result_t::const_iterator(result_t::const_iterator, result_t::const_iterator)> _func
the type of function used to retrive the wanted bin
Weighted Projection of 2D result.
pp89(const name_t &name)
constructor
void histogramWithConstant(CASSEvent::id_t unused, result_t::const_iterator in, result_t::const_iterator last, result_t &result)
histogam with user provided constant weight
shared_pointer _threshold
pp containing threshold result
pp63(const name_t &)
constructor
virtual void loadSettings(size_t)
load the settings of the pp
Check whether value has changed.
shared_pointer _hist
pp containing the value to check
uint32_t _first_fiducials
time when the first samples was used in the point in time
virtual void process(const CASSEvent &, result_t &)
process event
virtual void loadSettings(size_t)
load the settings of the pp
void applyIdxwiseThreshold(const result_t &in, result_t &out, const CASSEvent::id_t &id)
apply a indexwise threshold
shared_pointer _one
pp containing X-axis 1D result to combine
MedianCalculator< result_t::value_t > med_t
define the median calculator used
result_t::value_t _value
the value for the unary operation
pp75(const name_t &name)
constructor
virtual void loadSettings(size_t)
load the settings
std::pair< int, int > _xRange
the requested x-axis limits in bins
result_t::value_t medianCalc(const result_t &res)
retrieve the statistics value from the median statistics calculator
size_t _range
the requested x-axis limits in histogram coordinates
pp76(const name_t &name)
constructor
std::tr1::function< void(result_t::const_iterator, result_t::iterator, result_t::iterator)> _project
the function used to project the image
void histogramWithConstant(CASSEvent::id_t unused, result_t::const_iterator xin, result_t::const_iterator xlast, result_t::const_iterator yin, result_t &result)
histogam with constant weight
std::pair< int, int > _offset
offset in x and y to the first bin of the input
shared_pointer _pHist
processor containing input result
result_t::storage_t table_t
definition of the table
shared_pointer _pHist
processor containing input result
void projectToY(result_t::const_iterator src, result_t::iterator dest)
project 2d result to y axis
shared_pointer _pHist
processor containing input result
virtual void process(const CASSEvent &, result_t &)
process event
record 0d result into 1d result.
base class for processors.
virtual void processEvent(const CASSEvent &)
overwrite default behaviour don't do anything
low / high pass filter of 1D result
size_t _num_seen_evt
the number of samples seen up to now and used in the point
virtual void releaseEvent(const CASSEvent &)
overwrite default behaviour don't do anything
std::tr1::function< void(result_t::const_iterator, result_t::iterator)> _project
function that will do the projection
Operation on result with value.
pp85(const name_t &name)
constructor
time_t _when_first_evt
time when the first samples was used in the point in time
Apply boolean NOT to 0D result.
virtual void loadSettings(size_t)
load the settings of the pp
pp82(const name_t &name)
constructor
shared_pointer _hist
processor containing input result
std::tr1::function< result_t::value_t(result_t::value_t)> unaryoperation_t
define the unary operation
void histogramWithWeights(CASSEvent::id_t id, result_t::const_iterator in, result_t::const_iterator last, result_t &result)
histogam with weights from another processor
virtual void loadSettings(size_t)
load the settings of the pp
result_t::axis_name _axisId
the id of the axis
std::pair< int, int > _xRange
the requested x-axis limits in bins
shared_pointer _pHist
processor containing input result
virtual void loadSettings(size_t)
load the settings of this pp
pp41(const name_t &name)
constructor
virtual void process(const CASSEvent &, result_t &)
process event
virtual void process(const CASSEvent &, result_t &)
process event
shared_pointer _one
pp containing input result
virtual void loadSettings(size_t)
load the settings of this pp
std::tr1::function< result_t::value_t(result_t::value_t, result_t::value_t)> _op
the operand
virtual void process(const CASSEvent &, result_t &)
process event
float _userFraction
user fraction of the height between low and up
setParamPos_t _setParamPos
function to set the value to the requested parameter position
virtual void loadSettings(size_t)
load the settings of this pp
store previous result of other Processor
pp77(const name_t &name)
constructor
std::tr1::function< result_t::value_t(const CASSEvent::id_t &)> valueRetrieval_t
define how to get the value
virtual void loadSettings(size_t)
load the settings of the pp
virtual const result_t & result(const CASSEvent::id_t eventid=0)
overwrite the retrieval of an result
result_t::value_t _userVal
the user value that will be set when the threshold is applied
shared_pointer _pHist
processor containing input result
0D and 1D to 2D combining.
virtual void loadSettings(size_t)
load the settings of this pp
virtual void loadSettings(size_t)
load the settings of this pp
virtual void loadSettings(size_t)
load the settings of the pp
pp61(const name_t &name)
constructor
virtual void loadSettings(size_t)
load the settings
shared_pointer _pHist
processor containing the 2d result we want to project
pp71(const name_t &name)
constructor
pp91(const name_t &name)
constructor
shared_pointer _one
processor containing first result
result_t::value_t valueFromPP(const CASSEvent::id_t &id)
retrieve value from Processor
shared_pointer _pHist
processor containing result to sum
virtual void process(const CASSEvent &, result_t &)
process event
size_t _size
the number of bins in the result, range is fixed
pp70(const name_t &name)
constructor
virtual void process(const CASSEvent &, result_t &)
process event
shared_pointer _pHist
processor containing input result
std::tr1::function< unaryoperation_t(result_t::value_t)> setParamPos_t
define how to get the right parameter position
result_t::value_t squareAverage(result_t::value_t val, result_t::value_t aveOld, result_t::value_t scale)
function that will calculate the square average
shared_pointer _valuePP
processor containing 0D value for the unary operation
file contains processors baseclass declaration
shared_pointer _two
processor containing the second result
time average of 0d result.
shared_pointer _pHist
processor containing result to average
pp87(const name_t &name)
constructor
valueRetrieval_t _retrieveValue
function to retrieve the value for the unary operation
std::pair< result_t::value_t, result_t::value_t > _range
the requested range that the value should be in
return axis parameter of a result
shared_pointer _xInput
processor containing X axis value
result_t::value_t threshold(const result_t::value_t &value, const result_t::value_t &thres)
the thresholding function
result_t::shared_pointer _res
the constant result
pp51(const name_t &name)
constructor
std::pair< int, int > _xRange
range we want to project
shared_pointer _one
processor containing result
pp2(const name_t &name)
constructor
shared_pointer _one
processor containing the first result
virtual void processEvent(const CASSEvent &)
process event
shared_pointer _weightProc
processor containing the weight
storage_t::iterator iterator
a iterator on the storage
contains declarations of statistic calculators
virtual void process(const CASSEvent &evt, result_t &)
process event
Returns a the min or max value of a result.
std::pair< size_t, size_t > _timerange
range of time that we use for the angular distribution
virtual void loadSettings(size_t)
load the settings of this pp
std::pair< int, int > _xRangeBaseline
the requested x-axis limits for find the baseline in bins
virtual void process(const CASSEvent &, result_t &)
process event
shared_pointer _pHist
processor containing result to work on
virtual const result_t & result(const CASSEvent::id_t)
overwrite default behaviour and just return the constant
void histogramWithWeightFrom0DInput(CASSEvent::id_t id, result_t::const_iterator xin, result_t::const_iterator xlast, result_t::const_iterator yin, result_t &result)
histogam with constant weight from input
std::tr1::function< result_t::const_iterator(result_t::const_iterator, result_t::const_iterator)> _func
the type of function used to retrive the wanted element
virtual void loadSettings(size_t)
load the settings of this pp
Threshold result based upon information from another result.
result_t::value_t _upperBound
the upper boundary of the range
float _fraction
the fraction of the range
pp13(const name_t &name)
constructor
std::tr1::function< void(const result_t &, result_t &, const CASSEvent::id_t &)> _applyThresh
the funtion that applies the threshold to the input
virtual void loadSettings(size_t)
load the settings
virtual const result_t & result(const CASSEvent::id_t eventid=0)
overwrite the retrieval of an result
std::tr1::function< void(CASSEvent::id_t, result_t::const_iterator, result_t::const_iterator, result_t &)> func_t
define the function for histogramming
pp4(const name_t &name)
constructor
result_t::value_t movingInitializationScale()
retrieve the moving average scale during the initialization
result_t::value_t valueFromConst(const CASSEvent::id_t &evt)
retrieve value constant
shared_pointer _input
processor containing the 1d result we want to integrate
Example of how to use the sacla online input
virtual void loadSettings(size_t)
load the settings of the pp
pp12(const name_t &)
constructor
void projectToX(result_t::const_iterator src, result_t::iterator result, result_t::iterator norm)
integrate the rows
pp81(const name_t &name)
constructor
std::tr1::function< result_t::value_t(result_t::value_t, result_t::value_t, result_t::value_t)> _func
function that will do the averagin
virtual void process(const CASSEvent &, result_t &)
process event
virtual void processEvent(const CASSEvent &)
overwrite process event
an accumulating processor
pp14(const name_t &name)
constructor
returns a list of local extreme points in a 1D result
void projectToX(result_t::const_iterator src, result_t::iterator dest)
project 2d result to x axis
virtual void process(const CASSEvent &, result_t &)
process event
virtual void loadSettings(size_t)
load the settings
void histogramWithWeights(CASSEvent::id_t id, result_t::const_iterator xin, result_t::const_iterator xlast, result_t::const_iterator yin, result_t &result)
histogam with weights from another processor
std::pair< int, int > _Xrange
range in X we want to project
pp56(const name_t &name)
constructor
shared_pointer _two
pp containing Y-axis 1D result to combine
virtual void process(const CASSEvent &, result_t &)
process event
shared_pointer _input
processor containing result to histogram
size_t _nX
the nbr of bins in the original image
unaryoperation_t ValAtSecond(result_t::value_t val)
bind the value to the second parameter of the binaryoperation
virtual void loadSettings(size_t)
load the settings of the pp
virtual void processEvent(const CASSEvent &)
overwrite process event
find center of Mass of 1D result in a user given range
std::string name_t
define the name type
virtual void process(const CASSEvent &, result_t &)
process event
float _alpha
factor used for filtering
std::tr1::function< float(const result_t &)> _baseline
the function that will return the baseline
pp88(const name_t &name)
constructor
pp60(const name_t &name)
constructor
std::tr1::shared_ptr< Processor > shared_pointer
a shared pointer of this
pp9(const name_t &name)
constructor
virtual void process(const CASSEvent &, result_t &)
process event
std::pair< int, int > _yRange
range we want to project
virtual void loadSettings(size_t)
load the settings of the pp
pp62(const name_t &)
constructor
virtual void process(const CASSEvent &, result_t &)
process event
result_t::value_t average(result_t::value_t val, result_t::value_t aveOld, result_t::value_t scale)
function for normal averaging.
virtual void process(const CASSEvent &, result_t &)
process event
check if there is some light in the chamber based upon the GMD value
size_t _nbrSamples
the number of bins in the result, range is fixed
virtual void process(const CASSEvent &, result_t &)
process event
virtual void process(const CASSEvent &, result_t &)
process event
shared_pointer _threshPP
pp containing the indexwise threshold
virtual void loadSettings(size_t)
load the settings of the pp
std::pair< int, int > _Yrange
range in Y we want to project
void histogramAndBinCountWithWeightFrom0DInput(CASSEvent::id_t id, result_t::const_iterator xin, result_t::const_iterator xlast, result_t::const_iterator yin, result_t &result)
histogam with constant weight from input
shared_pointer _one
processor containing the 1D result
virtual void loadSettings(size_t)
load the settings
CummulativeStatisticsCalculator< result_t::value_t > cumstat_t
define the type of cummulative statistics used
return the statistic values of all bins of a result
virtual void loadSettings(size_t)
load the settings of this pp
shared_pointer _one
processor containing input when true result
pp15(const name_t &name)
constructor
func_t _histogram
the function to histogram the values
Check whether result is in range.
virtual void releaseEvent(const CASSEvent &)
overwrite the release
result_t::value_t _lowerBound
the lower boundary of the range
virtual void process(const CASSEvent &, result_t &)
process event
virtual void loadSettings(size_t)
load the settings of the pp
virtual void loadSettings(size_t)
load the settings of the pp
virtual const result_t & result(const CASSEvent::id_t eventid=0)
retrieve a result for a given id.
virtual void loadSettings(size_t)
load the settings of the pp
shared_pointer _pHist
processor containing the input result
Constant Value processor.
virtual void loadSettings(size_t)
load the settings of the pp