| # Gaudi Framework, version v20r3
Generated: 24 Nov 2008

# Gaudi Namespace Reference

## Detailed Description

General Gaudi namespace.

General Gaudi namepace.

< AIDA

Author:
  Juan PALACIOS

Date:
  2005-11-21

Author:
  Juan PALACIOS

Date:
  2005-11-23

## Classes
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 | HistogramBase
| Common base class for all histograms Use is solely functional to minimize dynamic_casts inside HistogramSvc. More...
class | TimeSpan
| Based on seal::TimeSpan. More...
class | Time
| Based on seal::Time. More...
class | BootSvcLocator
| A dual-stage boostrap mechanism is used to ensure an orderly startup of the ApplicationMgr. More...
class | Axis
| An IAxis represents a binned histogram axis. More...
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 | 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 2 D histograms using ROOT THD2. More...
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 | IFileCatalog
| File catalog interface. More...
class | IFileCatalogMgr
| File catalog manager. More...
class | IDataConnection
| ABC describing basic data connection. More...
class | IIODataManager
| M.Frank More...
class | NamedRange_
struct | RangeBase_
| helper class to simplify the dealing with ranges in Python More...
class | Range_
| Useful class for representation of "sequence" of the objects through the range of valid iterators. More...
class | IODataManager
class | MultiFileCatalog
| This class constitutes the core of the XML based FileCatalog API for using POOL within Gaudi. More...
class | XMLFileCatalog
| This class constitutes the core of the XML based FileCatalog API for POOL. More...
## Namespaces
namespace | details
namespace | 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.

namespace | Histos
| collection of simple utilities to deal with histograms

namespace | Parsers
namespace | StateMachine
namespace | Units
namespace | Utils
## Functions
IAppMgrUI * | createApplicationMgrEx (const std::string &dllname, const std::string &factname)
IAppMgrUI * | createApplicationMgr (const std::string &dllname, const std::string &factname)
IAppMgrUI * | createApplicationMgr (const std::string &dllname)
IAppMgrUI * | createApplicationMgr ()
IInterface * | createInstance (const std::string &name, const std::string &factname, const std::string &ddlname)
ISvcLocator * | svcLocator ()
ISvcLocator * | setInstance (ISvcLocator *newInstance)
| Set new instance of service locator.
IAppMgrUI * | setInstance (IAppMgrUI *newInstance)
| Set new instance of service locator.
void | pushCurrentDataObject (DataObject **pobjAddr)
void | popCurrentDataObject ()
DataObject * | getCurrentDataObject ()
void | Sleep (int sec)
| Simple sleep function.
void | NanoSleep (long long nsec)
| Small variation on the sleep function for nanoseconds sleep.
template<class Q, class T>
T * | getRepresentation (const Q &hist)
std::pair< DataObject *, AIDA::IHistogram1D * > | createH1D (const AIDA::IHistogram1D &hist)
| Copy constructor.
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.
std::pair< DataObject *, AIDA::IHistogram1D * > | createH1D (const std::string &title, const Edges &e)
| Creator for 1D histogram with variable bins.
std::pair< DataObject *, AIDA::IHistogram2D * > | createH2D (const AIDA::IHistogram2D &hist)
| Copy constructor.
std::pair< DataObject *, AIDA::IHistogram2D * > | createH2D (TH2D *rep)
| "Adopt" constructor
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.
std::pair< DataObject *, AIDA::IHistogram2D * > | createH2D (const std::string &title, const Edges &eX, const Edges &eY)
| Creator for 2 D histograms with variable bins.
std::pair< DataObject *, AIDA::IHistogram1D * > | slice1DX (const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
| Create 1D slice from 2D histogram.
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.
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.
std::pair< DataObject *, AIDA::IHistogram1D * > | slice1DY (const std::string &name, const AIDA::IHistogram2D &h, int firstbin, int lastbin)
| Create 1D slice from 2D histogram.
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.
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.
std::pair< DataObject *, AIDA::IHistogram3D * > | createH3D (const AIDA::IHistogram3D &hist)
| Copy constructor.
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.
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.
std::pair< DataObject *, AIDA::IProfile1D * > | createProf1D (const AIDA::IProfile1D &hist)
| Copy constructor.
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.
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.
std::pair< DataObject *, AIDA::IProfile2D * > | createProf2D (const AIDA::IProfile2D &hist)
| Copy constructor.
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.
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.
std::pair< DataObject *, IHistogram2D * > | createH2D (const IHistogram2D &hist)
std::pair< DataObject *, IHistogram1D * > | slice1DX (const std::string &nam, const IHistogram2D &hist, int first, int last)
std::pair< DataObject *, IHistogram1D * > | slice1DY (const std::string &nam, const IHistogram2D &hist, int first, int last)
std::pair< DataObject *, IHistogram1D * > | project1DY (const std::string &nam, const IHistogram2D &hist, int first, int last)
std::pair< DataObject *, IProfile1D * > | profile1DX (const std::string &nam, const IHistogram2D &hist, int first, int last)
std::pair< DataObject *, IProfile1D * > | profile1DY (const std::string &nam, const IHistogram2D &hist, int first, int last)
static const InterfaceID | IID_IIODataManager ("IIODataManager", 1, 0)
template<class CONTAINER>
NamedRange_< CONTAINER > | range (const CONTAINER &cnt, const std::string &name)
| simple function to create the named range form arbitrary container
template<class CONTAINER>
Range_< CONTAINER > | range (const CONTAINER &cnt)
| simple function to create the range from the arbitrary container
std::string | createGuidAsString ()
| Create file identifier using UUID mechanism.

## Function Documentation

IAppMgrUI* Gaudi::createApplicationMgr | ( |  | ) |

IAppMgrUI* Gaudi::createApplicationMgr | ( | const std::string & | dllname | ) |

IAppMgrUI* Gaudi::createApplicationMgr | ( | const std::string & | dllname,
|  | const std::string & | factname |
| ) |  |  |

IAppMgrUI* Gaudi::createApplicationMgrEx | ( | const std::string & | dllname,
|  | const std::string & | factname |
| ) |  |  |

std::string Gaudi::createGuidAsString | ( |  | ) |

Create file identifier using UUID mechanism.

Definition at line 188 of file XMLFileCatalog.cpp.

    00188                                      {
    00189   char text[64];
    00190   uuid_t uuid;
    00191   ::uuid_generate_time(uuid);
    00192   struct Guid {
    00193     unsigned int   Data1;
    00194     unsigned short Data2;
    00195     unsigned short Data3;
    00196     unsigned char  Data4[8];
    00197   } *g = (Guid*)&uuid;
    00198   ::sprintf(text, "%08X-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX",
    00199             g->Data1, g->Data2, g->Data3,
    00200             g->Data4[0], g->Data4[1], g->Data4[2], g->Data4[3],
    00201             g->Data4[4], g->Data4[5], g->Data4[6], g->Data4[7]);
    00202   return text;
    00203 }

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::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 AIDA::IHistogram1D & | hist | ) |

