50 {
51 MsgStream log(
msgSvc(), name() );
52
53 std::cout<<" "<<std::endl;
54 std::cout<<" ██████╗ ███████╗███████╗██╗██╗██╗ ██████╗ ██████╗ ███████╗███╗ ███╗ █████╗ ██╗ ██╗ ██████╗ ███╗ ██╗███╗ ███╗███████╗███╗ ██╗████████╗ "<<std::endl;
55 std::cout<<" ██╔══██╗██╔════╝██╔════╝██║██║██║ ██╔════╝██╔════╝ ██╔════╝████╗ ████║ ██╔══██╗██║ ██║██╔════╝ ████╗ ██║████╗ ████║██╔════╝████╗ ██║╚══██╔══╝ "<<std::endl;
56 std::cout<<" ██████╔╝█████╗ ███████╗██║██║██║ ██║ ██║ ███╗█████╗ ██╔████╔██║ ███████║██║ ██║██║ ███╗██╔██╗ ██║██╔████╔██║█████╗ ██╔██╗ ██║ ██║ "<<std::endl;
57 std::cout<<" ██╔══██╗██╔══╝ ╚════██║██║██║██║ ██║ ██║ ██║██╔══╝ ██║╚██╔╝██║ ██╔══██║██║ ██║██║ ██║██║╚██╗██║██║╚██╔╝██║██╔══╝ ██║╚██╗██║ ██║ "<<std::endl;
58 std::cout<<" ██████╔╝███████╗███████║██║██║██║ ╚██████╗╚██████╔╝███████╗██║ ╚═╝ ██║ ██║ ██║███████╗██║╚██████╔╝██║ ╚████║██║ ╚═╝ ██║███████╗██║ ╚████║ ██║ "<<std::endl;
59 std::cout<<" ╚═════╝ ╚══════╝╚══════╝╚═╝╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ "<<std::endl;
60 std::cout<<" "<<std::endl;
61
62 log << MSG::INFO << "CgemAlignAlg initialze() ..." << endreq;
63
64 if("NULL"==m_histname){
65 log << MSG::ERROR << "not defined histogram file." << endreq;
66 return StatusCode::FAILURE;
67 }
68
69 StatusCode sc = service("CgemGeomSvc", m_cgemGeomSvc);
70 if(sc != StatusCode::SUCCESS){
71 log << MSG::ERROR << "can not use CgemGeomSvc" << endreq;
72 }
73
74 sc = service("CgemCalibFunSvc", m_cgemFunSvc);
75 if( sc != StatusCode::SUCCESS ){
76 log << MSG::FATAL << "can not use CgemCalibFunSvc" << endreq;
77 }
78
79
80 initParam();
81
82
83 int i;
84 std::string strconfig;
85 std::string strcomment;
86 std::string strTes;
87 int fgTes[50];
88 for(i=0; i<50; i++) fgTes[i] = -999;
89 ifstream fconfig( m_configFile.c_str() );
90 if( ! fconfig.is_open() ){
91 log << MSG::WARNING << "can not open config file " << m_configFile
92 << ". Use defalt config parameters" << endreq;
93 } else {
94 log << MSG::INFO << "Open config file " << m_configFile << endreq;
95 while( fconfig >> strconfig ){
96 if('#' == strconfig[0]){
97 getline(fconfig, strcomment);
98 } else if("TesMin" == strconfig){
100 }
101
102 }
103 fconfig.close();
104 }
105
106
108
110 m_alignPar -> rdAlignPar(m_alignFile);
111 cout << std::setprecision(4) << std::fixed;
112 cout<<" The parameters are:"<<endl;
113 cout<<" Layer Dx(mm) Dy(mm) Dz(mm) Rx(mrad) Ry(mrad) Rz(mrad) "<<endl;
114 cout<<" =============================================================================================== "<<endl;
115 cout<<
" 0 "<<std::setw(15)<<m_alignPar->
getDx(0)<<std::setw(15)<<m_alignPar->
getDy(0)<<std::setw(15)<<m_alignPar->
getDz(0)<<std::setw(15)<<m_alignPar->
getRx(0)*1000.<<std::setw(15)<<m_alignPar->
getRy(0)*1000.<<std::setw(15)<<m_alignPar->
getRz(0)*1000.<<endl;
116 cout<<
" 1 "<<std::setw(15)<<m_alignPar->
getDx(1)<<std::setw(15)<<m_alignPar->
getDy(1)<<std::setw(15)<<m_alignPar->
getDz(1)<<std::setw(15)<<m_alignPar->
getRx(1)*1000.<<std::setw(15)<<m_alignPar->
getRy(1)*1000.<<std::setw(15)<<m_alignPar->
getRz(1)*1000.<<endl;
117 cout<<
" 2 "<<std::setw(15)<<m_alignPar->
getDx(2)<<std::setw(15)<<m_alignPar->
getDy(2)<<std::setw(15)<<m_alignPar->
getDz(2)<<std::setw(15)<<m_alignPar->
getRx(2)*1000.<<std::setw(15)<<m_alignPar->
getRy(2)*1000.<<std::setw(15)<<m_alignPar->
getRz(2)*1000.<<endl;
118 cout<<
" 3 "<<std::setw(15)<<m_alignPar->
getDx(3)<<std::setw(15)<<m_alignPar->
getDy(3)<<std::setw(15)<<m_alignPar->
getDz(3)<<std::setw(15)<<m_alignPar->
getRx(3)*1000.<<std::setw(15)<<m_alignPar->
getRy(3)*1000.<<std::setw(15)<<m_alignPar->
getRz(3)*1000.<<endl;
119 cout<<
" 4 "<<std::setw(15)<<m_alignPar->
getDx(4)<<std::setw(15)<<m_alignPar->
getDy(4)<<std::setw(15)<<m_alignPar->
getDz(4)<<std::setw(15)<<m_alignPar->
getRx(4)*1000.<<std::setw(15)<<m_alignPar->
getRy(4)*1000.<<std::setw(15)<<m_alignPar->
getRz(4)*1000.<<endl;
120 cout<<
" 5 "<<std::setw(15)<<m_alignPar->
getDx(5)<<std::setw(15)<<m_alignPar->
getDy(5)<<std::setw(15)<<m_alignPar->
getDz(5)<<std::setw(15)<<m_alignPar->
getRx(5)*1000.<<std::setw(15)<<m_alignPar->
getRy(5)*1000.<<std::setw(15)<<m_alignPar->
getRz(5)*1000.<<endl;
121 cout<<" =============================================================================================== "<<endl;
122 cout<<"\n"<<endl;
123
125 m_cgemevt -> setParam(m_param);
126
127
128 m_hlist = new TObjArray(0);
129
130 if( 0 == m_alignMethod ){
132 }
134 m_align->
initialize(m_hlist, m_cgemGeomSvc, m_cgemFunSvc);
135
136 log << MSG::INFO << "CgemAlignAlg initialze() successfully !!" << endreq;
137
138 m_nEvt = 0;
139
140 return StatusCode::SUCCESS;
141}
virtual void setParam(CgemAliParams ¶m)=0
virtual void initialize(TObjArray *hlist, ICgemGeomSvc *cgemGeomSvc, ICgemCalibFunSvc *cgemFunSvc)=0