The Gaudi Framework  v30r3 (a5ef0a68)
Gaudi Namespace Reference

Helper functions to set/get the application return code. More...

Namespaces

 Accumulators
 
 CommonGaudiConfigurables
 
 Concurrency
 
 Configuration
 
 CounterSummary
 
 cpp17
 
 detail
 
 detail2
 
 Details
 
 details
 
 Functional
 
 Guards
 Guards.h GaudiKernel/Guards.h Collection of very simple classes which allows to execution of some functions within the given well-defined and exception-safe context.
 
 Histos
 collection of simple utilities to deal with histograms
 
 Hive
 
 iid_cast_details
 
 Main
 
 meta
 
 Parsers
 
 PluginService
 See Gaudi::PluginService.
 
 ReturnCode
 ApplicationMgr return code definitions.
 
 StateMachine
 
 tagged_bool_ns
 
 Units
 
 Utils
 

Classes

class  _ConfigurablesModule
 
class  Axis
 An IAxis represents a binned histogram axis. More...
 
class  BootSvcLocator
 A dual-stage boostrap mechanism is used to ensure an orderly startup of the ApplicationMgr. More...
 
class  DataHandle
 
struct  fullMatch_t
 
class  Generic1D
 Common AIDA implementation stuff for histograms and profiles using ROOT implementations. More...
 
class  Generic2D
 Common AIDA implementation stuff for histograms and profiles using ROOT implementations. More...
 
class  Generic3D
 Common AIDA implementation stuff for histograms and profiles using ROOT implementations. More...
 
class  Histo1DDef
 Simple helper class for description of 1D-histogram The class is targeted to act as the primary "histogram property", but clearly have significantly wider application range. More...
 
class  Histogram1D
 AIDA implementation for 1 D histograms using ROOT THD1. More...
 
class  Histogram2D
 AIDA implementation for 2 D histograms using ROOT THD2. More...
 
class  Histogram3D
 AIDA implementation for 3 D histograms using ROOT THD2. More...
 
class  HistogramBase
 Common base class for all histograms Use is solely functional to minimize dynamic_casts inside HistogramSvc. More...
 
class  IDataConnection
 ABC describing basic data connection. More...
 
class  IFileCatalog
 File catalog interface. More...
 
class  IFileCatalogMgr
 File catalog manager. More...
 
class  IIODataManager
 
struct  interface_list
 
struct  interface_list_append
 
struct  interface_list_append< interface_list< Is... >, I >
 
struct  interface_list_cat
 
struct  interface_list_cat< interface_list< I... > >
 
struct  interface_list_cat< interface_list< I1... >, interface_list< I2... > >
 
struct  interface_list_cat< interface_list< I1... >, interface_list< I2... >, Others... >
 
struct  InterfaceId
 Class to handle automatically the versioning of the interfaces when they are inheriting from other interfaces. More...
 
class  IODataManager
 
class  ISignalMonitor
 Interface for the service that monitors the occurrences of system signals. More...
 
struct  majorMatch_t
 
class  MetaDataSvc
 
class  MultiFileCatalog
 This class constitutes the core of the XML based FileCatalog API for using POOL within Gaudi. More...
 
class  NamedRange_
 
class  ParticlePropertySvc
 This service provides access to particle properties. More...
 
class  PoolTool
 
class  Profile1D
 AIDA implementation for 1 D profiles using ROOT TProfile. More...
 
class  Profile2D
 AIDA implementation for 2 D profiles using ROOT TProfile2D. More...
 
class  Property
 Implementation of property with value of concrete type. More...
 
class  Property< TYPE(&)[N], VERIFIER, HANDLERS >
 
class  Property< TYPE[N], VERIFIER, HANDLERS >
 
class  Range_
 Useful class for representation of "sequence" of the objects through the range of valid iterators. More...
 
struct  RangeBase_
 helper class to simplify the dealing with ranges in Python More...
 
class  RootAddress
 Description: More...
 
class  RootCnvSvc
 Description: More...
 
class  RootConnectionSetup
 
