BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MucGeoCreateAlg.cxx
Go to the documentation of this file.
1//------------------------------------------------------------------------------|
2// [File ]: MucGeoCreateAlg.cxx |
3// [Brief ]: Muon detector geometry creating algrithom |
4// Both designed and aligned geometry can be generated |
5// Geometry entries included: |
6// yoke, gap, gas, RPC, bakelite, stripplane, strip, etc.. |
7// [Author]: Xie Yuguang, <ygxie@mail.ihep.ac.cn> |
8// [Date ]: Jul 2, 2006 |
9// [Log ]: See ChangLog |
10//------------------------------------------------------------------------------|
11#include <iostream>
12
13#include "GaudiKernel/MsgStream.h"
14
16
17using namespace std;
19// -----------------------------------Declaration----------------------------------------
20MucGeoCreateAlg::MucGeoCreateAlg( const std::string& name, ISvcLocator* pSvcLocator )
21 : Algorithm( name, pSvcLocator ), m_bAlignFlag( true ) {
22 // Declare the properties
23 declareProperty( "CreateFlag", m_sCreateFlag );
24 declareProperty( "AlignFlag", m_bAlignFlag );
25 declareProperty( "AlignFile", m_sAlignFile = "MucGeoAlignConst.root" );
26}
27
28// ----------------------------------Initialize-----------------------------------------
30 MsgStream log( msgSvc(), name() );
31
32 log << MSG::INFO << endmsg << "In initialize() " << endmsg;
33 log << MSG::INFO << "Add alignment:\t" << ( ( m_bAlignFlag ) ? "YES" : "NO" ) << endmsg
34 << endmsg;
35
36 if ( m_bAlignFlag ) log << MSG::INFO << "Alignment file:\t" << m_sAlignFile << endmsg;
37
38 m_pMucGeoMgr = new MucGeoMgr( m_sCreateFlag, m_bAlignFlag, m_sAlignFile );
39
40 return StatusCode::SUCCESS;
41}
42
43// ----------------------------------Execute--------------------------------------------
45 MsgStream log( msgSvc(), name() );
46 log << MSG::INFO << endmsg << "In execute()" << endmsg;
47
48 return StatusCode::SUCCESS;
49}
50// ----------------------------------Finalize------------------------------------------
52 MsgStream log( msgSvc(), name() );
53 log << MSG::INFO << endmsg << "In finalize()" << endmsg << endmsg;
54
55 m_pMucGeoMgr->CreateEntities();
56 m_pMucGeoMgr->CreateRootGeo();
57 m_pMucGeoMgr->CreateOnlineStripGeo();
58
59 return StatusCode::SUCCESS;
60}
61
62//--------------------------------------------END-----------------------------------------
DECLARE_COMPONENT(BesBdkRc)
IMessageSvc * msgSvc()
StatusCode initialize()
StatusCode execute()
MucGeoCreateAlg(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode finalize()