28 : Service( name, sl ), m_dbsvc( 0 ) {
29 m_propMgr.declareProperty(
"FromDB", m_fromDatabase =
true );
30 m_propMgr.declareProperty(
"seqListFile", m_seqListFile =
"myseqlist.xml" );
31 m_propMgr.declareProperty(
"sigListFile", m_sigListFile =
"mysiglist.xml" );
33 IJobOptionsSvc* jobSvc;
34 Gaudi::svcLocator()->service(
"JobOptionsSvc", jobSvc );
35 jobSvc->setMyProperties(
"HltConfigSvc", &m_propMgr );
77 MsgStream log(
msgSvc(), name() );
78 log << MSG::INFO << name() <<
": Start of initialisation" << endmsg;
81 StatusCode sc = service(
"IncidentSvc", incsvc );
83 if ( sc.isSuccess() ) { incsvc->addListener(
this,
"NewRun", priority ); }
86 log << MSG::FATAL <<
"Cannot find IncidentSvc" << endmsg;
92 sc = serviceLocator()->service(
"DatabaseSvc", m_dbsvc,
true );
95 log << MSG::ERROR <<
"Unable to find DatabaseSvc " << endmsg;
100 sc = serviceLocator()->service(
"EventDataSvc", m_eventSvc,
true );
101 if ( sc.isFailure() )
103 log << MSG::ERROR <<
"Unable to find EventDataSvc " << endmsg;
107 if (
MyFrame::instance() == 0 ) log << MSG::INFO <<
"MyFrame::instance() == 0" << endmsg;
108 if ( !m_fromDatabase )
110 log << MSG::ALWAYS <<
"Read config from files" << endmsg;
115 return StatusCode::SUCCESS;
133 MsgStream log(
msgSvc(), name() );
136 log << MSG::FATAL <<
" m_dbsvc=0" << endmsg;
137 return StatusCode::FAILURE;
140 SmartDataPtr<Event::EventHeader> eventHeader( m_eventSvc,
"/Event/EventHeader" );
141 int run = eventHeader->runNumber();
143 log << MSG::INFO <<
"run=" << run << endmsg;
146 sprintf( stmt1,
"select efconfig_id from RunParams where run_number = %d",
abs( run ) );
149 int row_no = m_dbsvc->query(
"RunInfo", stmt1, res );
152 log << MSG::ERROR <<
"search errror" << endmsg;
153 return StatusCode::FAILURE;
155 long int efId = atoi( ( *res[0] )[
"efconfig_id"] );
159 "select Seqlist_dtd,Siglist_dtd,Seqlist_xml,Siglist_xml from EFConfInfo where "
164 row_no = m_dbsvc->query(
"configdb", stmt2, res );
167 log << MSG::ERROR <<
"search errror" << endmsg;
168 return StatusCode::FAILURE;
171 long int seq_dtd, sig_dtd, seq_xml, sig_xml;
172 seq_dtd = atoi( ( *res[0] )[
"Seqlist_dtd"] );
174 sig_dtd = atoi( ( *res[0] )[
"Siglist_dtd"] );
176 seq_xml = atoi( ( *res[0] )[
"Seqlist_xml"] );
177 sig_xml = atoi( ( *res[0] )[
"Siglist_xml"] );
182 sprintf( stmt3,
"select FileName,FileText from EFfile where EFfileId = %ld", seq_dtd );
184 row_no = m_dbsvc->query(
"configdb", stmt3, res );
187 log << MSG::ERROR <<
"search errror" << endmsg;
188 return StatusCode::FAILURE;
190 outfile.open( ( *res[0] )[
"FileName"], ios_base::out );
191 outfile << ( *res[0] )[
"FileText"];
195 sprintf( stmt4,
"select FileName,FileText from EFfile where EFfileId = %ld", sig_dtd );
197 row_no = m_dbsvc->query(
"configdb", stmt4, res );
200 log << MSG::ERROR <<
"search errror" << endmsg;
201 return StatusCode::FAILURE;
203 outfile.open( ( *res[0] )[
"FileName"], ios_base::out );
204 outfile << ( *res[0] )[
"FileText"];
208 sprintf( stmt5,
"select FileName,FileText from EFfile where EFfileId = %ld", seq_xml );
210 row_no = m_dbsvc->query(
"configdb", stmt5, res );
213 log << MSG::ERROR <<
"search errror" << endmsg;
214 return StatusCode::FAILURE;
216 outfile.open( ( *res[0] )[
"FileName"], ios_base::out );
217 outfile << ( *res[0] )[
"FileText"];
219 m_seqListFile = string( ( *res[0] )[
"FileName"] );
222 sprintf( stmt6,
"select FileName,FileText from EFfile where EFfileId = %ld", sig_xml );
224 row_no = m_dbsvc->query(
"configdb", stmt6, res );
227 log << MSG::ERROR <<
"search errror" << endmsg;
228 return StatusCode::FAILURE;
230 outfile.open( ( *res[0] )[
"FileName"], ios_base::out );
231 outfile << ( *res[0] )[
"FileText"];
233 m_sigListFile = string( ( *res[0] )[
"FileName"] );
235 return StatusCode::SUCCESS;
sprintf(cut, "kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_" "pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)