#include <MucGeomSvc.h>
Inheritance diagram for MucGeomSvc:
Public Member Functions | |
MucGeomSvc (const std::string &name, ISvcLocator *svcloc) | |
~MucGeomSvc () | |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvUnknown) |
virtual StatusCode | initialize () |
virtual StatusCode | finalize () |
virtual const MucGeoGeneral *const | GetGeoGeneral () |
virtual const MucGeoGap *const | GetGap (int part, int seg, int gap) |
virtual const MucGeoStrip *const | GetStrip (int part, int seg, int gap, int strip) |
virtual const MucG4Geo *const | GetMucG4Geo () |
virtual void | Dump () |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
Private Member Functions | |
void | Fill () |
Private Attributes | |
MucGeoGeneral * | m_pMucGeoGeneral |
MucG4Geo * | m_pMucG4Geo |
int | m_Geometry |
Definition at line 24 of file MucGeomSvc.h.
MucGeomSvc::MucGeomSvc | ( | const std::string & | name, | |
ISvcLocator * | svcloc | |||
) |
Definition at line 17 of file MucGeomSvc.cxx.
References m_Geometry.
00017 : Service(name, svcloc) 00018 { 00019 //Declare the properties 00020 declareProperty("GeometryMode",m_Geometry=1); 00021 00022 }
MucGeomSvc::~MucGeomSvc | ( | ) |
void MucGeomSvc::Dump | ( | ) | [virtual] |
Implements IMucGeomSvc.
Definition at line 87 of file MucGeomSvc.cxx.
References MucGeoGeneral::GetStripNumTotal(), and m_pMucGeoGeneral.
Referenced by main().
00087 { 00088 std::cout << "StripNumTotal = " << m_pMucGeoGeneral->GetStripNumTotal() << std::endl; 00089 }
void MucGeomSvc::Fill | ( | ) | [private] |
Definition at line 58 of file MucGeomSvc.cxx.
References MucGeoGeneral::Init(), MucGeoGeneral::InitFromXML(), MucG4Geo::Instance(), MucGeoGeneral::Instance(), m_Geometry, m_pMucG4Geo, and m_pMucGeoGeneral.
Referenced by initialize().
00058 { 00059 if(m_Geometry==1){ 00060 m_pMucGeoGeneral = MucGeoGeneral::Instance(); 00061 m_pMucGeoGeneral->Init(); 00062 //m_pMucGeoGeneral->InitFromASCII(); 00063 m_pMucGeoGeneral->InitFromXML(); 00064 } else{ //geant4 geo 00065 m_pMucG4Geo = MucG4Geo::Instance(); 00066 } 00067 }
StatusCode MucGeomSvc::finalize | ( | ) | [virtual] |
Definition at line 48 of file MucGeomSvc.cxx.
References Bes_Common::INFO.
00048 { 00049 MsgStream log(messageService(), name()); 00050 log << MSG::INFO << name() << ": End of Run" << endreq; 00051 return StatusCode::SUCCESS; 00052 }
const MucGeoGap *const MucGeomSvc::GetGap | ( | int | part, | |
int | seg, | |||
int | gap | |||
) | [virtual] |
Definition at line 76 of file MucGeomSvc.cxx.
References MucGeoGeneral::GetGap(), and m_pMucGeoGeneral.
00077 { 00078 return m_pMucGeoGeneral->GetGap(part, seg, gap); 00079 }
const MucGeoGeneral *const MucGeomSvc::GetGeoGeneral | ( | ) | [virtual] |
Definition at line 70 of file MucGeomSvc.cxx.
References m_pMucGeoGeneral.
00071 { 00072 return m_pMucGeoGeneral; 00073 }
const MucG4Geo *const MucGeomSvc::GetMucG4Geo | ( | ) | [virtual] |
Definition at line 92 of file MucGeomSvc.cxx.
References m_pMucG4Geo.
00093 { 00094 return m_pMucG4Geo; 00095 }
const MucGeoStrip *const MucGeomSvc::GetStrip | ( | int | part, | |
int | seg, | |||
int | gap, | |||
int | strip | |||
) | [virtual] |
Definition at line 82 of file MucGeomSvc.cxx.
References MucGeoGeneral::GetStrip(), and m_pMucGeoGeneral.
00083 { 00084 return m_pMucGeoGeneral->GetStrip(part, seg, gap, strip); 00085 }
StatusCode MucGeomSvc::initialize | ( | ) | [virtual] |
Definition at line 34 of file MucGeomSvc.cxx.
References Fill(), and Bes_Common::INFO.
00034 { 00035 MsgStream log(messageService(), name()); 00036 log << MSG::INFO << name() << ": Start of run initialisation" << endreq; 00037 00038 StatusCode sc = Service::initialize(); 00039 if ( sc.isFailure() ) return sc; 00040 00041 // get geometry data 00042 Fill(); 00043 00044 return StatusCode::SUCCESS; 00045 }
static const InterfaceID& IMucGeomSvc::interfaceID | ( | ) | [inline, static, inherited] |
Definition at line 16 of file IMucGeomSvc.h.
References IID_IMucGeomSvc.
00016 { return IID_IMucGeomSvc; }
StatusCode MucGeomSvc::queryInterface | ( | const InterfaceID & | riid, | |
void ** | ppvUnknown | |||
) | [virtual] |
Definition at line 24 of file MucGeomSvc.cxx.
References IID_IMucGeomSvc.
00024 { 00025 00026 if ( IID_IMucGeomSvc.versionMatch(riid) ) { 00027 *ppvInterface = static_cast<IMucGeomSvc*> (this); 00028 } else { 00029 return Service::queryInterface(riid, ppvInterface) ; 00030 } 00031 return StatusCode::SUCCESS; 00032 }
int MucGeomSvc::m_Geometry [private] |
MucG4Geo* MucGeomSvc::m_pMucG4Geo [private] |
MucGeoGeneral* MucGeomSvc::m_pMucGeoGeneral [private] |
Definition at line 49 of file MucGeomSvc.h.
Referenced by Dump(), Fill(), GetGap(), GetGeoGeneral(), and GetStrip().