| # Gaudi Framework, version v20r2
Generated: 18 Jul 2008

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

- Search for |

- Namespace List
- Namespace Members

# Gaudi Namespace Reference

## Detailed Description

General Gaudi namespace.

Author:
  Juan PALACIOS

Date:
  2005-11-21

## Classes
class | IODataManager
## Namespaces
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 | Sleep (int sec)
| Simple sleep function.
void | NanoSleep (long long nsec)
| Small variation on the sleep function for nanoseconds sleep.
IAppMgrUI * | createApplicationMgr (const std::string &dllname, const std::string &factname)
IAppMgrUI * | createApplicationMgrEx (const std::string &dllname, const std::string &factname)
ISvcLocator * | svcLocator ()
ISvcLocator * | setInstance (ISvcLocator *newInstance)
| Set new instance of service locator.
IAppMgrUI * | setInstance (IAppMgrUI *newInstance)
| Set new instance of service locator.
IInterface * | createInstance (const std::string &name, const std::string &factname, const std::string &dllname)
IAppMgrUI * | createApplicationMgr (const std::string &dllname)
IAppMgrUI * | createApplicationMgr ()
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)
| Creator of 1D profile with fixed bins.
std::pair< DataObject *, AIDA::IProfile1D * > | createProf1D (const std::string &title, const Edges &e, double ylow, double yup)
| 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 *, AIDA::IHistogram1D * > | createH1D (const std::string &title, int nBins, double xlow, double xup)
| 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::IHistogram1D * > | createH1D (const AIDA::IHistogram1D &hist)
| Copy constructor.
std::pair< DataObject *, 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 *, IHistogram2D * > | createH2D (const std::string &title, const Edges &eX, const Edges &eY)
| Creator for 2 D histograms with variable bins.
std::pair< DataObject *, IHistogram2D * > | createH2D (TH2D *rep)
| "Adopt" constructor
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)
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::IHistogram3D * > | createH3D (const AIDA::IHistogram3D &hist)
| Copy constructor.
std::pair< DataObject *, AIDA::IProfile1D * > | createProf1D (const std::string &title, int nBins, double xlow, double xup, double ylow, double yup)
| Creator of 1D profile with fixed bins.
std::pair< DataObject *, AIDA::IProfile1D * > | createProf1D (const std::string &title, const Edges &e, double ylow, double yup)
| Creator of 1D profile with variable bins.
std::pair< DataObject *, AIDA::IProfile1D * > | createProf1D (const AIDA::IProfile1D &hist)
| Copy constructor.
std::pair< DataObject *, AIDA::IProfile2D * > | createProf2D (const std::string &title, const Edges &eX, const Edges &eY, double, double)
| Creator for 2 D profile with variable bins.
std::pair< DataObject *, AIDA::IProfile2D * > | createProf2D (const std::string &title, int binsX, double xlow, double xup, int binsY, double ylow, double yup, double zlow, double zup)
| Creator for 2 D profile with fixed bins.
std::pair< DataObject *, AIDA::IProfile2D * > | createProf2D (const AIDA::IProfile2D &hist)
| Copy constructor.
std::string | createGuidAsString ()
| Create file identifier using UUID mechanism.
std::string | createGuidAsString ()
| Create file identifier using UUID mechanism.

## Function Documentation

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

Definition at line 247 of file Bootstrap.cpp.

References createApplicationMgr().

    00247                                           {
    00248 //------------------------------------------------------------------------------
    00249   return createApplicationMgr("GaudiSvc", "ApplicationMgr");
    00250 }

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

Definition at line 241 of file Bootstrap.cpp.

References createApplicationMgr().

    00241                                                                    {
    00242 //------------------------------------------------------------------------------
    00243   return createApplicationMgr(dllname, "ApplicationMgr");
    00244 }

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

Definition at line 67 of file Bootstrap.cpp.

References createApplicationMgrEx(), IID_ISvcLocator, IInterface::queryInterface(), s_appmgrInstance, and s_svclocInstance.

    00070 {
    00071   // Allow not for multiple AppManagers: If already instantiated then just
    00072   // return it
    00073   if ( 0 == s_appmgrInstance )    {
    00074     s_appmgrInstance = createApplicationMgrEx(dllname, factname);
    00075     StatusCode sc = s_appmgrInstance->queryInterface( IID_ISvcLocator,
    00076                                                       pp_cast<void>(&s_svclocInstance) );
    00077   }
    00078   return s_appmgrInstance;
    00079 }

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