Copy constructor.

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

Definition at line 26 of file H2D.cpp.

    00026                                                                              {
    00027   TH2D *h = getRepresentation<AIDA::IHistogram2D,TH2D>(hist);
    00028   Histogram2D *n = h ? new Histogram2D(new TH2D(*h)) : 0;
    00029   return std::pair<DataObject*,IHistogram2D*>(n,n);
    00030 }

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::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 | ( | TH2D * | rep | ) |

"Adopt" constructor

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

Copy constructor.

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.

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 AIDA::IHistogram3D & | hist | ) |

Copy constructor.

IInterface* Gaudi::createInstance | ( | const std::string & | name,
|  | const std::string & | factname,
|  | const std::string & | ddlname |
| ) |  |  |

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::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 AIDA::IProfile1D & | hist | ) |

Copy constructor.

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.

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 AIDA::IProfile2D & | hist | ) |

Copy constructor.

DataObject* Gaudi::getCurrentDataObject | ( |  | ) |

template<class Q, class T>

T* Gaudi::getRepresentation | ( | const Q & | hist | ) | `[inline]`

Definition at line 21 of file GaudiPI.h.

    00021                                                                    {
    00022     T* result = 0;
    00023     const HistogramBase *p = dynamic_cast<const HistogramBase*>(&hist);
    00024     if ( p )  {
    00025       result = dynamic_cast<T*>(p->representation());
    00026     }
    00027     return result;
    00028   }

static const InterfaceID Gaudi::IID_IIODataManager | ( | "IIODataManager" | ,
|  | 1 | ,
|  | 0 |  |
| ) |  |  | `[static]`

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

Small variation on the sleep function for nanoseconds sleep.

Small variation on the sleep function for nanosecons sleep.

Author:
  Marco Clemencic

  Marco Clemencic

void Gaudi::popCurrentDataObject | ( |  | ) |

Definition at line 60 of file PoolDbIOHandler.cpp.

    00060                             {
    00061   Gaudi::popCurrentDataObject();
    00062   resetLastLink();
    00063 }

std::pair<DataObject*,IProfile1D*> Gaudi::profile1DX | ( | const std::string & | nam,
|  | const IHistogram2D & | hist,
|  | int | first,
|  | int | last |
| ) |  |  |