class  RootConverter
 Description: Definition of the ROOT data converter. More...
 
class  RootDatabaseCnv
 Statistics file converter class definition. More...
 
class  RootDataConnection
 Concrete implementation of the IDataConnection interface to access ROOT files. More...
 
class  RootDirectoryCnv
 Description: NTuple directory converter class definition Definition of the converter to manage the directories in an database representing N-Tuples. More...
 
class  RootEvtSelector
 Concrete event selector implementation to access ROOT files. More...
 
class  RootEvtSelectorContext
 ROOT specific event selector context. More...
 
class  RootNTupleCnv
 NTuple converter class definition for NTuples writted/read using ROOT. More...
 
class  RootNTupleDescriptor
 Description: More...
 
struct  RootObjectRefs
 Persistent reference object containing all leafs and links corresponding to a Gaudi DataObject. More...
 
class  RootPerfMonSvc
 Description: More...
 
struct  RootRef
 Persistent reference object. More...
 
class  RootStatCnv
 Description: Base class converter for N-tuples and related classes. More...
 
class  RootTool
 Description: More...
 
class  SerialTaskQueue
 Class for a generic serial queue of tasks (modeled on the Intel Threading Building Blocks Design Pattern "Local Serializer"). More...
 
class  StringKey
 The helper class to represent the efficient "key" for access. More...
 
class  SysProcStat
 
class  Time
 Based on seal::Time. More...
 
class  TimeSpan
 Based on seal::TimeSpan. More...
 
class  XMLFileCatalog
 This class constitutes the core of the XML based FileCatalog API for POOL. More...
 

Functions

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 IAppMgrUIcreateApplicationMgrEx (const std::string &dllname, const std::string &factname)
 
GAUDI_API IAppMgrUIcreateApplicationMgr (const std::string &dllname, const std::string &factname)
 
GAUDI_API IAppMgrUIcreateApplicationMgr (const std::string &dllname)
 
GAUDI_API IAppMgrUIcreateApplicationMgr ()
 
GAUDI_API IInterfacecreateInstance (const std::string &name, const std::string &factname, const std::string &ddlname)
 
GAUDI_API ISvcLocatorsvcLocator ()
 
GAUDI_API ISvcLocatorsetInstance (ISvcLocator *newInstance)
 Set new instance of service locator. More...
 
GAUDI_API IAppMgrUIsetInstance (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 DataObjectgetCurrentDataObject ()
 
template<typename... Is>
std::vector< std::stringgetInterfaceNames (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::ostreamoperator<< (std::ostream &o, const Gaudi::StringKey &key)
 printout of the object reply on the native printout for the string More...
 
std::ostreamoperator<< (std::ostream &out, const Gaudi::Time &time)
 Output operator. More...
 
std::ostreamoperator<< (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::ostreamoperator<< (std::ostream &o, const Gaudi::Histo1DDef &histo)
 
std::string createGuidAsString ()
 Helper function creating file identifier using the UUID mechanism. More...
 

Detailed Description

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;
2 avg += 3;
3 avg += 5;
4 avg += 6;
5 std::cout << avg << std::endl;
6 
7 SigmaCounter<> sig;
8 sig += 3;
9 sig += 5;
10 sig += 6;
11 std::cout << sig << std::endl;
12 
13 AveragingCounter<float, atomicity::full> avg2;
14 {
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
18 }
19 std::cout << avg2 << std::endl;
20 
21 BinomialCounter<> bin;
22 bin += false;
23 bin += true;
24 bin += true;
25 bin += false;
26 bin += false;
27 std::cout << bin << std::endl;
28 
29 StatEntity se;
30 se += 3;
31 se += 5;
32 se += 6;
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 ;-)

Function Documentation

template<class F , class Tuple >
decltype( auto ) constexpr Gaudi::apply ( F &&  f,
Tuple &&  t 
)
noexcept

Definition at line 31 of file apply.h.

33  {} ) ) )
34  {
35  return detail::apply_impl( std::forward<F>( f ), std::forward<Tuple>( t ),
36  std::make_index_sequence<std::tuple_size<std::remove_reference_t<Tuple>>::value>{} );
37  }
decltype(auto) constexpr apply_impl(F &&f, Tuple &&t, std::index_sequence< I... >) noexcept( noexcept(Gaudi::invoke(std::forward< F >(f), std::get< I >(std::forward< Tuple >(t))...)))
Definition: apply.h:18
template<typename TARGET >
TARGET* Gaudi::Cast ( IInterface i)