Definition at line 247 of file Bootstrap.cpp.

References createApplicationMgr().

    00247                                           {
    00248 //------------------------------------------------------------------------------
    00249   return createApplicationMgr("GaudiSvc", "ApplicationMgr");
    00250 }

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

Definition at line 241 of file Bootstrap.cpp.

    00241                                                                    {
    00242 //------------------------------------------------------------------------------
    00243   return createApplicationMgr(dllname, "ApplicationMgr");
    00244 }

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

Definition at line 67 of file Bootstrap.cpp.

Referenced by createApplicationMgr(), createAppMgr(), GaudiMain(), and svcLocator().

    00070 {
    00071   // Allow not for multiple AppManagers: If already instantiated then just
    00072   // return it
    00073   if ( 0 == s_appmgrInstance )    {
    00074     s_appmgrInstance = createApplicationMgrEx(dllname, factname);
    00075     StatusCode sc = s_appmgrInstance->queryInterface( IID_ISvcLocator,
    00076                                                       pp_cast<void>(&s_svclocInstance) );
    00077   }
    00078   return s_appmgrInstance;
    00079 }

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

Definition at line 82 of file Bootstrap.cpp.

References createInstance(), IID_IAppMgrUI, StatusCode::isFailure(), IInterface::queryInterface(), and IInterface::release().

Referenced by createApplicationMgr().

    00085 {
    00086   StatusCode     status;
    00087   IInterface*    iif;
    00088   IAppMgrUI*     iappmgr;
    00089
    00090   // Create an instance of the application Manager
    00091   iif = Gaudi::createInstance( "ApplicationMgr", factname, dllname );
    00092   if( iif == 0 ) {
    00093     return 0;
    00094   }
    00095   // Locate few interfaces of the Application Manager
    00096   status = iif->queryInterface( IID_IAppMgrUI, pp_cast<void>(&iappmgr) );
    00097   if( status.isFailure() ) {
    00098     return 0;
    00099   }
    00100   iif->release();
    00101   return iappmgr;
    00102 }

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

Definition at line 82 of file Bootstrap.cpp.

References createInstance(), IID_IAppMgrUI, StatusCode::isFailure(), IInterface::queryInterface(), and IInterface::release().

Referenced by createApplicationMgr().

    00085 {
    00086   StatusCode     status;
    00087   IInterface*    iif;
    00088   IAppMgrUI*     iappmgr;
    00089
    00090   // Create an instance of the application Manager
    00091   iif = Gaudi::createInstance( "ApplicationMgr", factname, dllname );
    00092   if( iif == 0 ) {
    00093     return 0;
    00094   }
    00095   // Locate few interfaces of the Application Manager
    00096   status = iif->queryInterface( IID_IAppMgrUI, pp_cast<void>(&iappmgr) );
    00097   if( status.isFailure() ) {
    00098     return 0;
    00099   }
    00100   iif->release();
    00101   return iappmgr;
    00102 }

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

Create file identifier using UUID mechanism.

Definition at line 188 of file XMLFileCatalog.cpp.

References Gaudi::Units::g.

    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::string Gaudi::createGuidAsString | ( |  | ) |

Create file identifier using UUID mechanism.

Definition at line 188 of file XMLFileCatalog.cpp.

References Gaudi::Units::g.

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

Copy constructor.

Definition at line 19 of file H1D.cpp.

    00019                                                                                      {
    00020   TH1D *h = getRepresentation<AIDA::IHistogram1D,TH1D>(hist);
    00021   Histogram1D *n = h ? new Histogram1D(new TH1D(*h)) : 0;
    00022   return std::pair<DataObject*,AIDA::IHistogram1D*>(n,n);
    00023 }

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

Creator for 1D histogram with variable bins.

Definition at line 14 of file H1D.cpp.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    00014                                                                                                {
    00015   Histogram1D* p = new Histogram1D(new TH1D(title.c_str(),title.c_str(),e.size()-1,&e.front()));
    00016   return std::pair<DataObject*,AIDA::IHistogram1D*>(p,p);
    00017 }

std::pair<DataObject*,AIDA::IHistogram1D*> Gaudi::createH1D | ( | const std::string & | title,
|  | int | nBins,
|  | double | xlow,
|  | double | xup |
| ) |  |  |

