| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

GiGaBase.h

Go to the documentation of this file.
00001 // $Id: GiGaBase.h,v 1.26 2008/05/30 13:24:42 gcorti Exp $
00002 #ifndef GIGA_GIGABASE_H
00003 #define GIGA_GIGABASE_H 1 
00004 
00005 // Include files
00006 // from STL
00007 #include <string>
00008 #include <exception>
00009 #include <map>
00010 
00011 // from Gaudi 
00012 #include "GaudiKernel/DataObject.h"
00013 #include "GaudiKernel/IIncidentListener.h"
00014 #include "GaudiKernel/IToolSvc.h"
00015 #include "GaudiKernel/MsgStream.h"
00016 #include "GaudiKernel/System.h"
00017 #include "GaudiKernel/SmartDataPtr.h"
00018 #include "GaudiAlg/GaudiTool.h"
00019 
00020 // from GiGa
00021 #include "GiGa/IGiGaInterface.h"
00022 #include "GiGa/IGiGaSvc.h"
00023 #include "GiGa/IGiGaSetUpSvc.h"
00024 
00025 // Forward declarations 
00026 class IMessageSvc          ;
00027 class ISvcLocator          ;
00028 class IChronoStatSvc       ;
00029 class IDataProviderSvc     ;
00030 class IIncidentSvc         ;
00031 class IObjManager          ;
00032 //
00033 class PropertyMgr          ;
00034 class MsgStream            ;
00035 class StreamBuffer         ;
00036 class GaudiException       ;
00037 //
00038 
00049 class  GiGaBase: public virtual IGiGaInterface   , 
00050                  public virtual IIncidentListener, 
00051                  public         GaudiTool 
00052 {
00053 public:
00054   
00062   GiGaBase( const std::string& type   ,
00063             const std::string& name   , 
00064             const IInterface*  parent );
00065 
00067   virtual ~GiGaBase();
00068 
00069 public:
00070 
00077   virtual StatusCode initialize();
00078 
00085   virtual StatusCode finalize();
00086   
00090   virtual void handle( const Incident& i );
00091 
00092 public:
00093   
00097   inline IGiGaSvc* gigaSvc() const { 
00098     if( m_gigaSvc == 0 ) {
00099       m_gigaSvc = svc<IGiGaSvc>( m_gigaName , true );
00100     } 
00101     return m_gigaSvc;
00102   };
00103 
00107   inline IGiGaSetUpSvc* setupSvc() const { 
00108     if( m_setupSvc == 0 ) {
00109       if( m_setupName == m_gigaName ) {
00110         // cast to correct type
00111         m_setupSvc = dynamic_cast<IGiGaSetUpSvc*>( gigaSvc() ); 
00112       }
00113       else {
00114         m_setupSvc = svc<IGiGaSetUpSvc> ( m_setupName , true );
00115       }
00116     }
00117     return m_setupSvc; 
00118   };
00119 
00120 private: 
00121   
00122   GiGaBase();                              
00123   GiGaBase           ( const GiGaBase& );  
00124   GiGaBase& operator=( const GiGaBase& );  
00125   
00126 private:
00127 
00128   std::string    m_gigaName;        
00129   std::string    m_setupName;       
00130   mutable IGiGaSvc*      m_gigaSvc;         
00131   mutable IGiGaSetUpSvc* m_setupSvc;        
00132 
00133 };
00134 
00135 
00136 #endif 
00137 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:01:14 2011 for GiGa by doxygen 1.4.7