Cast a IInterface pointer to an IInterface specialization (TARGET).

Definition at line 354 of file IInterface.h.

355  {
356  return reinterpret_cast<TARGET*>( i->i_cast( TARGET::interfaceID() ) );
357  }
virtual void * i_cast(const InterfaceID &) const =0
main cast function
template<typename TARGET >
const TARGET* Gaudi::Cast ( const IInterface i)

Cast a IInterface pointer to an IInterface specialization (TARGET).

const version

Definition at line 361 of file IInterface.h.

362  {
363  return reinterpret_cast<const TARGET*>( i->i_cast( TARGET::interfaceID() ) );
364  }
virtual void * i_cast(const InterfaceID &) const =0
main cast function
GAUDI_API IAppMgrUI* Gaudi::createApplicationMgr ( const std::string dllname,
const std::string factname 
)
GAUDI_API IAppMgrUI* Gaudi::createApplicationMgr ( const std::string dllname)
GAUDI_API IAppMgrUI* Gaudi::createApplicationMgr ( )

Definition at line 237 of file Bootstrap.cpp.

237 { return Gaudi::createApplicationMgr(); }
GAUDI_API IAppMgrUI * createApplicationMgr(const std::string &dllname, const std::string &factname)
GAUDI_API IAppMgrUI* Gaudi::createApplicationMgrEx ( const std::string dllname,
const std::string factname 
)
std::string Gaudi::createGuidAsString ( )

Helper function creating file identifier using the UUID mechanism.

Create file identifier using UUID mechanism.

std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::createH1D ( const AIDA::IHistogram1D &  hist)

Copy constructor.

std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::createH1D ( const std::string title,
int  nBins = 10,
double  lowerEdge = 0.,
double  upperEdge = 1. 
)

Creator for 1D histogram with fixed bins.

std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::createH1D ( const std::string title,
const Edges e 
)

Creator for 1D histogram with variable bins.

std::pair<DataObject*, AIDA::IHistogram2D*> Gaudi::createH2D ( const AIDA::IHistogram2D &  hist)

Copy constructor.

std::pair<DataObject*, AIDA::IHistogram2D*> Gaudi::createH2D ( TH2D *  rep)

"Adopt" constructor

std::pair<DataObject*, AIDA::IHistogram2D*> Gaudi::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.

std::pair<DataObject*, AIDA::IHistogram2D*> Gaudi::createH2D ( const std::string title,
const Edges eX,
const Edges eY 
)

Creator for 2 D histograms with variable bins.

std::pair<DataObject*, AIDA::IHistogram3D*> Gaudi::createH3D ( const AIDA::IHistogram3D &  hist)

Copy constructor.

std::pair<DataObject*, AIDA::IHistogram3D*> Gaudi::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.

std::pair<DataObject*, AIDA::IHistogram3D*> Gaudi::createH3D ( const std::string title,
const Edges eX,
const Edges eY,
const Edges eZ 
)

Create 3D histogram with variable bins.

GAUDI_API IInterface* Gaudi::createInstance ( const std::string name,
const std::string factname,
const std::string ddlname 
)
std::pair<DataObject*, AIDA::IProfile1D*> Gaudi::createProf1D ( const AIDA::IProfile1D &  hist)

Copy constructor.

std::pair<DataObject*, AIDA::IProfile1D*> Gaudi::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.

std::pair<DataObject*, AIDA::IProfile1D*> Gaudi::createProf1D ( const std::string title,
const Edges e,
double  ylow,
double  yup,
const std::string opt = "" 
)

