#include <FloatFunBase.h>
Inheritance diagram for FloatFun:
Classes derived from FloatFun have to implement just the function operator(); this operator has to return a float for an event, which can be used as abscissa or weight value for a (self-filling) histogram entry.
FloatFun objects are mainly used by self-filling histograms.
The destructor of FloatFun is protected; therefore, FloatFun objects cannot be created as automatic variables, only on the heap. This ensures that all FloatFun objects live until the end of the program run, otherwise it would be very hard to ensure that a self-filling histogram, which stores only a pointer to a cut object, does not try to access a cut object that has already been destroyed. Purists can use the "destroy" method to delete a FloatFun object.
Changelog:
Author: Benno List, Jenny Böhme
Definition at line 51 of file FloatFunBase.h.
Public Member Functions | |
FloatFun (const char *name_="?") | |
Constructor from a C style string, serves as default constructor. | |
FloatFun (const std::string &name_) | |
Constructor from a C++ string. | |
FloatFun (const std::string &name_, const std::string &definition_) | |
Constructor from two C++ strings. | |
virtual Float_FF | operator() () const=0 |
Returns a float value, typically from an ntuple row. | |
virtual void | destroy () |
Replaces delete, which cannot be called because of protected destructor. | |
virtual const FillIterator * | getIterator () const |
Returns pointer to iterator, if any. | |
Static Public Member Functions | |
FloatFun * | getObject (const std::string &name) |
Access function that returns a pointer to an FloatFun object with this name. | |
FloatFun * | getObject (const char *name) |
Access function that returns a pointer to an NamedO object with this name. | |
Protected Member Functions | |
virtual | ~FloatFun () |
Protected destructor ensures creation on the heap. | |
Related Functions | |
(Note that these are not member functions.) | |
FloatFun & | operator+ (const FloatFun &lhs_, const FloatFun &rhs_) |
Sum of two FloatFun objects. | |
FloatFun & | operator+ (const FloatFun &lhs_, Float_FF rhs_) |
Sum of a FloatFun object with a scalar. | |
FloatFun & | operator+ (Float_FF lhs_, const FloatFun &rhs_) |
Sum of a FloatFun object with a scalar. | |
FloatFun & | operator- (const FloatFun &lhs_, const FloatFun &rhs_) |
Difference of two FloatFun objects. | |
FloatFun & | operator- (const FloatFun &lhs_, Float_FF rhs_) |
Difference of a FloatFun object with a scalar. | |
FloatFun & | operator- (Float_FF lhs_, const FloatFun &rhs_) |
Sum of a FloatFun object with a scalar. | |
FloatFun & | operator- (const FloatFun &arg_) |
Unary minus of a FloatFun. | |
FloatFun & | operator+ (FloatFun &arg_) |
Unary plus of a FloatFun. | |
FloatFun & | operator * (const FloatFun &lhs_, const FloatFun &rhs_) |
Product of two FloatFun objects. | |
FloatFun & | operator * (Float_FF lhs_, const FloatFun &rhs_) |
Scalar product with a FloatFun. | |
FloatFun & | operator * (const FloatFun &lhs_, Float_FF rhs_) |
Scalar product with a FloatFun. | |
FloatFun & | operator/ (const FloatFun &lhs_, const FloatFun &rhs_) |
Quotient of two FloatFun objects. | |
FloatFun & | operator/ (Float_FF lhs_, const FloatFun &rhs_) |
Division of a scalar by a FloatFun. | |
FloatFun & | operator/ (const FloatFun &lhs_, Float_FF rhs_) |
Division of a FloatFun by a scalar. | |
FloatFun & | abs (const FloatFun &arg_) |
Absolute value of a FloatFun. | |
FloatFun & | acos (const FloatFun &arg_) |
Arc cosine of a FloatFun. | |
FloatFun & | asin (const FloatFun &arg_) |
Arc sine of a FloatFun. | |
FloatFun & | atan (const FloatFun &arg_) |
Arc Tangent of a FloatFun. | |
FloatFun & | atan2 (const FloatFun &arg1, const FloatFun &arg2) |
Arc tangent of two FloatFun objects: atan2(y, x)=atan(y/x). | |
FloatFun & | ceil (const FloatFun &arg_) |
Ceiling of a FloatFun: smallest integral value not less than argument. | |
FloatFun & | cos (const FloatFun &arg_) |
Cosine of a FloatFun. | |
FloatFun & | cosh (const FloatFun &arg_) |
Hyperbolic Cosine of a FloatFun. | |
FloatFun & | exp (const FloatFun &arg_) |
Exponential function of a FloatFun. | |
FloatFun & | fabs (const FloatFun &arg_) |
Absolute value of a FloatFun. | |
FloatFun & | floor (const FloatFun &arg_) |
Floor value of a FloatFun: largest integral value not greater than argument. | |
FloatFun & | log (const FloatFun &arg_) |
Natural logarithm of a FloatFun. | |
FloatFun & | log10 (const FloatFun &arg_) |
Decadic logarithm of a FloatFun. | |
FloatFun & | pow (const FloatFun &arg1_, const FloatFun &arg2_) |
Power of a FloatFun. | |
FloatFun & | sin (const FloatFun &arg_) |
Sine of a FloatFun. | |
FloatFun & | sinh (const FloatFun &arg_) |
Hyperbolic sine of a FloatFun. | |
FloatFun & | tanh (const FloatFun &arg_) |
Hyperbolic tangent of a FloatFun. | |
FloatFun & | square (const FloatFun &arg_) |
Suare of a FloatFun. | |
FloatFun & | rad (const FloatFun &arg_) |
Conversion from degrees to radians. | |
FloatFun & | deg (const FloatFun &arg_) |
Conversion from radians to degrees. | |
FloatFunComp & | operator< (const FloatFun &lhs_, const FloatFun &rhs_) |
Comparison between two FloatFun objects. | |
FloatFunComp & | operator> (const FloatFun &lhs_, const FloatFun &rhs_) |
Comparison between two FloatFun objects. | |
FloatFunComp & | operator<= (const FloatFun &lhs_, const FloatFun &rhs_) |
Comparison between two FloatFun objects. | |
FloatFunComp & | operator>= (const FloatFun &lhs_, const FloatFun &rhs_) |
Comparison between two FloatFun objects. | |
FloatFunComp & | operator== (const FloatFun &lhs_, const FloatFun &rhs_) |
Comparison between two FloatFun objects. | |
FloatFunComp & | operator!= (const FloatFun &lhs_, const FloatFun &rhs_) |
Comparison between two FloatFun objects. | |
FloatFunComp & | operator< (Float_FF lhs_, const FloatFun &rhs_) |
Comparison between a Float_FF and a FloatFun. | |
FloatFunComp & | operator<= (Float_FF lhs_, const FloatFun &rhs_) |
Comparison between a Float_FF and a FloatFun. | |
FloatFunComp & | operator> (Float_FF lhs_, const FloatFun &rhs_) |
Comparison between a Float_FF and a FloatFun. | |
FloatFunComp & | operator>= (Float_FF lhs_, const FloatFun &rhs_) |
Comparison between a Float_FF and a FloatFun. | |
FloatFunComp & | operator== (Float_FF lhs_, const FloatFun &rhs_) |
Comparison between a Float_FF and a FloatFun. | |
FloatFunComp & | operator!= (Float_FF lhs_, const FloatFun &rhs_) |
Comparison between a Float_FF and a FloatFun. | |
FloatFunComp & | operator< (const FloatFun &lhs_, Float_FF rhs_) |
Comparison between a FloatFun and a Float_FF. | |
FloatFunComp & | operator<= (const FloatFun &lhs_, Float_FF rhs_) |
Comparison between a FloatFun and a Float_FF. | |
FloatFunComp & | operator> (const FloatFun &lhs_, Float_FF rhs_) |
Comparison between a FloatFun and a Float_FF. | |
FloatFunComp & | operator>= (const FloatFun &lhs_, Float_FF rhs_) |
Comparison between a FloatFun and a Float_FF. | |
FloatFunComp & | operator== (const FloatFun &lhs_, Float_FF rhs_) |
Comparison between a FloatFun and a Float_FF. | |
FloatFunComp & | operator!= (const FloatFun &lhs_, Float_FF rhs_) |
Comparison between a FloatFun and a Float_FF. | |
FloatFunComp & | operator< (const FloatFunComp &lhs_, const FloatFun &rhs_) |
Chained comparison, with a FloatFun object at the right side. | |
FloatFunComp & | operator<= (const FloatFunComp &lhs_, const FloatFun &rhs_) |
Chained comparison, with a FloatFun object at the right side. | |
FloatFunComp & | operator> (const FloatFunComp &lhs_, const FloatFun &rhs_) |
Chained comparison, with a FloatFun object at the right side. | |
FloatFunComp & | operator>= (const FloatFunComp &lhs_, const FloatFun &rhs_) |
Chained comparison, with a FloatFun object at the right side. | |
FloatFunComp & | operator== (const FloatFunComp &lhs_, const FloatFun &rhs_) |
Chained comparison, with a FloatFun object at the right side. | |
FloatFunComp & | operator!= (const FloatFunComp &lhs_, const FloatFun &rhs_) |
Chained comparison, with a FloatFun object at the right side. | |
FloatFunComp & | operator< (const FloatFunComp &lhs_, Float_FF rhs_) |
Chained comparison, with a FloatFun object at the right side. | |
FloatFunComp & | operator<= (const FloatFunComp &lhs_, Float_FF rhs_) |
Chained comparison, with a Float_FF at the right side. | |
FloatFunComp & | operator> (const FloatFunComp &lhs_, Float_FF rhs_) |
Chained comparison, with a Float_FF at the right side. | |
FloatFunComp & | operator>= (const FloatFunComp &lhs_, Float_FF rhs_) |
Chained comparison, with a Float_FF at the right side. | |
FloatFunComp & | operator== (const FloatFunComp &lhs_, Float_FF rhs_) |
Chained comparison, with a Float_FF at the right side. | |
FloatFunComp & | operator!= (const FloatFunComp &lhs_, Float_FF rhs_) |
Chained comparison, with a Float_FF at the right side. | |
FloatFun & | max (const FloatFunPoRConst &fun, const BaseCutPoRConst &cut=0, const FillIteratorPoR &intiter=0, const FillIteratorPoRConst &extiter=0) |
Returns the maximum of all values of fun if cut is fulfilled. | |
FloatFun & | min (const FloatFunPoRConst &fun, const BaseCutPoRConst &cut=0, const FillIteratorPoR &intiter=0, const FillIteratorPoRConst &extiter=0) |
Returns the minimum of all values of fun if cut is fulfilled. | |
FloatFun & | sum (const FloatFunPoRConst &fun, const BaseCutPoRConst &cut=0, const FillIteratorPoR &intiter=0, const FillIteratorPoRConst &extiter=0) |
Returns the sum of all values of fun if cut is fulfilled (if no fun is given, 1 is assumed). | |
FloatFun & | average (const FloatFunPoRConst &fun, const BaseCutPoRConst &cut=0, const FillIteratorPoR &intiter=0, const FillIteratorPoRConst &extiter=0) |
Returns the average of all values of fun if cut is fulfilled. | |
FloatFun & | cached (const ROListPoR &rol, const FloatFunPoR &fun, const FillIteratorPoR &iter=0) |
Returns a cached version of a FloatFun. | |
FloatFun & | gauss (const FloatFunPoR &rnd, double mean, double sigma) |
Returns a Gaussian distributed value from a random function. |
|
Constructor from a C style string, serves as default constructor.
Definition at line 55 of file FloatFunBase.h. |
|
Constructor from a C++ string.
Definition at line 59 of file FloatFunBase.h. |
|
Constructor from two C++ strings.
Definition at line 63 of file FloatFunBase.h. |
|
Access function that returns a pointer to an FloatFun object with this name. This access function must never be called within the constructor of any class that is derived from FloatFun!
Reimplemented from NamedO. Definition at line 80 of file FloatFunBase.h. |
|
Access function that returns a pointer to an NamedO object with this name. This access function must never be called within the constructor of any class that is derived from NamedO!
Reimplemented from NamedO. Definition at line 90 of file FloatFunBase.h. |
|
Returns the maximum of all values of fun if cut is fulfilled.
Definition at line 648 of file FloatFun.C. |
|
Returns the minimum of all values of fun if cut is fulfilled.
Definition at line 656 of file FloatFun.C. |
|
Returns the sum of all values of fun if cut is fulfilled (if no fun is given, 1 is assumed).
Definition at line 664 of file FloatFun.C. |
|
Returns the average of all values of fun if cut is fulfilled.
Definition at line 672 of file FloatFun.C. |
|
Returns a cached version of a FloatFun.
Definition at line 444 of file FloatFun.C. References getIterator(), FloatFunPoR::pff, and FillIteratorPoR::pfi. |
|
Returns a Gaussian distributed value from a random function.
Definition at line 302 of file RandomFuns.C. References FloatFunPoR::pff. |