BOSS 7.0.6
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, gas gap, RPC, strip, |
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;
18
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()
MucGeoCreateAlg(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode finalize()
StatusCode CreateOnlineStripGeo()
Definition: MucGeoMgr.cxx:336
StatusCode CreateEntities()
Definition: MucGeoMgr.cxx:222
StatusCode CreateRootGeo()
Definition: MucGeoMgr.cxx:325