Creator for 1D histogram with fixed bins.

Definition at line 9 of file H1D.cpp.

    00009                                                                                                                  {
    00010   Histogram1D* p = new Histogram1D(new TH1D(title.c_str(),title.c_str(),nBins,xlow,xup));
    00011   return std::pair<DataObject*,AIDA::IHistogram1D*>(p,p);
    00012 }

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

Creator for 1D histogram with variable bins.

Definition at line 14 of file H1D.cpp.

    00014                                                                                                {
    00015   Histogram1D* p = new Histogram1D(new TH1D(title.c_str(),title.c_str(),e.size()-1,&e.front()));
    00016   return std::pair<DataObject*,AIDA::IHistogram1D*>(p,p);
    00017 }

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.

Definition at line 9 of file H1D.cpp.

    00009                                                                                                                  {
    00010   Histogram1D* p = new Histogram1D(new TH1D(title.c_str(),title.c_str(),nBins,xlow,xup));
    00011   return std::pair<DataObject*,AIDA::IHistogram1D*>(p,p);
    00012 }

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

Copy constructor.

Definition at line 19 of file H1D.cpp.

Referenced by HistogramSvc::book(), and HistogramSvc::createCopy().

    00019                                                                                      {
    00020   TH1D *h = getRepresentation<AIDA::IHistogram1D,TH1D>(hist);
    00021   Histogram1D *n = h ? new Histogram1D(new TH1D(*h)) : 0;
    00022   return std::pair<DataObject*,AIDA::IHistogram1D*>(n,n);
    00023 }

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*,IHistogram2D*> Gaudi::createH2D | ( | TH2D * | rep | ) |

"Adopt" constructor

Definition at line 21 of file H2D.cpp.

    00021                                                              {
    00022   Histogram2D* p = new Histogram2D(rep);
    00023   return std::pair<DataObject*,IHistogram2D*>(p,p);
    00024 }

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

Creator for 2 D histograms with variable bins.

Definition at line 16 of file H2D.cpp.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    00016                                                                                                              {
    00017   Histogram2D* p = new Histogram2D(new TH2D(title.c_str(),title.c_str(),eX.size()-1,&eX.front(),eY.size()-1,&eY.front()));
    00018   return std::pair<DataObject*,IHistogram2D*>(p,p);
    00019 }

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

Definition at line 11 of file H2D.cpp.

    00011                                                                                                                                                    {
    00012   Histogram2D* p = new Histogram2D(new TH2D(title.c_str(),title.c_str(),binsX, iminX, imaxX, binsY, iminY, imaxY));
    00013   return std::pair<DataObject*,IHistogram2D*>(p,p);
    00014 }

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.

Definition at line 16 of file H2D.cpp.

    00016                                                                                                              {
    00017   Histogram2D* p = new Histogram2D(new TH2D(title.c_str(),title.c_str(),eX.size()-1,&eX.front(),eY.size()-1,&eY.front()));
    00018   return std::pair<DataObject*,IHistogram2D*>(p,p);
    00019 }

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.

Definition at line 11 of file H2D.cpp.

    00011                                                                                                                                                    {
    00012   Histogram2D* p = new Histogram2D(new TH2D(title.c_str(),title.c_str(),binsX, iminX, imaxX, binsY, iminY, imaxY));
    00013   return std::pair<DataObject*,IHistogram2D*>(p,p);
    00014 }

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

"Adopt" constructor

Definition at line 21 of file H2D.cpp.

    00021                                                              {
    00022   Histogram2D* p = new Histogram2D(rep);
    00023   return std::pair<DataObject*,IHistogram2D*>(p,p);
    00024 }

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

Copy constructor.

Referenced by HistogramSvc::book(), and HistogramSvc::createCopy().

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

Copy constructor.

Definition at line 82 of file H3D.cpp.

    00082                                                                                      {
    00083   TH3D *h = getRepresentation<AIDA::IHistogram3D,TH3D>(hist);
    00084   Histogram3D *n = h ? new Histogram3D(new TH3D(*h)) : 0;
    00085   return std::pair<DataObject*,AIDA::IHistogram3D*>(n,n);
    00086 }

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.