Creator of 1D profile with variable bins.

std::pair<DataObject*, AIDA::IProfile2D*> Gaudi::createProf2D ( const AIDA::IProfile2D &  hist)

Copy constructor.

std::pair<DataObject*, AIDA::IProfile2D*> Gaudi::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.

std::pair<DataObject*, AIDA::IProfile2D*> Gaudi::createProf2D ( const std::string title,
const Edges eX,
const Edges eY,
double  lowerValue,
double  upperValue 
)

Creator for 2 D profile with variable bins.

int Gaudi::getAppReturnCode ( const SmartIF< IProperty > &  appmgr)
inline

Get the application (current) return code.

Returns
the return code or 0 if it was not possible to get it

Definition at line 72 of file AppReturnCode.h.

73  {
74  if ( appmgr ) {
75  Gaudi::Property<int> returnCode( "ReturnCode", 0 );
76  if ( appmgr->getProperty( &returnCode ).isSuccess() ) return returnCode.value();
77  }
78  return 0;
79  }
Implementation of property with value of concrete type.
Definition: Property.h:381
bool isSuccess() const
Definition: StatusCode.h:287
virtual StatusCode getProperty(Gaudi::Details::PropertyBase *p) const =0
Get the property by property.
GAUDI_API DataObject* Gaudi::getCurrentDataObject ( )
template<typename... Is>
std::vector<std::string> Gaudi::getInterfaceNames ( Gaudi::interface_list< Is... >  )

Definition at line 206 of file IInterface.h.

207  {
208  return {Is::name()...};
209  }
template<class Q , class T >
T* Gaudi::getRepresentation ( const Q &  hist)

Definition at line 9 of file HistogramUtility.h.

10  {
11  auto p = dynamic_cast<const HistogramBase*>( &hist );
12  return p ? dynamic_cast<T*>( p->representation() ) : nullptr;
13  }
std::size_t Gaudi::hash_value ( const Gaudi::StringKey key)
inline

hash-function: heeded for boost::hash

Attention
NEVER use the actual hash value for anything stored in files, as it is not guaranteed that the hashing scheme will remain the same. The only reason for this function is Python and transparent usage of this object for hashmap-like containers
See also
Gaudi::Hash
Returns
the actual hash value
Author
Vanya BELYAEV Iavn..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 207 of file StringKey.h.

207 { return key.__hash__(); }
std::size_t __hash__() const
the actual access to the hash
Definition: StringKey.h:116
template<typename... Is, typename P >
void* Gaudi::iid_cast ( const InterfaceID tid,
Gaudi::interface_list< Is... >  ,
P *  ptr 
)
inline

Definition at line 212 of file IInterface.h.

213  {
214  constexpr auto iid_cast_ = iid_cast_details::iid_cast_t<Is...>{};
215  return iid_cast_( tid, ptr );
216  }
template<class F , class... ArgTypes>
auto Gaudi::invoke ( F &&  f,
ArgTypes &&...  args 
) -> decltype( detail2::INVOKE( std::forward<F>( f ), std::forward<ArgTypes>( args )... ) )
noexcept

Definition at line 93 of file invoke.h.

97  {
98  return detail2::INVOKE( std::forward<F>( f ), std::forward<ArgTypes>( args )... );
99  }
auto INVOKE(F &&f, Args &&...args) noexcept(noexcept(std::forward< F >(f)(std::forward< Args >(args)...))) -> std::enable_if_t<!std::is_member_pointer< std::decay_t< F >>::value, decltype(std::forward< F >(f)(std::forward< Args >(args)...))>
Definition: invoke.h:84
GAUDI_API void Gaudi::NanoSleep ( long long  nsec)

Small variation on the sleep function for nanoseconds sleep.

Author
Marco Clemencic

Definition at line 10 of file Sleep.cpp.

bool Gaudi::operator!= ( const Gaudi::Histo1DDef left,
const Gaudi::Histo1DDef right 
)

Definition at line 80 of file HistoDef.cpp.