Definition at line 60 of file H2D.cpp.

    00060                                                                                    {
    00061   TH2 *r = Gaudi::getRepresentation<IHistogram2D,TH2>(hist);
    00062   TProfile *t = r ? r->ProfileX("_pfx",first,last,"e") : 0;
    00063   if ( t ) t->SetName(nam.c_str());
    00064   Profile1D* p = t ? new Profile1D(t) : 0;
    00065   return std::pair<DataObject*,IProfile1D*>(p,p);
    00066 }

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*,IProfile1D*> Gaudi::profile1DY | ( | const std::string & | nam,
|  | const IHistogram2D & | hist,
|  | int | first,
|  | int | last |
| ) |  |  |

Definition at line 69 of file H2D.cpp.

    00069                                                                                     {
    00070   TH2 *r = getRepresentation<IHistogram2D,TH2>(hist);
    00071   TProfile *t = r ? r->ProfileY("_pfx",first,last,"e") : 0;
    00072   if ( t ) t->SetName(nam.c_str());
    00073   Profile1D* p = t ? new Profile1D(t) : 0;
    00074   return std::pair<DataObject*,IProfile1D*>(p,p);
    00075 }

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*,IHistogram1D*> Gaudi::project1DY | ( | const std::string & | nam,
|  | const IHistogram2D & | hist,
|  | int | first,
|  | int | last |
| ) |  |  |

Definition at line 51 of file H2D.cpp.

    00051                                                                                   {
    00052   TH2 *r = getRepresentation<IHistogram2D,TH2>(hist);
    00053   TH1D *t = r ? r->ProjectionY("_px",first,last,"e") : 0;
    00054   if ( t ) t->SetName(nam.c_str());
    00055   Histogram1D* p = t ? new Histogram1D(t) : 0;
    00056   return std::pair<DataObject*,IHistogram1D*>(p,p);
    00057 }

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.

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

Definition at line 55 of file PoolDbIOHandler.cpp.

    00055                                                   {
    00056   Gaudi::pushCurrentDataObject(pobjAddr);
    00057   resetLastLink();
    00058 }

template<class CONTAINER>

Range_<CONTAINER> Gaudi::range | ( | const CONTAINER & | cnt | ) | `[inline]`

simple function to create the range from the arbitrary container

        const CONTAINER& cnt = ... ;

        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 ibelyaev@physics.syre.edu

Date:
  2007-11-29

Definition at line 284 of file Range.h.

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

template<class CONTAINER>

NamedRange_<CONTAINER> Gaudi::range | ( | const CONTAINER & | cnt,
|  | const std::string & | name |
| ) |  |  | `[inline]`

simple function to create the named range form arbitrary container

        const CONTAINER& cnt = ... ;

        NamedRange_<CONTAINER> r = range ( cnt , "some name") ;

Author:
  Vanya BELYAEV Ivan.Belyaev@nikhef.nl

Date:
  2007-11-29

Definition at line 133 of file NamedRange.h.

    00135   { return NamedRange_<CONTAINER>( cnt.begin() , cnt.end() , name ) ; }

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.

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.

void Gaudi::Sleep | ( | int | sec | ) |

Simple sleep function.

Simple sleep function taken from COOL.

Author:
  Marco Clemencic

  Marco Clemencic

std::pair<DataObject*,IHistogram1D*> Gaudi::slice1DX | ( | const std::string & | nam,
|  | const IHistogram2D & | hist,
|  | int | first,
|  | int | last |
| ) |  |  |

Definition at line 33 of file H2D.cpp.

    00033                                                                                   {
    00034   TH2 *r = getRepresentation<IHistogram2D,TH2>(hist);
    00035   TH1D *t = r ? r->ProjectionX("_px",first,last,"e") : 0;
    00036   if ( t ) t->SetName(nam.c_str());
    00037   Histogram1D* p = t ? new Histogram1D(t) : 0;
    00038   return std::pair<DataObject*,IHistogram1D*>(p,p);
    00039 }

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*,IHistogram1D*> Gaudi::slice1DY | ( | const std::string & | nam,
|  | const IHistogram2D & | hist,
|  | int | first,
|  | int | last |
| ) |  |  |

Definition at line 42 of file H2D.cpp.

    00042                                                                                   {
    00043   TH2  *r = getRepresentation<IHistogram2D,TH2>(hist);
    00044   TH1D *t = r ? r->ProjectionY("_py",first,last,"e") : 0;
    00045   if ( t ) t->SetName(nam.c_str());
    00046   Histogram1D* p = t ? new Histogram1D(t) : 0;
    00047   return std::pair<DataObject*,IHistogram1D*>(p,p);
    00048 }

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.

ISvcLocator* Gaudi::svcLocator | ( |  | ) |