3#include "GaudiKernel/MsgStream.h"
4#include "GaudiKernel/IMessageSvc.h"
5#include "GaudiKernel/StatusCode.h"
6#include "GaudiKernel/ISvcLocator.h"
7#include "GaudiKernel/Bootstrap.h"
8#include "GaudiKernel/SmartDataPtr.h"
9#include "GaudiKernel/IDataProviderSvc.h"
10#include "GaudiKernel/PropertyMgr.h"
21 for(
int iEP=0; iEP<
NEP; iEP++){
34 for(
int iEP=0; iEP<
NEP; iEP++){
53 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
54 MsgStream log(
msgSvc,
"MdcAlignPar");
55 log << MSG::WARNING <<
"read MdcAlignPar data directly from run directory"
59 log << MSG::INFO <<
"open file" << endreq;
60 if( ! fpar.is_open() ){
61 log << MSG::FATAL <<
"can not open alignment file " << alignFile.c_str() << endreq;
67 for(i=0; i<7; i++) fpar >> strtmp;
68 for(
int iEP=0; iEP<
NEP; iEP++){
69 fpar >> strtmp >> m_dx[iEP] >> m_dy[iEP] >> m_dz[iEP]
70 >> m_rx[iEP] >> m_ry[iEP] >> m_rz[iEP];
78 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
79 MsgStream log(
msgSvc,
"MdcAlignPar");
80 log << MSG::INFO <<
"MdcAlignPar::wrtAlignPar()" << endreq;
84 string str[] = {
"Inner_east",
"Step0_east",
"Step1_east",
85 "Step2_east",
"Step3_east",
"Step4_east",
86 "Step5_east",
"Outer_east",
"Inner_west",
87 "Step0_west",
"Step1_west",
"Step2_west",
88 "Step3_west",
"Step4_west",
"Step5_west",
91 string name[] = {
"Elements",
"DeltaX(mm)",
"DeltaY(mm)",
92 "DeltaZ(mm)",
"RX(rad)",
"RY(rad)",
"RZ(rad)"};
95 fout << setw(14) << name[0];
96 for(i=1; i<7; i++) fout << setw(13) << name[i];
98 for (iEnd=0; iEnd<
NEP; iEnd++){
99 fout << setw(14) << str[iEnd]
100 << setw(13) << m_dx[iEnd] + m_delDx[iEnd]
101 << setw(13) << m_dy[iEnd] + m_delDy[iEnd]
102 << setw(13) << m_dz[iEnd] + m_delDz[iEnd]
103 << setw(13) << m_rx[iEnd] + m_delRx[iEnd]
104 << setw(13) << m_ry[iEnd] + m_delRy[iEnd]
105 << setw(13) << m_rz[iEnd] + m_delRz[iEnd] << endl;
106 if(7 == iEnd) fout << endl;
111 fdel << setw(14) << name[0];
112 for(i=1; i<7; i++) fdel << setw(13) << name[i];
114 for (iEnd=0; iEnd<
NEP; iEnd++){
115 fdel << setw(14) << str[iEnd] << setw(13) << m_delDx[iEnd]
116 << setw(13) << m_delDy[iEnd] << setw(13) << m_delDz[iEnd]
117 << setw(13) << m_delRx[iEnd] << setw(13) << m_delRy[iEnd]
118 << setw(13) << m_delRz[iEnd] << endl;
119 if(7 == iEnd) fdel << endl;
122 fdel << endl <<
"Fit error:" << endl;
123 for (iEnd=0; iEnd<
NEP; iEnd++){
124 fdel << setw(14) << str[iEnd] << setw(13) << m_errDx[iEnd]
125 << setw(13) << m_errDy[iEnd] << setw(13) << m_errDz[iEnd]
126 << setw(13) << m_errRx[iEnd] << setw(13) << m_errRy[iEnd]
127 << setw(13) << m_errRz[iEnd] << endl;
128 if(7 == iEnd) fdel << endl;
bool rdAlignPar(std::string alignFile)