| The Gaudi Framework v28r2p1 (f1a77ff4)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Namespaces | Classes | Functions
Gaudi Namespace Reference

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

## Namespaces
| CommonGaudiConfigurables
| Concurrency
| Configuration
| CounterSummary
| 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
| Math
| meta
| Parsers
| PluginService
| ReturnCode
| ApplicationMgr return code definitions.
| StateMachine
| Units
| Utils

## Classes
class | _ConfigurablesModule
| Small class that allows to access all the configurables as attributes of the instance. More...
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< DataObjectHandleBase & >
class | Property< DataObjID & >
class | Property< DataObjIDColl & >
class | Property< DataObjIDColl >
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...
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...
GAUDI_API void | pushCurrentDataObject (DataObject **pobjAddr)
GAUDI_API void | popCurrentDataObject ()
GAUDI_API DataObject * | getCurrentDataObject ()
GAUDI_API std::ostream & | operator<< (std::ostream &o, const Gaudi::Histo1DDef &histo)
| the streamer operator for class Gaudi::Histo1DDef More...
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 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(std::declval< TP >()+std::declval< T >()) | 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<class PREDICATE , class CONTAINER >
Gaudi::Range_< typename Gaudi::details::container< CONTAINER >::Container, boost::filter_iterator< PREDICATE, typename Gaudi::details::container< CONTAINER >::Iterator > > | make_filter_range (PREDICATE p, const CONTAINER &c)
| create a filtering range with predicate More...
template<class FUNCTOR , class CONTAINER >
Gaudi::Range_< typename Gaudi::details::container< CONTAINER >::Container, boost::transform_iterator< FUNCTOR, typename Gaudi::details::container< CONTAINER >::Iterator > > | make_transform_range (FUNCTOR f, const CONTAINER &c)
| create "transform" range with functors More...
template<class MASK , class CONTAINER >
Gaudi::Range_< typename Gaudi::details::container< CONTAINER >::Container, Gaudi::details::masked_iterator< typename Gaudi::details::container< CONTAINER >::Iterator, MASK > > | make_mask_range (MASK m, const CONTAINER &c)
| create "masking" range with mask More...
template<class INDICES , class CONTAINER >
Gaudi::Range_< typename Gaudi::details::container< CONTAINER >::Container, Gaudi::details::index_iterator< typename Gaudi::details::container< CONTAINER >::Iterator, INDICES > > | make_index_range (INDICES m, const CONTAINER &c)
| create "index" range with indices 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...
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

General Gaudi namespace.

Author
  Marco Clemencic
  Juan PALACIOS

Date
  2005-11-21

Author
  Juan PALACIOS

Date
  2005-11-23

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<typename TARGET >

TARGET* Gaudi::Cast | ( | IInterface * | i | ) |

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

Definition at line 301 of file IInterface.h.

301 {
302 return reinterpret_cast<TARGET*>(i->i_cast(TARGET::interfaceID()));
303 }
IInterface::i_cast
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 307 of file IInterface.h.

307 {
308 return reinterpret_cast<const TARGET*>(i->i_cast(TARGET::interfaceID()));
309 }
IInterface::i_cast
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 240 of file Bootstrap.cpp.

240 { return Gaudi::createApplicationMgr(); }
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 }
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
IProperty::getProperty
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 177 of file IInterface.h.

177 {
178 return { Is::name()... };
179 }
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:28
template<class Q , class T >

T* Gaudi::getRepresentation | ( | const Q & | hist | ) |

Definition at line 7 of file HistogramUtility.h.

7 {
8 auto p = dynamic_cast<const HistogramBase*>(&hist);
9 return p ? dynamic_cast<T*>(p->representation()) : nullptr;
10 }

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 216 of file StringKey.h.

217 { return key.__hash__ () ; }
Gaudi::StringKey::__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 182 of file IInterface.h.

182 {
183 constexpr auto iid_cast_ = iid_cast_details::iid_cast_t<Is...>{};
184 return iid_cast_(tid,ptr);
185 }
template<class PREDICATE , class CONTAINER >

Gaudi::Range_<typename Gaudi::details::container<CONTAINER>::Container, boost::filter_iterator<PREDICATE,typename Gaudi::details::container<CONTAINER>::Iterator> > Gaudi::make_filter_range | ( | PREDICATE | p,
|  | const CONTAINER & | c
| ) |  |
| inline

create a filtering range with predicate

