25 MsgStream log(
msgSvc(), name() );
26 log << MSG::INFO << endmsg <<
"In initialize()" << endmsg;
27 log << MSG::INFO <<
"Fec order:\t\t" << m_fFecOrder << endmsg;
28 log << MSG::INFO <<
"Chain map:\t" << m_sFileName[0] << endmsg;
29 log << MSG::INFO <<
"Output map:\t\t" << m_sFileName[1] << endmsg;
30 log << MSG::INFO <<
"Output option:\t\t" << m_sOutputOption << endmsg;
32 ifstream fin( m_sFileName[0].c_str(), ios::in );
34 log << MSG::INFO <<
"-------Chain map--------" << endmsg;
35 if ( m_sFileName[0].size() == 0 || fin.bad() )
37 log << MSG::INFO << endmsg <<
"Load default map!" << endmsg;
45 log << MSG::INFO << m_sChainMap[i][j] <<
"\t";
48 log << MSG::INFO << endmsg;
62 log << MSG::INFO << endmsg <<
"Mark:\t"
63 <<
"Module\t" << i <<
"Socket\t" << j <<
"\t" << tempMark <<
"\terror!"
68 m_sChainMap[i][j] = tempMark;
70 log << MSG::INFO << m_sChainMap[i][j] <<
"\t";
72 log << MSG::INFO << endmsg;
77 log << MSG::INFO <<
"------------------------" << endmsg;
79 return StatusCode::SUCCESS;
92 MsgStream log(
msgSvc(), name() );
93 log << MSG::INFO << endmsg <<
"In finalize()" << endmsg << endmsg;
95 ofstream fout( m_sFileName[1].c_str(), ios::out );
98 log << MSG::INFO <<
"Output file created error!" << endmsg;
102 for (
int i = 0; i <
DATA_NUM; i++ )
104 if ( m_sOutputOption[i] ==
'1' ) fout <<
DATA_NAME[i] <<
"\t";
110 log << MSG::INFO <<
"----------------------Module [ " << i <<
" ]----------------------"
115 m_mucChain[id] =
new MucChain(
id, m_sChainMap[i][j], i, j, m_fFecOrder );
117 for (
int k = 0; k < m_mucChain[id]->GetFecTotal(); k++ )
119 MucFec* aFec = m_mucChain[id]->GetFec( k );
120 if ( m_sOutputOption[0] ==
'1' ) fout << aFec->
GetChainName() <<
"\t";
121 if ( m_sOutputOption[1] ==
'1' ) fout << aFec->
DecodeModule() <<
"\t";
122 if ( m_sOutputOption[2] ==
'1' ) fout << aFec->
DecodeSocket() <<
"\t";
123 if ( m_sOutputOption[3] ==
'1' ) fout << aFec->
DecodeFecID() <<
"\t";
124 if ( m_sOutputOption[4] ==
'1' ) fout << aFec->
GetVmeAddress() <<
"\t";
125 if ( m_sOutputOption[5] ==
'1' ) fout << aFec->
GetVmeBin() <<
"\t";
126 if ( m_sOutputOption[6] ==
'1' ) fout << aFec->
GetPart() <<
"\t";
127 if ( m_sOutputOption[7] ==
'1' ) fout << aFec->
GetSegment() <<
"\t";
128 if ( m_sOutputOption[8] ==
'1' ) fout << aFec->
GetLayer() <<
"\t";
129 if ( m_sOutputOption[9] ==
'1' ) fout << aFec->
GetFirstStripID() <<
"\t";
130 if ( m_sOutputOption[10] ==
'1' ) fout << aFec->
GetStripOrder() <<
"\t";
131 if ( m_sOutputOption[11] ==
'1' ) fout << aFec->
GetGeoAddress() <<
"\t";
132 if ( m_sOutputOption[12] ==
'1' ) fout << aFec->
GetGeoBin() <<
"\t";
133 if ( m_sOutputOption[13] ==
'1' ) fout << aFec->
GetDataBin() <<
"\t";
137 log << MSG::INFO <<
"Chain ID: " <<
id <<
"\tName: " << m_sChainMap[i][j];
138 log << MSG::INFO <<
"\tSocket: " << j <<
"\tFecTotal: " << m_mucChain[id]->GetFecTotal()
139 <<
"\tFecOrder: " << m_fFecOrder <<
"\tdone!" << endmsg;
145 return StatusCode::SUCCESS;