Definition at line 77 of file H3D.cpp.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    00077                                                                                         {
    00078   Histogram3D* p = new Histogram3D(new TH3D(title.c_str(),title.c_str(),eX.size()-1,&eX.front(), eY.size()-1,&eY.front(), eZ.size()-1,&eZ.front()));
    00079   return std::pair<DataObject*,AIDA::IHistogram3D*>(p,p);
    00080 }

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.

Definition at line 70 of file H3D.cpp.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    00070                                                                                                                                              {
    00071   Histogram3D* p = new Histogram3D(new TH3D(title.c_str(),title.c_str(),nBinsX,xlow,xup,nBinsY,ylow,yup,nBinsZ,zlow,zup));
    00072   return std::pair<DataObject*,AIDA::IHistogram3D*>(p,p);
    00073 }

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.

Definition at line 77 of file H3D.cpp.

    00077                                                                                         {
    00078   Histogram3D* p = new Histogram3D(new TH3D(title.c_str(),title.c_str(),eX.size()-1,&eX.front(), eY.size()-1,&eY.front(), eZ.size()-1,&eZ.front()));
    00079   return std::pair<DataObject*,AIDA::IHistogram3D*>(p,p);
    00080 }

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.

Definition at line 70 of file H3D.cpp.

    00070                                                                                                                                              {
    00071   Histogram3D* p = new Histogram3D(new TH3D(title.c_str(),title.c_str(),nBinsX,xlow,xup,nBinsY,ylow,yup,nBinsZ,zlow,zup));
    00072   return std::pair<DataObject*,AIDA::IHistogram3D*>(p,p);
    00073 }

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

Copy constructor.

Definition at line 82 of file H3D.cpp.

Referenced by HistogramSvc::book(), and HistogramSvc::createCopy().

    00082                                                                                      {
    00083   TH3D *h = getRepresentation<AIDA::IHistogram3D,TH3D>(hist);
    00084   Histogram3D *n = h ? new Histogram3D(new TH3D(*h)) : 0;
    00085   return std::pair<DataObject*,AIDA::IHistogram3D*>(n,n);
    00086 }

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

Definition at line 178 of file Bootstrap.cpp.

References std::cout, std::endl(), System::getLastErrorString(), StatusCode::isSuccess(), System::loadDynamicLib(), and name.

Referenced by createApplicationMgrEx().

    00182 {
    00183
    00184   IInterface* ii = PluginService::Create<IInterface*>(factname,(IInterface*)0);
    00185   if ( ii ) return ii;
    00186   IService* is = PluginService::Create<IService*>(factname, name, (ISvcLocator*)0);
    00187   if ( is ) return is;
    00188   IAlgorithm* ia = PluginService::Create<IAlgorithm*>(factname, name, (ISvcLocator*)0);
    00189   if ( ia ) return ia;
    00190
    00191   StatusCode status;
    00192   void* libHandle = 0;
    00193   status = System::loadDynamicLib( dllname, &libHandle);
    00194   if ( status.isSuccess() )   {
    00195     IInterface* ii = PluginService::Create<IInterface*>(factname, (IInterface*)0);
    00196     if ( ii ) return ii;
    00197     IService* is = PluginService::Create<IService*>(factname, name, (ISvcLocator*)0);
    00198     if ( is ) return is;
    00199     IAlgorithm* ia = PluginService::Create<IAlgorithm*>(factname, name, (ISvcLocator*)0);
    00200     if ( ia ) return ia;
    00201
    00202     return 0;
    00203   }
    00204   else {
    00205     // DLL library not loaded. Try in the local module
    00206     std::cout << System::getLastErrorString() << std::endl;
    00207     std::cout << "Gaudi::Bootstrap: Not found DLL " << dllname << std::endl;
    00208     return 0;
    00209   }
    00210 }

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

Definition at line 178 of file Bootstrap.cpp.

References std::cout, std::endl(), System::getLastErrorString(), StatusCode::isSuccess(), System::loadDynamicLib(), and name.