1 // data container
2 const std::vector<int> data = { 0,1,2,3,4,5,6,7,8,9,10 } ;
3 // filter good elements
4 auto good = Gaudi::make_filter_range ( [] (int i)->bool{ return x%2 } , data ) ;
5 std::cout << "FILTER x%2 " ;
6 std::copy ( good.begin(), good.end(), std::ostream_iterator<int>( std::cout ," " ) );
7 std::cout << "\n" << std::endl;

Filter ranges can be composed with other "smart" ranges.

Attention
  Due to strange "feature" (gcc bug?) in the composition chain only one predicate in form of lambda-expression (or std::function from lambda expression) is alllowed. Number of simple/plain predicates in the composition chain can be arbitrary.

See also
  Gaudi::Range_

The result of `Gaudi::make_filter_range` does not contains the filtered elements and the function does not perform the looping over input container. The output contains only the recipe forfiltering during the subsequent looping. Actual filtering occurs during the traversal of the output range.

Author
  Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Date
  2016-09-20

Definition at line 209 of file SmartRanges.h.

210 {
211 typedef boost::filter_iterator<PREDICATE,typename Gaudi::details::container<CONTAINER>::Iterator> ITER ;
212 return { ITER( p , c.begin() ) , ITER ( p , c.end () ) } ;
213 }
gaudirun.c
c
Definition: gaudirun.py:391
Iterator
boost::spirit::classic::position_iterator2< ForwardIterator > Iterator
Definition: Iterator.h:18
template<class INDICES , class CONTAINER >

Gaudi::Range_<typename Gaudi::details::container<CONTAINER>::Container, Gaudi::details::index_iterator<typename Gaudi::details::container<CONTAINER>::Iterator,INDICES> > Gaudi::make_index_range | ( | INDICES | m,
|  | const CONTAINER & | c
| ) |  |
| inline

create "index" range with indices

1 const std::vector<unsigned int> good_indices = { 3,3,3,4,5} ;
2 std::vector<int> data = { 1,2,3,4,5,6,7,8 } ;
3 auto good = Gaudi::make_index_range ( good_indices , data ) ;
4 std::cout << "INDICES(3,3,3,4,5): " ;
5 std::copy ( good.begin(), good.end(), std::ostream_iterator<int>( std::cout ," " ) );
6 std::cout << "\n" << std::endl;

- the repetitive elements also can appear in the index range
- the invalid out-of-range indices are skept
- if input container does not provide random access iterators, the iteration could be relatively slow

Indexed ranges can be composed with other "smart" ranges (but only the cases where indexed-range is the first in the composition chain are well-defined)

See also
  Gaudi::Range_

The result of `Gaudi::make_mask_range` does not contains the filtered elements and the function does not perform the looping over input container. The output contains only the recipe for filtering during the subsequent looping. Actual filtering occurs during the traversal of the output range.

Author
  Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Date
  2016-09-20

Definition at line 320 of file SmartRanges.h.

321 {
322 static_assert( std::is_convertible<typename INDICES::value_type,std::size_t>::value ,"index type is not convertible") ;
323 static_assert( std::numeric_limits<typename INDICES::value_type>::is_specialized ,"index type is not specialized") ;
324 static_assert( !std::numeric_limits<typename INDICES::value_type>::is_signed ,"index type must be unsigned" ) ;
325 typedef Gaudi::details::index_iterator<typename Gaudi::details::container<CONTAINER>::Iterator,INDICES> ITER ;
326 return { ITER ( std::move(m) , c.begin() , c.end() ) , ITER () } ;
327 }
gaudirun.c
c
Definition: gaudirun.py:391
std::is_convertible
Gaudi::details::index_iterator
"index" iterator iterates ober "indiced" intries in the cotainer/range
Definition: SmartRanges.h:108
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:93
std::move
T move(T...args)
std::numeric_limits
template<class MASK , class CONTAINER >

Gaudi::Range_<typename Gaudi::details::container<CONTAINER>::Container, Gaudi::details::masked_iterator<typename Gaudi::details::container<CONTAINER>::Iterator,MASK> > Gaudi::make_mask_range | ( | MASK | m,
|  | const CONTAINER & | c
| ) |  |
| inline

create "masking" range with mask

1 using mask_t = boost::dynamic_bitset<unsigned_long> ;
2 mask_t mask (100) ;
3 mask.set(2,true)
4 mask.set(3,true)
5 std::vector<int> vct = { 1,2,3,4,5,6,7,8 } ;
6 auto good = Gaudi::make_mask_range ( mask , vct ) ;
7 std::cout << "MASK(2,3): " ;
8 std::copy ( good.begin(), good.end(), std::ostream_iterator<int>( std::cout ," " ) );
9 std::cout << "\n" << std::endl;

