BOSS 7.1.2
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, <[email protected]> |
8// [Date ]: Jul 2, 2006 |
9// [Log ]: See ChangLog |
10//------------------------------------------------------------------------------|
11#include<iostream>
12
13#include "GaudiKernel/MsgStream.h"
14
16
17using namespace std;
18DECLARE_COMPONENT(MucGeoCreateAlg)
19// -----------------------------------Declaration----------------------------------------
20MucGeoCreateAlg::MucGeoCreateAlg(const std::string& name, ISvcLocator* pSvcLocator) :
21 Algorithm(name, pSvcLocator), m_bAlignFlag(true)
22{
23 // Declare the properties
24 declareProperty("CreateFlag", m_sCreateFlag);
25 declareProperty("AlignFlag", m_bAlignFlag);
26 declareProperty("AlignFile", m_sAlignFile = "MucGeoAlignConst.root");
27}
28
29// ----------------------------------Initialize-----------------------------------------
31{
32 MsgStream log(msgSvc(), name());
33
34 log << MSG::INFO << endreq << "In initialize() " << endreq;
35 log << MSG::INFO << "Add alignment:\t" << ((m_bAlignFlag)?"YES":"NO") << endreq << endreq;
36
37 if( m_bAlignFlag )
38 log << MSG::INFO << "Alignment file:\t" << m_sAlignFile << endreq;
39
40 m_pMucGeoMgr = new MucGeoMgr( m_sCreateFlag, m_bAlignFlag, m_sAlignFile );
41
42 return StatusCode::SUCCESS;
43}
44
45// ----------------------------------Execute--------------------------------------------
47{
48 MsgStream log(msgSvc(), name());
49 log << MSG::INFO << endreq << "In execute()" << endreq;
50
51 return StatusCode::SUCCESS;
52}
53// ----------------------------------Finalize------------------------------------------
55{
56 MsgStream log(msgSvc(), name());
57 log << MSG::INFO << endreq << "In finalize()" << endreq << endreq;
58
59 m_pMucGeoMgr->CreateEntities();
60 m_pMucGeoMgr->CreateRootGeo();
61 m_pMucGeoMgr->CreateOnlineStripGeo();
62
63 return StatusCode::SUCCESS;
64}
65
66//--------------------------------------------END-----------------------------------------
67
IMessageSvc * msgSvc()
StatusCode initialize()
StatusCode execute()
StatusCode finalize()
StatusCode CreateOnlineStripGeo()
StatusCode CreateEntities()
StatusCode CreateRootGeo()