Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ServiceAccessor.h

Go to the documentation of this file.
00001 #ifndef ServiceAccessor_H
00002 #define ServiceAccessor_H
00003 
00004 
00005 #include "GaudiKernel/ISvcLocator.h"
00006 #include "GaudiKernel/Bootstrap.h"
00007 #include "GaudiKernel/MsgStream.h"
00008 #include "GaudiKernel/IMessageSvc.h"
00009 
00010 #include "GaudiKernel/IHistogramSvc.h"
00011 
00012 // access the message service
00013 inline IMessageSvc* msgSvc() 
00014 {
00015         static IMessageSvc* mS=0;
00016         if (!mS)
00017         {
00018                 ISvcLocator* svcLocator = Gaudi::svcLocator();
00019                 svcLocator->service("MessageSvc", mS);
00020         }
00021         return mS;      
00022 }
00023 
00024 // access the histogram service
00025 inline IHistogramSvc* histoSvc() 
00026 {
00027         static IHistogramSvc* hS=0;
00028         StatusCode status;
00029         if (!hS)
00030         {
00031                 ISvcLocator* svcLocator = Gaudi::svcLocator();
00032                 status=svcLocator->service("HistogramDataSvc",hS);
00033         }
00034         return hS;
00035 }
00036 
00037 // access store gate
00038 
00039 #include "StoreGate/StoreGateSvc.h"
00040 
00041 inline StoreGateSvc* storeGateSvc()
00042 {
00043         static StoreGateSvc* sG=0;
00044         StatusCode status;
00045         if (!sG)
00046         {
00047                 ISvcLocator* svcLocator = Gaudi::svcLocator();
00048                 status = svcLocator->service("StoreGateSvc", sG);
00049         }
00050         return sG;
00051 }
00052 
00053 #include "GaudiKernel/INTupleSvc.h"
00054 
00055 inline INTupleSvc* ntupleSvc()
00056 {
00057         static INTupleSvc* nS=0;
00058         StatusCode status;
00059         if (!nS)
00060         {
00061                 ISvcLocator* svcLocator = Gaudi::svcLocator();
00062                 status = svcLocator->service("NTupleSvc",nS);
00063         }
00064         return nS;
00065 }
00066 
00067 #endif
00068 

Generated on Wed Feb 2 15:42:07 2011 for BOSS6.5.5 by  doxygen 1.3.9.1