80 { return !( left == right ); }
template<unsigned int N>
bool Gaudi::operator!= ( const Gaudi::StringKey key1,
const char(&)  key2[N] 
)
inline

non-equality operator with C-arrays

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 160 of file StringKey.h.

161  {
162  return !( key1 == key2 );
163  }
bool Gaudi::operator!= ( const std::string key1,
const Gaudi::StringKey key2 
)
inline

"right" form of non-equality operator

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 185 of file StringKey.h.

185 { return key2 != key1; }
template<unsigned int N>
bool Gaudi::operator!= ( const char(&)  key1[N],
const Gaudi::StringKey key2 
)
inline

"right" form of non-equality operator

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 192 of file StringKey.h.

193  {
194  return key2 != key1;
195  }
template<class T , class TP , class V , class H >
bool Gaudi::operator!= ( const T &  v,
const Property< TP, V, H > &  p 
)

delegate (value != property) to property operator!=

Definition at line 750 of file Property.h.

751  {
752  return p != v;
753  }
template<class T , class TP , class V , class H >
decltype( auto ) Gaudi::operator+ ( const T &  v,
const Property< TP, V, H > &  p 
)

implemantation of (value + property)

Definition at line 757 of file Property.h.

758  {
759  return v + p.value();
760  }
bool Gaudi::operator< ( const Gaudi::Histo1DDef left,
const Gaudi::Histo1DDef right 
)

Definition at line 55 of file HistoDef.cpp.

56  {
57  return std::tie( left.m_title, left.m_low, left.m_high, left.m_bins ) <
58  std::tie( right.m_title, right.m_low, right.m_high, right.m_bins );
59  }
T tie(T...args)
double m_high
High Edge.
Definition: HistoDef.h:104
std::string m_title
Histogram title.
Definition: HistoDef.h:100
int m_bins
Number of bins.
Definition: HistoDef.h:106
double m_low
Low Edge.
Definition: HistoDef.h:102
std::ostream& Gaudi::operator<< ( std::ostream o,
const Gaudi::Histo1DDef histo 
)

Definition at line 84 of file HistoDef.cpp.

84 { return histo.fillStream( o ); }
std::ostream & fillStream(std::ostream &o) const
printout of the histogram definition
Definition: HistoDef.cpp:46
std::ostream& Gaudi::operator<< ( std::ostream out,
const Gaudi::Time time 
)
inline

Output operator.

Definition at line 167 of file Time.icpp.

168  {
169  return out << Gaudi::TimeSpan( time ).seconds() << '.' << time.nanoformat();
170  }
std::string nanoformat(size_t minwidth=1, size_t maxwidth=9) const
Format the nanosecond fractional part of the time as a string.
Definition: Time.cpp:303
ValueType seconds() const
Get the number of complete seconds in the span.
Definition: Time.icpp:110
Based on seal::TimeSpan.
Definition: Time.h:55
std::ostream& Gaudi::operator<< ( std::ostream out,
const Gaudi::TimeSpan time 
)
inline

Output operator.

Definition at line 173 of file Time.icpp.

174  {
175  return out << time.seconds() << '.' << Gaudi::Time( time ).nanoformat();
176  }
Based on seal::Time.
Definition: Time.h:237
std::string nanoformat(size_t minwidth=1, size_t maxwidth=9) const
Format the nanosecond fractional part of the time as a string.
Definition: Time.cpp:303
ValueType seconds() const
Get the number of complete seconds in the span.
Definition: Time.icpp:110
std::ostream& Gaudi::operator<< ( std::ostream o,
const Gaudi::StringKey key 
)
inline

printout of the object reply on the native printout for the string

Author
Vanya BELYAEV Iavn..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 243 of file StringKey.h.

243 { return o << key.str(); }
const std::string & str() const
the actual string
Definition: StringKey.h:47
bool Gaudi::operator== ( const Gaudi::Histo1DDef left,
const Gaudi::Histo1DDef right 
)

Definition at line 68 of file HistoDef.cpp.