Mask ranges can be composed with other "smart" ranges (but only the cases where mask-range is the first in the composition chain are well-defined)

See also
  Gaudi::Range_

The result of `Gaudi::make_mask_range` does not contains the filtered elements and the function does not perform the looping over input container. The output contains only the recipe for filtering during the subsequent looping. Actual filtering occurs during the traversal of the output range.

Author
  Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Date
  2016-09-20

Definition at line 282 of file SmartRanges.h.

283 {
284 typedef Gaudi::details::masked_iterator<typename Gaudi::details::container<CONTAINER>::Iterator,MASK> ITER ;
285 if ( m.size() > c.size() ) { m.resize( c.size() ) ; }
286 return { ITER ( std::move(m) , c.begin() ) , ITER () } ;
287 }
gaudirun.c
c
Definition: gaudirun.py:391
Gaudi::Units::m
constexpr double m
Definition: SystemOfUnits.h:93
Gaudi::details::masked_iterator
"masked" iterator iterates ober "masked" intries in the cotainner/range
Definition: SmartRanges.h:45
std::move
T move(T...args)
template<class FUNCTOR , class CONTAINER >

Gaudi::Range_<typename Gaudi::details::container<CONTAINER>::Container, boost::transform_iterator<FUNCTOR,typename Gaudi::details::container<CONTAINER>::Iterator> > Gaudi::make_transform_range | ( | FUNCTOR | f,
|  | const CONTAINER & | c
| ) |  |
| inline

create "transform" range with functors

1 std::vector<int> data = { 1,2,3,4,5,6,7,8 } ;
2 auto good = Gaudi::make_transform_range ( [](int i)->double{ return 0.1*x } , data ) ;
3 std::cout << "TRANSFORM x/10: " ;
4 std::copy ( good.begin(), good.end(), std::ostream_iterator<int>( std::cout ," " ) );
5 std::cout << "\n" << std::endl;

Transform ranges can be composed with other "smart" ranges.

See also
  Gaudi::Range_

1 // container of tracks
2 CONTAINER tracks = ... ;
3 // get "container" of transverse momenta
4 auto pt = make_transform_range ( []( const Track* t ) -> double { return t->pt() ; } , tracks ) ;
5 for ( auto v : pt ) { histrogram.fill ( v ) ; }

The result of `Gaudi::make_transform_range` does not contains the transformed elements and the function does not perform the looping over input container. The output contains only the recipe for transforming during the subsequent looping. Actual transformation occurs during the traversal of the output range.

Author
  Vanya Belyaev Ivan..nosp@m.Bely.nosp@m.aev@i.nosp@m.tep..nosp@m.ru

Date
  2016-09-20

Definition at line 247 of file SmartRanges.h.

248 {
249 typedef boost::transform_iterator<FUNCTOR,typename Gaudi::details::container<CONTAINER>::Iterator> ITER ;
250 return { ITER ( c.begin() , f ) , ITER ( c.end () , f ) } ;
251 }
gaudirun.c
c
Definition: gaudirun.py:391
Iterator
boost::spirit::classic::position_iterator2< ForwardIterator > Iterator
Definition: Iterator.h:18

GAUDI_API void Gaudi::NanoSleep | ( | long long | nsec | ) |

Small variation on the sleep function for nanoseconds sleep.

Author
  Marco Clemencic

Definition at line 11 of file Sleep.cpp.

11 {
12 std::this_thread::sleep_for(std::chrono::nanoseconds(nsec));
13 }
std::chrono::nanoseconds
std::this_thread::sleep_for
T sleep_for(T...args)
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 165 of file StringKey.h.

167 { return ! ( key1 == key2 ) ; }

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 193 of file StringKey.h.