Referenced by createApplicationMgrEx().

    00182 {
    00183
    00184   IInterface* ii = PluginService::Create<IInterface*>(factname,(IInterface*)0);
    00185   if ( ii ) return ii;
    00186   IService* is = PluginService::Create<IService*>(factname, name, (ISvcLocator*)0);
    00187   if ( is ) return is;
    00188   IAlgorithm* ia = PluginService::Create<IAlgorithm*>(factname, name, (ISvcLocator*)0);
    00189   if ( ia ) return ia;
    00190
    00191   StatusCode status;
    00192   void* libHandle = 0;
    00193   status = System::loadDynamicLib( dllname, &libHandle);
    00194   if ( status.isSuccess() )   {
    00195     IInterface* ii = PluginService::Create<IInterface*>(factname, (IInterface*)0);
    00196     if ( ii ) return ii;
    00197     IService* is = PluginService::Create<IService*>(factname, name, (ISvcLocator*)0);
    00198     if ( is ) return is;
    00199     IAlgorithm* ia = PluginService::Create<IAlgorithm*>(factname, name, (ISvcLocator*)0);
    00200     if ( ia ) return ia;
    00201
    00202     return 0;
    00203   }
    00204   else {
    00205     // DLL library not loaded. Try in the local module
    00206     std::cout << System::getLastErrorString() << std::endl;
    00207     std::cout << "Gaudi::Bootstrap: Not found DLL " << dllname << std::endl;
    00208     return 0;
    00209   }
    00210 }

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

Copy constructor.

Definition at line 17 of file P1D.cpp.

    00017                                                                                     {
    00018   TProfile *h = getRepresentation<AIDA::IProfile1D,TProfile>(hist);
    00019   Profile1D *n = h ? new Profile1D(new TProfile(*h)) : 0;
    00020   return std::pair<DataObject*,AIDA::IProfile1D*>(n,n);
    00021 }

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

Creator of 1D profile with variable bins.

Definition at line 12 of file P1D.cpp.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    00012                                                                                                                          {
    00013   Profile1D* p = new Profile1D(new TProfile(title.c_str(),title.c_str(),e.size()-1,&e.front(),ylow,yup,"s"));
    00014   return std::pair<DataObject*,AIDA::IProfile1D*>(p,p);
    00015 }

std::pair<DataObject*,AIDA::IProfile1D*> Gaudi::createProf1D | ( | const std::string & | title,
|  | int | nBins,
|  | double | xlow,
|  | double | xup,
|  | double | ylow,
|  | double | yup |
| ) |  |  |

Creator of 1D profile with fixed bins.

Definition at line 7 of file P1D.cpp.

    00007                                                                                                                                              {
    00008   Profile1D* p = new Profile1D(new TProfile(title.c_str(),title.c_str(),nBins,xlow,xup,ylow,yup,"s"));
    00009   return std::pair<DataObject*,AIDA::IProfile1D*>(p,p);
    00010 }

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

Creator of 1D profile with variable bins.

Definition at line 12 of file P1D.cpp.

    00012                                                                                                                          {
    00013   Profile1D* p = new Profile1D(new TProfile(title.c_str(),title.c_str(),e.size()-1,&e.front(),ylow,yup,"s"));
    00014   return std::pair<DataObject*,AIDA::IProfile1D*>(p,p);
    00015 }

std::pair<DataObject*,AIDA::IProfile1D*> Gaudi::createProf1D | ( | const std::string & | title,
|  | int | nBins,
|  | double | xlow,
|  | double | xup,
|  | double | ylow,
|  | double | yup |
| ) |  |  |

Creator of 1D profile with fixed bins.

Definition at line 7 of file P1D.cpp.

    00007                                                                                                                                              {
    00008   Profile1D* p = new Profile1D(new TProfile(title.c_str(),title.c_str(),nBins,xlow,xup,ylow,yup,"s"));
    00009   return std::pair<DataObject*,AIDA::IProfile1D*>(p,p);
    00010 }

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

Copy constructor.

Definition at line 17 of file P1D.cpp.

Referenced by HistogramSvc::bookProf(), and HistogramSvc::createCopy().

    00017                                                                                     {
    00018   TProfile *h = getRepresentation<AIDA::IProfile1D,TProfile>(hist);
    00019   Profile1D *n = h ? new Profile1D(new TProfile(*h)) : 0;
    00020   return std::pair<DataObject*,AIDA::IProfile1D*>(n,n);
    00021 }

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

Copy constructor.

Definition at line 88 of file P2D.cpp.

    00088                                                                                     {
    00089   TProfile2D *h = getRepresentation<AIDA::IProfile2D,TProfile2D>(hist);
    00090   Profile2D *n = h ? new Profile2D(new TProfile2D(*h)) : 0;
    00091   return std::pair<DataObject*,AIDA::IProfile2D*>(n,n);
    00092 }

