/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Muc/MucGeoCreateAlg/MucGeoCreateAlg-00-01-00/src/MucGeoCreateAlg.cxx

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------|
00002 //      [File  ]:                       MucGeoCreateAlg.cxx                     |
00003 //      [Brief ]:       Muon detector geometry creating algrithom               |
00004 //                      Both designed and aligned geometry can be generated     |
00005 //                      Geometry entries included:                              |
00006 //                              yoke, gas gap, RPC, strip,                      |               
00007 //      [Author]:       Xie Yuguang, <ygxie@mail.ihep.ac.cn>                    |
00008 //      [Date  ]:       Jul 2, 2006                                             |
00009 //      [Log   ]:       See ChangLog                                            |
00010 //------------------------------------------------------------------------------|
00011 #include<iostream>
00012 
00013 #include "GaudiKernel/MsgStream.h"
00014 
00015 #include "MucGeoCreateAlg/MucGeoCreateAlg.h"
00016 
00017 using namespace std;
00018 
00019 // -----------------------------------Declaration----------------------------------------
00020 MucGeoCreateAlg::MucGeoCreateAlg(const std::string& name, ISvcLocator* pSvcLocator) :
00021   Algorithm(name, pSvcLocator), m_bAlignFlag(true)
00022 {
00023   // Declare the properties
00024         declareProperty("CreateFlag", m_sCreateFlag);
00025   declareProperty("AlignFlag",  m_bAlignFlag);
00026   declareProperty("AlignFile",  m_sAlignFile = "MucGeoAlignConst.root");
00027 }
00028 
00029 // ----------------------------------Initialize----------------------------------------- 
00030 StatusCode MucGeoCreateAlg::initialize()
00031 {
00032   MsgStream log(msgSvc(), name());
00033 
00034   log << MSG::INFO << endreq << "In initialize() " << endreq;
00035         log << MSG::INFO << "Add alignment:\t"  << ((m_bAlignFlag)?"YES":"NO") << endreq << endreq;
00036 
00037   if( m_bAlignFlag )
00038         log << MSG::INFO << "Alignment file:\t" << m_sAlignFile << endreq;      
00039 
00040         m_pMucGeoMgr = new MucGeoMgr( m_sCreateFlag, m_bAlignFlag, m_sAlignFile );
00041         
00042   return StatusCode::SUCCESS;
00043 }
00044 
00045 // ----------------------------------Execute--------------------------------------------
00046 StatusCode MucGeoCreateAlg::execute()
00047 {
00048   MsgStream log(msgSvc(), name());
00049   log << MSG::INFO << endreq << "In execute()" << endreq;
00050 
00051         return StatusCode::SUCCESS;
00052 }
00053 // ----------------------------------Finalize------------------------------------------
00054 StatusCode MucGeoCreateAlg::finalize()
00055 {
00056   MsgStream log(msgSvc(), name());
00057   log << MSG::INFO << endreq << "In finalize()" << endreq << endreq;
00058         
00059         m_pMucGeoMgr->CreateEntities(); 
00060         m_pMucGeoMgr->CreateRootGeo();
00061         m_pMucGeoMgr->CreateOnlineStripGeo();
00062 
00063   return StatusCode::SUCCESS;
00064 }
00065 
00066 //--------------------------------------------END-----------------------------------------
00067 

Generated on Tue Nov 29 23:12:56 2016 for BOSS_7.0.2 by  doxygen 1.4.7