69  {
70  return std::tie( left.m_title, left.m_low, left.m_high, left.m_bins ) ==
71  std::tie( right.m_title, right.m_low, right.m_high, right.m_bins );
72  }
T tie(T...args)
double m_high
High Edge.
Definition: HistoDef.h:104
std::string m_title
Histogram title.
Definition: HistoDef.h:100
int m_bins
Number of bins.
Definition: HistoDef.h:106
double m_low
Low Edge.
Definition: HistoDef.h:102
template<unsigned int N>
bool Gaudi::operator== ( const Gaudi::StringKey key1,
const char(&)  key2[N] 
)
inline

equality operator with C-arrays

Author
Vanya BELYAEV Iavn..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 150 of file StringKey.h.

151  {
152  return key1.str().size() == N && std::equal( key2, key2 + N, key1.str().begin() );
153  }
int N
Definition: IOTest.py:101
T size(T...args)
T begin(T...args)
T equal(T...args)
const std::string & str() const
the actual string
Definition: StringKey.h:47
bool Gaudi::operator== ( const std::string key1,
const Gaudi::StringKey key2 
)
inline

"right" form of equality operator

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 169 of file StringKey.h.

169 { return key2 == key1; }
template<unsigned int N>
bool Gaudi::operator== ( const char(&)  key1[N],
const Gaudi::StringKey key2 
)
inline

"right" form of equality operator

Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2009-10-07

Definition at line 176 of file StringKey.h.

177  {
178  return key2 == key1;
179  }
template<class T , class TP , class V , class H >
bool Gaudi::operator== ( const T &  v,
const Property< TP, V, H > &  p 
)

delegate (value == property) to property operator==

Definition at line 743 of file Property.h.

744  {
745  return p == v;
746  }
template<typename... lambda_ts>
auto Gaudi::overload ( lambda_ts &&...  lambdas)

Definition at line 64 of file compose.h.

65  {
66 #if __cplusplus > 201402L
67  return details::overloaded_t{std::forward<lambda_ts>( lambdas )...};
68 #else
69  return details::overloaded_t<std::decay_t<lambda_ts>...>{std::forward<lambda_ts>( lambdas )...};
70 #endif
71  }
GAUDI_API void Gaudi::popCurrentDataObject ( )

Definition at line 41 of file RootIOHandler.cpp.

42  {
44  resetLastLink();
45  }
GAUDI_API void popCurrentDataObject()
void resetLastLink()
std::pair<DataObject*, AIDA::IProfile1D*> Gaudi::profile1DX ( const std::string name,
const AIDA::IHistogram2D &  h,
int  firstbin,
int  lastbin 
)

Create 1D profile in X from 2D histogram.

std::pair<DataObject*, AIDA::IProfile1D*> Gaudi::profile1DY ( const std::string name,
const AIDA::IHistogram2D &  h,
int  firstbin,
int  lastbin 
)

Create 1D profile in Y from 2D histogram.

std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::project1DX ( const std::string name,
const AIDA::IHistogram2D &  h,
int  firstbin,
int  lastbin 
)

Create 1D projection in X from 2D histogram.

std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::project1DY ( const std::string name,
const AIDA::IHistogram2D &  h,
int  firstbin,
int  lastbin 
)

Create 1D projection in Y from 2D histogram.

GAUDI_API void Gaudi::pushCurrentDataObject ( DataObject **  pobjAddr)

Definition at line 36 of file RootIOHandler.cpp.

37  {
38  Gaudi::pushCurrentDataObject( pobjAddr );
39  resetLastLink();
40  }
GAUDI_API void pushCurrentDataObject(DataObject **pobjAddr)
void resetLastLink()
template<class CONTAINER >
NamedRange_<CONTAINER> Gaudi::range ( const CONTAINER &  cnt,
std::string  name 
)
inline

simple function to create the named range from arbitrary container

1 const CONTAINER& cnt = ... ;
2 auto r = range ( cnt , "some name") ;
Author
Vanya BELYAEV Ivan..nosp@m.Bely.nosp@m.aev@n.nosp@m.ikhe.nosp@m.f.nl
Date
2007-11-29