std::pair<DataObject*,AIDA::IProfile2D*> Gaudi::createProf2D | ( | const std::string & | title,
|  | int | binsX,
|  | double | xlow,
|  | double | xup,
|  | int | binsY,
|  | double | ylow,
|  | double | yup,
|  | double | zlow,
|  | double | zup |
| ) |  |  |

Creator for 2 D profile with fixed bins.

Definition at line 83 of file P2D.cpp.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    00083                                                                                                                                    {
    00084   Profile2D* p = new Profile2D(new TProfile2D(title.c_str(),title.c_str(),binsX,xlow,xup,binsY,ylow,yup,zlow,zup));
    00085   return std::pair<DataObject*,AIDA::IProfile2D*>(p,p);
    00086 }

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

Creator for 2 D profile with variable bins.

Definition at line 76 of file P2D.cpp.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    00076                                                                                                                                                        {
    00077   // Not implemented in ROOT! Can only use TProfile2D with no z-limits
    00078   Profile2D* p = new Profile2D(new TProfile2D(title.c_str(),title.c_str(),eX.size()-1,&eX.front(), eY.size()-1,&eY.front()/*,zlow,zup */));
    00079   return std::pair<DataObject*,AIDA::IProfile2D*>(p,p);
    00080 }

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.

Definition at line 76 of file P2D.cpp.

    00076                                                                                                                                                        {
    00077   // Not implemented in ROOT! Can only use TProfile2D with no z-limits
    00078   Profile2D* p = new Profile2D(new TProfile2D(title.c_str(),title.c_str(),eX.size()-1,&eX.front(), eY.size()-1,&eY.front()/*,zlow,zup */));
    00079   return std::pair<DataObject*,AIDA::IProfile2D*>(p,p);
    00080 }

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.

Definition at line 83 of file P2D.cpp.

    00083                                                                                                                                    {
    00084   Profile2D* p = new Profile2D(new TProfile2D(title.c_str(),title.c_str(),binsX,xlow,xup,binsY,ylow,yup,zlow,zup));
    00085   return std::pair<DataObject*,AIDA::IProfile2D*>(p,p);
    00086 }

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

Copy constructor.

Definition at line 88 of file P2D.cpp.

Referenced by HistogramSvc::bookProf(), and HistogramSvc::createCopy().

    00088                                                                                     {
    00089   TProfile2D *h = getRepresentation<AIDA::IProfile2D,TProfile2D>(hist);
    00090   Profile2D *n = h ? new Profile2D(new TProfile2D(*h)) : 0;
    00091   return std::pair<DataObject*,AIDA::IProfile2D*>(n,n);
    00092 }

template<class Q, class T>

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

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   }

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

Small variation on the sleep function for nanoseconds sleep.

Author:
  Marco Clemencic

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.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    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.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    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.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    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.

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.

Definition at line 161 of file Bootstrap.cpp.

References IID_ISvcLocator, IInterface::queryInterface(), IInterface::release(), s_appmgrInstance, and s_svclocInstance.

    00163 {
    00164   IAppMgrUI* oldInstance = s_appmgrInstance;
    00165   s_appmgrInstance = newInstance;
    00166   if ( s_svclocInstance )     {
    00167     s_svclocInstance->release();
    00168     s_svclocInstance = 0;
    00169   }
    00170   if ( s_appmgrInstance )    {
    00171     s_appmgrInstance->queryInterface (IID_ISvcLocator,
    00172                                       pp_cast<void>(&s_svclocInstance));
    00173   }
    00174   return oldInstance;
    00175 }

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.

Definition at line 145 of file Bootstrap.cpp.

References IID_IAppMgrUI, IInterface::queryInterface(), IInterface::release(), s_appmgrInstance, and s_svclocInstance.

    00147 {
    00148   ISvcLocator* oldInstance = s_svclocInstance;
    00149   s_svclocInstance = newInstance;
    00150   if ( s_appmgrInstance )     {
    00151     s_appmgrInstance->release();
    00152     s_appmgrInstance = 0;
    00153   }
    00154   if ( s_svclocInstance )    {
    00155     s_svclocInstance->queryInterface (IID_IAppMgrUI, pp_cast<void>(&s_appmgrInstance));
    00156   }
    00157   return oldInstance;
    00158 }

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.

Definition at line 161 of file Bootstrap.cpp.