195 { 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 203 of file StringKey.h.

204 { return key2 != key1 ; }
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 645 of file Property.h.

646 {
647 return p != v;
648 }
template<class T , class TP , class V , class H >

decltype( std::declval<TP>() + std::declval<T>() ) Gaudi::operator+ | ( | const T & | v,
|  | const Property< TP, V, H > & | p
| ) |  |

implemantation of (value + property)

Definition at line 652 of file Property.h.

653 {
654 return v + p.value();
655 }

GAUDI_API std::ostream& Gaudi::operator<< | ( | std::ostream & | o,
|  | const Gaudi::Histo1DDef & | histo
| ) |  |

the streamer operator for class Gaudi::Histo1DDef

Definition at line 109 of file HistoDef.cpp.

110 { return histo.fillStream ( o ) ; }
Gaudi::Histo1DDef::fillStream
std::ostream & fillStream(std::ostream &o) const
printout of the histogram definition
Definition: HistoDef.cpp:58

std::ostream& Gaudi::operator<< | ( | std::ostream & | out,
|  | const Gaudi::Time & | time
| ) |  |
| inline

Output operator.

Definition at line 185 of file Time.icpp.

185 {
186 return out << Gaudi::TimeSpan(time).seconds() << '.' << time.nanoformat();
187 }
Gaudi::TimeSpan::seconds
ValueType seconds(void) const
Get the number of complete seconds in the span.
Definition: Time.icpp:123
Gaudi::Time::nanoformat
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:322
Gaudi::TimeSpan
Based on seal::TimeSpan.
Definition: Time.h:56

std::ostream& Gaudi::operator<< | ( | std::ostream & | out,
|  | const Gaudi::TimeSpan & | time
| ) |  |
| inline

Output operator.

Definition at line 190 of file Time.icpp.

190 {
191 return out << time.seconds() << '.' << Gaudi::Time(time).nanoformat();
192 }
Gaudi::TimeSpan::seconds
ValueType seconds(void) const
Get the number of complete seconds in the span.
Definition: Time.icpp:123
Gaudi::Time
Based on seal::Time.
Definition: Time.h:213
Gaudi::Time::nanoformat
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:322

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 264 of file StringKey.h.

265 { return o << key.str() ; }
Gaudi::StringKey::str
const std::string & str() const
the actual string
Definition: StringKey.h:47
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 151 of file StringKey.h.

153 {
154 return
155 key1.str().size() == N &&
156 std::equal ( key2 , key2 + N , key1.str().begin() ) ;
157 }
IOTest.N
int N
Definition: IOTest.py:90
std::string::size
T size(T...args)
std::string::begin
T begin(T...args)
std::equal
T equal(T...args)
Gaudi::StringKey::str
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 174 of file StringKey.h.

176 { 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 184 of file StringKey.h.

186 { return key2 == key1 ; }
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 638 of file Property.h.

639 {
640 return p == v;
641 }

GAUDI_API void Gaudi::popCurrentDataObject | ( |  | ) |

Definition at line 38 of file RootIOHandler.cpp.

38 {
39 Gaudi::popCurrentDataObject();
40 resetLastLink();
41 }
Gaudi::popCurrentDataObject
GAUDI_API void popCurrentDataObject()
Definition: RootIOHandler.cpp:38
GaudiRoot::resetLastLink
void resetLastLink()
Definition: RootIOHandler.cpp:30

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 34 of file RootIOHandler.cpp.

34 {
35 Gaudi::pushCurrentDataObject(pobjAddr);
36 resetLastLink();
37 }
Gaudi::pushCurrentDataObject
GAUDI_API void pushCurrentDataObject(DataObject **pobjAddr)
Definition: RootIOHandler.cpp:34
GaudiRoot::resetLastLink
void resetLastLink()
Definition: RootIOHandler.cpp:30
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 129 of file NamedRange.h.

131 { return NamedRange_<CONTAINER>( cnt.begin() , cnt.end() , std::move(name) ) ; }
std::move
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 312 of file Range.h.

313 { return Range_<CONTAINER>( cnt.begin() , cnt.end() ) ; }

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

  appmgr | IProperty interface of the ApplicationMgr
  value | value to assign to the return code
  force | if 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 }
StatusCode::SUCCESS
Definition: StatusCode.h:30
StatusCode::FAILURE
Definition: StatusCode.h:29
Gaudi::Property
Implementation of property with value of concrete type.
Definition: Property.h:314
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:74
IProperty::getProperty
virtual StatusCode getProperty(Gaudi::Details::PropertyBase *p) const =0
Get the property by property.
IProperty::setProperty
virtual StatusCode setProperty(const Gaudi::Details::PropertyBase &p)=0
Set the property by property.

GAUDI_API ISvcLocator* Gaudi::setInstance | ( | ISvcLocator * | newInstance | ) |

Set new instance of service locator.

Parameters

  newInstance | Current 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

  newInstance | Current 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 7 of file Sleep.cpp.

7 {
8 std::this_thread::sleep_for(std::chrono::seconds(sec));
9 }
std::chrono::seconds
std::this_thread::sleep_for
T sleep_for(T...args)

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 | ( |  | ) |