Definition at line 121 of file NamedRange.h.

122  {
123  return NamedRange_<CONTAINER>( cnt.begin(), cnt.end(), std::move( name ) );
124  }
T move(T...args)
template<class CONTAINER >
Range_<CONTAINER> Gaudi::range ( const CONTAINER &  cnt)
inline

simple function to create the range from the arbitrary container

1 const CONTAINER& cnt = ... ;
2 
3 Range_<CONTAINER> r = range ( cnt ) ;

The range could be created over ALL container types which supports at least the bidirectional iterators.

The minimum requirements from the container type:

  • support the concept of "CONTAINER::value_type"
  • support the concept of "CONTAINER::const_iterator"
  • support the concept of "CONTAINER::const_reference"
  • support the concept of "CONTAINER::const_reverse_iterator"
  • the iterator should be ok for "std::distance" and "std::advance"
  • support for "const_iterator CONTAINER::begin () const"
  • support for "const_iterator CONTAINER::end () const"
  • support for "const_reverse_iterator CONTAINER::rbegin () const"
  • support for "const_reverse_iterator CONTAINER::rend () const"
Author
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yre.e.nosp@m.du
Date
2007-11-29

Definition at line 307 of file Range.h.

308  {
309  return Range_<CONTAINER>( cnt.begin(), cnt.end() );
310  }
StatusCode Gaudi::setAppReturnCode ( SmartIF< IProperty > &  appmgr,
int  value,
bool  force = false 
)
inline

Set the application return code.

By default the return code of the application is modified only if the original value was 0 (i.e. no error). In this way we keep the first cause of error.

Parameters
appmgrIProperty interface of the ApplicationMgr
valuevalue to assign to the return code
forceif set to true, the return code is set even if it was already set
Returns
SUCCESS if it was possible to set the return code or the return code was already set

Definition at line 51 of file AppReturnCode.h.

52  {
53  if ( appmgr ) {
54  Gaudi::Property<int> returnCode( "ReturnCode", 0 );
55  if ( appmgr->getProperty( &returnCode ).isSuccess() ) {
56  if ( returnCode.value() == 0 || force ) {
57  returnCode.setValue( value );
58  return appmgr->setProperty( returnCode );
59  }
60  // Consider is a success if we do already have an error code.
61  return StatusCode::SUCCESS;
62  }
63  }
64  return StatusCode::FAILURE;
65  }
constexpr static const auto FAILURE
Definition: StatusCode.h:88
Implementation of property with value of concrete type.
Definition: Property.h:381
bool isSuccess() const
Definition: StatusCode.h:287
virtual StatusCode getProperty(Gaudi::Details::PropertyBase *p) const =0
Get the property by property.
virtual StatusCode setProperty(const Gaudi::Details::PropertyBase &p)=0
Set the property by property.
constexpr static const auto SUCCESS
Definition: StatusCode.h:87
GAUDI_API ISvcLocator* Gaudi::setInstance ( ISvcLocator newInstance)

Set new instance of service locator.

Parameters
newInstanceCurrent instance of service locator.
Returns
Previous instance of service locator object.
GAUDI_API IAppMgrUI* Gaudi::setInstance ( IAppMgrUI newInstance)

Set new instance of service locator.

Parameters
newInstanceCurrent instance of service locator.
Returns
Previous instance of service locator object.
GAUDI_API void Gaudi::Sleep ( int  sec)

Simple sleep function.

Author
Marco Clemencic

Definition at line 8 of file Sleep.cpp.

std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::slice1DX ( const std::string name,
const AIDA::IHistogram2D &  h,
int  firstbin,
int  lastbin 
)

Create 1D slice from 2D histogram.

std::pair<DataObject*, AIDA::IHistogram1D*> Gaudi::slice1DY ( const std::string name,
const AIDA::IHistogram2D &  h,
int  firstbin,
int  lastbin 
)

Create 1D slice from 2D histogram.

GAUDI_API ISvcLocator* Gaudi::svcLocator ( )