|
template<class Q , class T > |
T * | getRepresentation (const Q &hist) |
|
std::pair< DataObject *, AIDA::IHistogram1D * > | createH1D (const AIDA::IHistogram1D &hist) |
| Copy constructor. More...
|
|
std::pair< DataObject *, AIDA::IHistogram1D * > | createH1D (const std::string &title, int nBins=10, double lowerEdge=0., double upperEdge=1.) |
| Creator for 1D histogram with fixed bins. More...
|
|
std::pair< DataObject *, AIDA::IHistogram1D * > | createH1D (const std::string &title, const Edges &e) |
| Creator for 1D histogram with variable bins. More...
|
|
std::pair< DataObject *, AIDA::IHistogram2D * > | createH2D (const AIDA::IHistogram2D &hist) |
| Copy constructor. More...
|
|
std::pair< DataObject *, AIDA::IHistogram2D * > | createH2D (TH2D *rep) |
| "Adopt" constructor More...
|
|
std::pair< DataObject *, AIDA::IHistogram2D * > | createH2D (const std::string &title, int binsX, double iminX, double imaxX, int binsY, double iminY, double imaxY) |
| Creator for 2 D histograms with fixed bins. More...
|
|
std::pair< DataObject *, AIDA::IHistogram2D * > | createH2D (const std::string &title, const Edges &eX, const Edges &eY) |
| Creator for 2 D histograms with variable bins. More...
|
|
std::pair< DataObject *, AIDA::IHistogram1D * > | slice1DX (const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin) |
| Create 1D slice from 2D histogram. More...
|
|
std::pair< DataObject *, AIDA::IProfile1D * > | profile1DX (const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin) |
| Create 1D profile in X from 2D histogram. More...
|
|
std::pair< DataObject *, AIDA::IHistogram1D * > | project1DX (const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin) |
| Create 1D projection in X from 2D histogram. More...
|
|
std::pair< DataObject *, AIDA::IHistogram1D * > | slice1DY (const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin) |
| Create 1D slice from 2D histogram. More...
|
|
std::pair< DataObject *, AIDA::IProfile1D * > | profile1DY (const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin) |
| Create 1D profile in Y from 2D histogram. More...
|
|
std::pair< DataObject *, AIDA::IHistogram1D * > | project1DY (const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin) |
| Create 1D projection in Y from 2D histogram. More...
|
|
std::pair< DataObject *, AIDA::IHistogram3D * > | createH3D (const AIDA::IHistogram3D &hist) |
| Copy constructor. More...
|
|
std::pair< DataObject *, AIDA::IHistogram3D * > | createH3D (const std::string &title, int nBinsX, double xlow, double xup, int nBinsY, double ylow, double yup, int nBinsZ, double zlow, double zup) |
| Create 3D histogram with fixed bins. More...
|
|
std::pair< DataObject *, AIDA::IHistogram3D * > | createH3D (const std::string &title, const Edges &eX, const Edges &eY, const Edges &eZ) |
| Create 3D histogram with variable bins. More...
|
|
std::pair< DataObject *, AIDA::IProfile1D * > | createProf1D (const AIDA::IProfile1D &hist) |
| Copy constructor. More...
|
|
std::pair< DataObject *, AIDA::IProfile1D * > | createProf1D (const std::string &title, int nBins, double xlow, double xup, double ylow, double yup, const std::string &opt="") |
| Creator of 1D profile with fixed bins. More...
|
|
std::pair< DataObject *, AIDA::IProfile1D * > | createProf1D (const std::string &title, const Edges &e, double ylow, double yup, const std::string &opt="") |
| Creator of 1D profile with variable bins. More...
|
|
std::pair< DataObject *, AIDA::IProfile2D * > | createProf2D (const AIDA::IProfile2D &hist) |
| Copy constructor. More...
|
|
std::pair< DataObject *, AIDA::IProfile2D * > | createProf2D (const std::string &title, int binsX, double iminX, double imaxX, int binsY, double iminY, double imaxY, double lowerValue, double upperValue) |
| Creator for 2 D profile with fixed bins. More...
|
|
std::pair< DataObject *, AIDA::IProfile2D * > | createProf2D (const std::string &title, const Edges &eX, const Edges &eY, double lowerValue, double upperValue) |
| Creator for 2 D profile with variable bins. More...
|
|
template<class F , class Tuple > |
decltype(auto) constexpr | apply (F &&f, Tuple &&t) noexcept(noexcept( detail::apply_impl(std::forward< F >(f), std::forward< Tuple >(t), std::make_index_sequence< std::tuple_size< std::remove_reference_t< Tuple >>::value >{}))) |
|
StatusCode | setAppReturnCode (SmartIF< IProperty > &appmgr, int value, bool force=false) |
| Set the application return code. More...
|
|
int | getAppReturnCode (const SmartIF< IProperty > &appmgr) |
| Get the application (current) return code. More...
|
|
GAUDI_API IAppMgrUI * | createApplicationMgrEx (const std::string &dllname, const std::string &factname) |
|
GAUDI_API IAppMgrUI * | createApplicationMgr (const std::string &dllname, const std::string &factname) |
|
GAUDI_API IAppMgrUI * | createApplicationMgr (const std::string &dllname) |
|
GAUDI_API IAppMgrUI * | createApplicationMgr () |
|
GAUDI_API IInterface * | createInstance (const std::string &name, const std::string &factname, const std::string &ddlname) |
|
GAUDI_API ISvcLocator * | svcLocator () |
|
GAUDI_API ISvcLocator * | setInstance (ISvcLocator *newInstance) |
| Set new instance of service locator. More...
|
|
GAUDI_API IAppMgrUI * | setInstance (IAppMgrUI *newInstance) |
| Set new instance of service locator. More...
|
|
template<typename... lambda_ts> |
auto | overload (lambda_ts &&...lambdas) |
|
GAUDI_API void | pushCurrentDataObject (DataObject **pobjAddr) |
|
GAUDI_API void | popCurrentDataObject () |
|
GAUDI_API DataObject * | getCurrentDataObject () |
|
template<typename... Is> |
std::vector< std::string > | getInterfaceNames (Gaudi::interface_list< Is... >) |
|
template<typename... Is, typename P > |
void * | iid_cast (const InterfaceID &tid, Gaudi::interface_list< Is... >, P *ptr) |
|
template<typename TARGET > |
TARGET * | Cast (IInterface *i) |
| Cast a IInterface pointer to an IInterface specialization (TARGET). More...
|
|
template<typename TARGET > |
const TARGET * | Cast (const IInterface *i) |
| Cast a IInterface pointer to an IInterface specialization (TARGET). More...
|
|
template<class F , class... ArgTypes> |
auto | invoke (F &&f, ArgTypes &&...args) noexcept(noexcept(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...))) -> decltype(detail2::INVOKE(std::forward< F >(f), std::forward< ArgTypes >(args)...)) |
|
template<class CONTAINER > |
NamedRange_< CONTAINER > | range (const CONTAINER &cnt, std::string name) |
| simple function to create the named range from arbitrary container More...
|
|
template<class T , class TP , class V , class H > |
bool | operator== (const T &v, const Property< TP, V, H > &p) |
| delegate (value == property) to property operator== More...
|
|
template<class T , class TP , class V , class H > |
bool | operator!= (const T &v, const Property< TP, V, H > &p) |
| delegate (value != property) to property operator!= More...
|
|
template<class T , class TP , class V , class H > |
decltype(auto) | operator+ (const T &v, const Property< TP, V, H > &p) |
| implemantation of (value + property) More...
|
|
template<class CONTAINER > |
Range_< CONTAINER > | range (const CONTAINER &cnt) |
| simple function to create the range from the arbitrary container More...
|
|
GAUDI_API void | Sleep (int sec) |
| Simple sleep function. More...
|
|
GAUDI_API void | NanoSleep (long long nsec) |
| Small variation on the sleep function for nanoseconds sleep. More...
|
|
template<unsigned int N> |
bool | operator== (const Gaudi::StringKey &key1, const char(&key2)[N]) |
| equality operator with C-arrays More...
|
|
template<unsigned int N> |
bool | operator!= (const Gaudi::StringKey &key1, const char(&key2)[N]) |
| non-equality operator with C-arrays More...
|
|
bool | operator== (const std::string &key1, const Gaudi::StringKey &key2) |
| "right" form of equality operator More...
|
|
template<unsigned int N> |
bool | operator== (const char(&key1)[N], const Gaudi::StringKey &key2) |
| "right" form of equality operator More...
|
|
bool | operator!= (const std::string &key1, const Gaudi::StringKey &key2) |
| "right" form of non-equality operator More...
|
|
template<unsigned int N> |
bool | operator!= (const char(&key1)[N], const Gaudi::StringKey &key2) |
| "right" form of non-equality operator More...
|
|
std::size_t | hash_value (const Gaudi::StringKey &key) |
| hash-function: heeded for boost::hash More...
|
|
std::ostream & | operator<< (std::ostream &o, const Gaudi::StringKey &key) |
| printout of the object reply on the native printout for the string More...
|
|
std::ostream & | operator<< (std::ostream &out, const Gaudi::Time &time) |
| Output operator. More...
|
|
std::ostream & | operator<< (std::ostream &out, const Gaudi::TimeSpan &time) |
| Output operator. More...
|
|
bool | operator< (const Gaudi::Histo1DDef &left, const Gaudi::Histo1DDef &right) |
|
bool | operator== (const Gaudi::Histo1DDef &left, const Gaudi::Histo1DDef &right) |
|
bool | operator!= (const Gaudi::Histo1DDef &left, const Gaudi::Histo1DDef &right) |
|
std::ostream & | operator<< (std::ostream &o, const Gaudi::Histo1DDef &histo) |
|
std::string | createGuidAsString () |
| Helper function creating file identifier using the UUID mechanism. More...
|
|
Helper functions to set/get the application return code.
Create a hash with a large avalanche effect from 32 or 64 bit integers or a string.
rebuild "the linear container" from the map
General Gaudi namepace.
< AIDA
This file provides efficient counter implementations for Gaudi.
General Gaudi namespace.
- Author
- Marco Clemencic
-
Juan PALACIOS
- Date
- 2005-11-21
A number of concepts and templated classes are defined in this file
Concepts
- Accumulator : object accumulating some data in some way. examples : counters, sum of squares accumulator, minimum accumulator (keeps minimum of all values)
- Atomicity : the atomicity of an accumulator. Can be none or full. "none" means that the accumulator is not thread safe and should only be used locally within a thread. "full" means that the accumulator is thread safe, but that you pay the price of atomics inside. Note that this price may be reduced by the usage of the Buffer class, see below.
- InputTransform : a transformation to be applied to the input of an Accumulator. for example "elevation to power 2" for a sum of squares Accumulator, "identity" for a sum Accumulator or a minimum Accumulator, "constant 1" for a pure counter
- OutputTransform : a transformation to be applied to the value of an Accumulator when reading it. Usually identity. You can think of square root for an RMS Accumulator (accumulating squares internally)
- ValueHandler : the class handling the internal value of an Accumulator, and responsible for updating it with a new input. It defines the initial default value, the storage type used (depending on atomicity) and the actual update operation (sum, keep min or max typically).
- AccumulatorSet : an Accumulator defined as a set of Accumulators with same InputType and Atomicity. Updating it means updating all Accumulators of the set with the same value. E.g. a set with Counter and Sum will be able to compute some average
- Buffer : a wrapper around a thread safe Accumulator that allows to accumulate locally (in a non thread safe Accumulator) data before merging into the original one when Buffer is destructed. To be use when accumulators are updated in tight loops
- Counter : a higher level object that is an Accumulator and provides extra methods, most notably a way to print itself via operator<<, a print method and a buffer method to retrieve a Buffer on top of it.
Classes and helper functions
- many classes are directly linked to concepts :
- Constant, Identity, Square are InputTransforms / OutputTransforms
- BaseValueHandler : a base class for ValueHandlers Adder, Minimum and Maximum
- Adder, Extremum, Minimum, Maximum, Binomial are ValueHandlers
- GenericAccumulator : implements a generic Accumulator. See class definition for details
- AccumulatorSet binds together a set of Accumulators into a new accumulator
- Buffer implements the local buffering of an Accumulator
- some classes implements the most common Accumulators :
- MaxAccumulator : keeps the max, has a max() method
- MinAccumulator : keeps the min, has a min() method
- CountAccumulator : keeps count of number of values, has a nEntries() method
- SumAccumulator : keeps the sum of all values, has a sum() method
- SquareAccumulator : keeps the sum of all values squared, has a sum2() method
- TrueAccumulator : keeps a count of the number of true values, has a nTrueEntries() method
- FalseAccumulator : keeps a count of the number of false values, has a nFalseEntries() method
- BinomialAccumulator : set of TrueAccumulator and FalseAccumulator. Has extra nEntries(), efficiency() and efficiencyErr() methods
- AveragingAccumulator : set of CountAccumulator and SumAccumulator. Has an extra mean() method
- SigmaAccumulator : set of AveragingAccumulator and SquareAccumulator. Has extra methods variance(), standard_deviation() and meanErr()
- StatAccumulator : set of SigmaAccumulator, MinAccumulator and MaxAccumulator
- some classes implement the most common Counters :
- PrintableCounter is the interface to be used for abstract counters that can be printed
- BufferableCounter is the base class for counters that can be buffered. It provides a buffer method returning a Buffer on the current counter
- Counter, AveragingCounter, SigmaCounter, StatCounter, BinomialCounter : standard counters based on the corresponding accumulators
- StatEntity : a counter meant to be backward compatible with the old one and actually being a set of StatAccumulator and BinomialAccumulator. StatEntity should not be used and should be dropped when ancient code has been ported to the other counters
Notes
All Accumulators and Counters defined above are provided in their atomic and non atomic versions
Here is an example of the typical usage of these classes :
1 AveragingCounter<> avg;
5 std::cout << avg << std::endl;
11 std::cout << sig << std::endl;
13 AveragingCounter<float, atomicity::full> avg2;
15 auto buf = avg2.buffer();
16 for ( int i = 0; i < 1000; i++ ) buf += i;
17 // single update of original counter when buf
is destroyed
19 std::cout << avg2 << std::endl;
21 BinomialCounter<> bin;
27 std::cout << bin << std::endl;
33 std::cout << se << std::endl;
- Author
- Juan PALACIOS
- Date
- 2005-11-23
- Author
- Marco Clemencic marco.nosp@m..cle.nosp@m.menci.nosp@m.c@ce.nosp@m.rn.ch
-
Marco Clemencic marco.nosp@m..cle.nosp@m.menci.nosp@m.c@ce.nosp@m.rn.ch See Gaudi::PluginService
note: the constants below are not arbitrary, but are picked carefully such that the bit shuffling has a large 'avalanche' effect... Code by Brett Mulvey (old link: http://bretm.home.comcast.net/~bretm/hash/)
note: as a result, you might call this a quasi-random (not to be confused with psuedo-random!) number generator, in that it generates an output which satisfies a requirement on the uniformity of its output distribution. (and not on the predictability of the next number in the sequence, based on knowledge of the preceding numbers)
note: another way to look at this is is as an (approximation of an) evaporating black hole: whatever you dump in to it, you get something uniformly distributed back ;-)