9#include "GaudiKernel/MsgStream.h"
15 Algorithm(name, pSvcLocator), m_fFecOrder(1)
18 declareProperty(
"FecOrder", m_fFecOrder);
19 declareProperty(
"ChainMap", m_sFileName[0]);
20 declareProperty(
"FecMap", m_sFileName[1]);
21 declareProperty(
"OutputOption", m_sOutputOption);
27 MsgStream log(
msgSvc(), name());
28 log << MSG::INFO << endreq <<
"In initialize()" << endreq;
29 log << MSG::INFO <<
"Fec order:\t\t" << m_fFecOrder << endreq;
30 log << MSG::INFO <<
"Chain map:\t" << m_sFileName[0] << endreq;
31 log << MSG::INFO <<
"Output map:\t\t" << m_sFileName[1] << endreq;
32 log << MSG::INFO <<
"Output option:\t\t" << m_sOutputOption << endreq;
34 ifstream fin(m_sFileName[0].c_str(), ios::in);
36 log << MSG::INFO <<
"-------Chain map--------" << endreq;
37 if( m_sFileName[0].size() == 0 || fin.bad() )
39 log << MSG::INFO << endreq <<
"Load default map!" << endreq;
46 log << MSG::INFO << m_sChainMap[i][j] <<
"\t";
49 log << MSG::INFO << endreq;
62 log << MSG::INFO << endreq
63 <<
"Mark:\t" <<
"Module\t" << i <<
"Socket\t" << j <<
"\t"
64 << tempMark <<
"\terror!"<< endreq;
68 m_sChainMap[i][j] = tempMark;
70 log << MSG::INFO << m_sChainMap[i][j] <<
"\t";
72 log << MSG::INFO << endreq;
77 log << MSG::INFO <<
"------------------------" << endreq;
79 return StatusCode::SUCCESS;
85 MsgStream log(
msgSvc(), name());
86 log << MSG::INFO << endreq <<
"In execute()" << endreq;
88 return StatusCode::SUCCESS;
95 MsgStream log(
msgSvc(), name());
96 log << MSG::INFO << endreq <<
"In finalize()" << endreq << endreq;
98 ofstream fout(m_sFileName[1].c_str(), ios::out);
100 log << MSG::INFO <<
"Output file created error!" << endreq;
105 if( m_sOutputOption[i] ==
'1' )
112 log << MSG::INFO <<
"----------------------Module [ " << i <<
" ]----------------------" << endreq;
116 m_mucChain[id] =
new MucChain(
id, m_sChainMap[i][j], i, j, m_fFecOrder );
118 for(
int k=0; k<m_mucChain[id]->
GetFecTotal(); k++ )
121 if( m_sOutputOption[0] ==
'1' )
123 if( m_sOutputOption[1] ==
'1' )
125 if( m_sOutputOption[2] ==
'1' )
127 if( m_sOutputOption[3] ==
'1' )
129 if( m_sOutputOption[4] ==
'1' )
131 if( m_sOutputOption[5] ==
'1' )
133 if( m_sOutputOption[6] ==
'1' )
134 fout << aFec->
GetPart() <<
"\t";
135 if( m_sOutputOption[7] ==
'1' )
137 if( m_sOutputOption[8] ==
'1' )
139 if( m_sOutputOption[9] ==
'1' )
141 if( m_sOutputOption[10] ==
'1' )
143 if( m_sOutputOption[11] ==
'1' )
145 if( m_sOutputOption[12] ==
'1' )
147 if( m_sOutputOption[13] ==
'1' )
152 log << MSG::INFO <<
"Chain ID: " <<
id <<
"\tName: " << m_sChainMap[i][j];
153 log << MSG::INFO <<
"\tSocket: " << j <<
"\tFecTotal: " << m_mucChain[id]->
GetFecTotal()
154 <<
"\tFecOrder: " << m_fFecOrder <<
"\tdone!" << endreq;
160 return StatusCode::SUCCESS;
const std::string DEFAULT_MAP[MODULE_MAX][SOCKET_MAX]
const std::string DATA_NAME[DATA_NUM]
const unsigned int MARK_NUM
MucFec * GetFec(int fecId)
unsigned short GetGeoAddress()
unsigned short GetVmeAddress()