References IID_ISvcLocator, IInterface::queryInterface(), IInterface::release(), s_appmgrInstance, and s_svclocInstance.

    00163 {
    00164   IAppMgrUI* oldInstance = s_appmgrInstance;
    00165   s_appmgrInstance = newInstance;
    00166   if ( s_svclocInstance )     {
    00167     s_svclocInstance->release();
    00168     s_svclocInstance = 0;
    00169   }
    00170   if ( s_appmgrInstance )    {
    00171     s_appmgrInstance->queryInterface (IID_ISvcLocator,
    00172                                       pp_cast<void>(&s_svclocInstance));
    00173   }
    00174   return oldInstance;
    00175 }

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.

Definition at line 145 of file Bootstrap.cpp.

    00147 {
    00148   ISvcLocator* oldInstance = s_svclocInstance;
    00149   s_svclocInstance = newInstance;
    00150   if ( s_appmgrInstance )     {
    00151     s_appmgrInstance->release();
    00152     s_appmgrInstance = 0;
    00153   }
    00154   if ( s_svclocInstance )    {
    00155     s_svclocInstance->queryInterface (IID_IAppMgrUI, pp_cast<void>(&s_appmgrInstance));
    00156   }
    00157   return oldInstance;
    00158 }

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

Simple sleep function.

Author:
  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.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

    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.

References std::basic_string< _CharT, _Traits, _Alloc >::c_str().

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

Definition at line 105 of file Bootstrap.cpp.

References createApplicationMgr(), IID_ISvcLocator, StatusCode::isSuccess(), IInterface::queryInterface(), and s_svclocInstance.

Referenced by HistorySvc::captureState(), configGenerator::genConfig(), IssueSeverity::init(), ServiceHandle< IToolSvc >::serviceLocator(), and StatusCode::~StatusCode().

    00120 {
    00121   if( 0 == s_svclocInstance )   {
    00122     IAppMgrUI* iappmgr = createApplicationMgr();
    00123     if( iappmgr ) {
    00124       StatusCode sc = iappmgr->queryInterface( IID_ISvcLocator,
    00125                                                pp_cast<void>(&s_svclocInstance) );
    00126       if( sc.isSuccess() ) {
    00127         return s_svclocInstance;
    00128       }
    00129     }
    00130     //---Reverted change to create a Minimal SvcLocator in case is requested before AppMgr is created
    00131     //if( 0 == s_appmgrInstance ) {
    00132     //  s_svclocInstance = new BootSvcLocator();
    00133     //} else {
    00134     //  StatusCode sc = s_appmgrInstance->queryInterface( IID_ISvcLocator,
    00135     //                                                  pp_cast<void>(&s_svclocInstance) );
    00136     //  if( sc.isSuccess() ) {
    00137     //    return s_svclocInstance;
    00138     //  }
    00139     //}
    00140   }
    00141   return s_svclocInstance;
    00142 }

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

Definition at line 105 of file Bootstrap.cpp.

References createApplicationMgr(), IID_ISvcLocator, StatusCode::isSuccess(), IInterface::queryInterface(), and s_svclocInstance.

Referenced by HistorySvc::captureState(), configGenerator::genConfig(), IssueSeverity::init(), ServiceHandle< IToolSvc >::serviceLocator(), and StatusCode::~StatusCode().

    00120 {
    00121   if( 0 == s_svclocInstance )   {
    00122     IAppMgrUI* iappmgr = createApplicationMgr();
    00123     if( iappmgr ) {
    00124       StatusCode sc = iappmgr->queryInterface( IID_ISvcLocator,
    00125                                                pp_cast<void>(&s_svclocInstance) );
    00126       if( sc.isSuccess() ) {
    00127         return s_svclocInstance;
    00128       }
    00129     }
    00130     //---Reverted change to create a Minimal SvcLocator in case is requested before AppMgr is created
    00131     //if( 0 == s_appmgrInstance ) {
    00132     //  s_svclocInstance = new BootSvcLocator();
    00133     //} else {
    00134     //  StatusCode sc = s_appmgrInstance->queryInterface( IID_ISvcLocator,
    00135     //                                                  pp_cast<void>(&s_svclocInstance) );
    00136     //  if( sc.isSuccess() ) {
    00137     //    return s_svclocInstance;
    00138     //  }
    00139     //}
    00140   }
    00141   return s_svclocInstance;
    00142 }