#include <McEventSelector.h>
Public Member Functions | |
virtual StatusCode | createAddress (const Context &refCtxt, IOpaqueAddress *&) const |
virtual StatusCode | createAddress (const Context &refCtxt, IOpaqueAddress *&) const |
virtual StatusCode | createContext (Context *&refpCtxt) const |
virtual StatusCode | createContext (Context *&refpCtxt) const |
virtual StatusCode | finalize () |
virtual StatusCode | finalize () |
virtual StatusCode | initialize () |
virtual StatusCode | initialize () |
virtual StatusCode | last (Context &refContext) const |
virtual StatusCode | last (Context &refContext) const |
McEventSelector (const std::string &name, ISvcLocator *svcloc) | |
McEventSelector (const std::string &name, ISvcLocator *svcloc) | |
virtual StatusCode | next (Context &refCtxt, int jump) const |
virtual StatusCode | next (Context &refCtxt) const |
virtual StatusCode | next (Context &refCtxt, int jump) const |
virtual StatusCode | next (Context &refCtxt) const |
virtual StatusCode | previous (Context &refCtxt, int jump) const |
virtual StatusCode | previous (Context &refCtxt) const |
virtual StatusCode | previous (Context &refCtxt, int jump) const |
virtual StatusCode | previous (Context &refCtxt) const |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
virtual StatusCode | releaseContext (Context *&refCtxt) const |
virtual StatusCode | releaseContext (Context *&refCtxt) const |
virtual StatusCode | resetCriteria (const std::string &cr, Context &c) const |
virtual StatusCode | resetCriteria (const std::string &cr, Context &c) const |
virtual StatusCode | rewind (Context &refCtxt) const |
virtual StatusCode | rewind (Context &refCtxt) const |
~McEventSelector () | |
~McEventSelector () | |
Private Attributes | |
IntegerProperty | m_eventsPerRun |
IntegerProperty | m_firstEventNo |
IntegerProperty | m_runNo |
|
00246 : 00247 Service( name, svcloc) 00248 { 00249 00250 //declareProperty( "RunNumber", m_runNo = 5040 ); 00251 //declareProperty( "EventsPerRun", m_eventsPerRun = 100000000 ); 00252 //declareProperty( "FirstEvent", m_firstEventNo = 0 ); 00253 m_runNo.verifier().setLower( 0 ); 00254 m_eventsPerRun.verifier().setLower( 0 ); 00255 m_firstEventNo.verifier().setLower( 0 ); 00256 00257 }
|
|
00259 {
00260 // FIXME: who deletes the Context?
00261 }
|
|
|
|
|
|
|
|
00391 { 00392 00393 const McContext* ctx = dynamic_cast<const McContext*>( &refCtxt ); 00394 00395 if (ctx != 0) { 00396 McAddress* mcAddr = new McAddress(CLID_Event, "Event", ""); 00397 mcAddr-> setRunEvt(ctx->runNumber(), ctx->eventNumber()); 00398 addr = mcAddr; 00399 } else { 00400 MsgStream log(messageService(), name()); 00401 log << MSG::ERROR << "casting to a McContext" << endreq; 00402 return StatusCode::FAILURE; 00403 } 00404 00405 return StatusCode::SUCCESS; 00406 00407 }
|
|
|
|
00265 { 00266 McContext* ctx = new McContext(this);//, 00267 //(unsigned int) m_runNo.value( ), 00268 //(unsigned int) m_firstEventNo.value( ), 00269 //(unsigned int) m_eventsPerRun.value( ) 00270 //); 00271 refpCtxt = ctx; 00272 00273 return StatusCode::SUCCESS; 00274 }
|
|
|
|
00290 { 00291 MsgStream log(messageService(), name()); 00292 log << MSG::INFO << "finalize" << endreq; 00293 00294 return StatusCode::SUCCESS; 00295 }
|
|
|
|
00276 { 00277 MsgStream log(messageService(), name()); 00278 log << MSG::INFO << " Enter McEventSelector Initialization " << endreq; 00279 StatusCode sc = Service::initialize(); 00280 if( sc.isSuccess() ) { 00281 } else { 00282 log << MSG::ERROR << "Unable to initialize service " << endreq; 00283 return sc; 00284 } 00285 00286 log << MSG::INFO << " McEventSelector Initialized Properly ... " << endreq; 00287 return sc; 00288 }
|
|
|
|
00362 { 00363 MsgStream log(messageService(), name()); 00364 log << MSG::ERROR 00365 << "............. Last Event Not Implemented ............." 00366 << endreq; 00367 return StatusCode::FAILURE; 00368 }
|
|
|
|
|
|
00316 { 00317 if ( jump > 0 ) { 00318 for ( int i = 0; i < jump; ++i ) { 00319 StatusCode status = next(ctxt); 00320 if ( !status.isSuccess() ) { 00321 return status; 00322 } 00323 } 00324 return StatusCode::SUCCESS; 00325 } 00326 return StatusCode::FAILURE; 00327 }
|
|
00299 { 00300 MsgStream log(messageService(), name()); 00301 log << MSG::DEBUG << "............. Next Event ............." << endreq; 00302 00303 McContext* ct = dynamic_cast<McContext*>(&ctxt); 00304 00305 if (ct != 0 ) { 00306 ct->next(); 00307 return StatusCode::SUCCESS; 00308 } else { 00309 MsgStream log(messageService(), name()); 00310 log << "Could not dcast to McContext" << endreq; 00311 return StatusCode::FAILURE; 00312 } 00313 }
|
|
|
|
|
|
00348 { 00349 if ( jump > 0 ) { 00350 for ( int i = 0; i < jump; ++i ) { 00351 StatusCode status = previous(ctxt); 00352 if ( !status.isSuccess() ) { 00353 return status; 00354 } 00355 } 00356 return StatusCode::SUCCESS; 00357 } 00358 return StatusCode::FAILURE; 00359 }
|
|
00332 { 00333 McContext* ct = dynamic_cast<McContext*>(&ctxt); 00334 00335 if (ct != 0 ) { 00336 ct->previous(); 00337 return StatusCode::SUCCESS; 00338 } else { 00339 MsgStream log(messageService(), name()); 00340 log << "Could not dcast to McContext" << endreq; 00341 return StatusCode::FAILURE; 00342 } 00343 00344 }
|
|
|
|
00235 { 00236 if ( riid == IID_IEvtSelector ) { 00237 *ppvIf = (IEvtSelector*)this; 00238 addRef(); 00239 return SUCCESS; 00240 } 00241 return Service::queryInterface( riid, ppvIf ); 00242 }
|
|
|
|
00410 { 00411 00412 MsgStream log(messageService(), name()); 00413 log << MSG::ERROR 00414 << "............. releaseContext Not Implemented ............." 00415 << endreq; 00416 00417 return StatusCode::FAILURE; 00418 00419 }
|
|
|
|
00422 { 00423 00424 MsgStream log(messageService(), name()); 00425 log << MSG::ERROR 00426 << "............. resetCriteria Not Implemented ............." 00427 << endreq; 00428 00429 return StatusCode::FAILURE; 00430 00431 }
|
|
|
|
00373 { 00374 00375 McContext* ct = dynamic_cast<McContext*>(&ctxt); 00376 00377 if (ct != 0 ) { 00378 ct->rewind(); 00379 return StatusCode::SUCCESS; 00380 } else { 00381 MsgStream log(messageService(), name()); 00382 log << "Could not dcast to McContext" << endreq; 00383 return StatusCode::FAILURE; 00384 } 00385 00386 }
|
|
|
|
|
|
|