Go to the documentation of this file.
59 void*
identifier()
const override {
return (
void*)m_pSelector; }
62 void setFileIterator( ListName::const_iterator new_iter ) { m_fileIterator = new_iter; }
77 error() <<
"Error initializing base class Service!" <<
endmsg;
82 error() <<
"Unable to locate IAddressCreator interface of "
83 <<
"EventPersistencySvc" <<
endmsg;
98 if ( svc && !db.
empty() ) {
105 ident +=
"OPT='READ' ";
107 status = svc->connect(
ident );
119 status = tup->item( itName, *item );
121 error() <<
"Item " << itName <<
" is not part of the collection:" <<
top <<
endmsg;
125 error() <<
"Cannot connect to collection:" <<
top <<
endmsg;
136 if ( !crit.
empty() && seltyp.
length() == 0 ) seltyp =
"NTuple::Selector";
139 if ( !crit.
empty() ) stmt->setCriteria( crit );
156 bool use_it = ( statement ) ? ( *statement )( tuple ) :
true;
157 if ( use_it ) {
return status; }
172 long* ip = (
long*)pAddr->
ipar();
179 bool use_it = ( statement ) ? ( *statement )( tuple ) :
true;
180 if ( use_it ) {
return status; }
234 auto ctxt = std::make_unique<MyContextType>();
237 error() <<
"Unable to connect Collection file \"" <<
m_database <<
"\"" <<
endmsg;
240 refpCtxt = ctxt.release();
253 for (
int i = 0; i < jump && sc.isSuccess(); ++i ) { sc =
getNextRecord( ctxt->
tuple ); }
289 error() <<
"Failed to access " << pA->
par()[0] <<
":" << pA->
par()[1] <<
" SvcTyp:" << long( pA->
svcType() )
StatusCode resetCriteria(const std::string &cr, Context &c) const override
Will set a new criteria for the selection of the next list of events and will change the state of the...
StatusCode finalize() override
Service override: Finalize Service.
Gaudi::Property< std::string > m_dbType
StatusCode initialize() override
virtual const std::string * par() const =0
Retrieve String parameters.
virtual StatusCode connectDataSource(const std::string &db, const std::string &typ) const
Connect collection's data source to selector.
std::string m_currentInput
SmartIF< INTupleSvc > m_tupleSvc
Reference to Tuple service.
IOpaqueAddress * addressBuffer
virtual long svcType() const =0
Retrieve service type.
EventCollectionContext(const EventCollectionSelector *pSelector)
Standard constructor.
Gaudi::Property< std::string > m_database
GenericAddress * m_pAddressBuffer
Gaudi::Property< std::string > m_itemName
EventCollectionContext(const EventCollectionContext &)=delete
No copy.
StatusCode next(Context &refCtxt) const override
Get next iteration item from the event loop context.
StatusCode finalize() override
StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&refpAddr) const override
Create new Opaque address corresponding to the current record.
StatusCode initialize() override
Service override: Initialize service.
StatusCode rewind(Context &refCtxt) const override
Rewind the dataset.
SmartIF< IAddressCreator > m_pAddrCreator
virtual StatusCode attachSelector(ISelectStatement *sel)=0
Attach selector.
const std::string & name() const override
Retrieve name of the service
virtual const CLID & clID() const =0
Retrieve class information from link.
const ValueType & value() const
NTuple::Item< IOpaqueAddress * > * item
StatusCode previous(Context &refCtxt) const override
Get previous iteration item from the event loop context.
virtual StatusCode getNextRecord(NTuple::Tuple *tuple) const
Read next record of the N-tuple.
StatusCode createContext(Context *&refpCtxt) const override
Create a new event loop context.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
ListName::const_iterator fileIterator()
~EventCollectionContext() override
Standard destructor.
void * identifier() const override
virtual StatusCode connectStatement(const std::string &typ, const std::string &crit, INTuple *tuple) const
Connect selection statement to refine data access.
virtual StatusCode connectCollection(MyContextType *ctxt) const
Connect collection to selector.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
virtual ISelectStatement * selector()=0
Access selector.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
constexpr static const auto SUCCESS
void setCurrentInput(const std::string &v)
virtual StatusCode getPreviousRecord(NTuple::Tuple *tuple) const
Read next record of the N-tuple.
unsigned long release() override
release reference to object
Abstract base class which allows the user to interact with the actual N tuple implementation.
#define DECLARE_COMPONENT(type)
Gaudi::Property< std::string > m_cntName
Definition of class EventCollectionSelector.
Gaudi::Property< std::string > m_dbSvc
void setCriteria(const std::string &crit)
void setFileIterator(ListName::const_iterator new_iter)
unsigned long addRef() override
Add reference to object.
Gaudi::Property< std::string > m_tupleSvcName
constexpr static const auto FAILURE
virtual StatusCode connectTuple(const std::string &nam, const std::string &itName, NTuple::Tuple *&tup, NTuple::Item< IOpaqueAddress * > *&item) const
Connect to existing N-tuple.
Gaudi::Property< std::string > m_criteria
StatusCode releaseContext(Context *&refCtxt) const override
Release existing event iteration context.
IRegistry * registry() const
Get pointer to Registry.
StatusCode last(Context &refCtxt) const override
Access last item in the iteration.
std::list< std::string > ListName
Gaudi::Property< std::string > m_statement
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator
Gaudi::Property< std::string > m_authentication
const std::string & currentInput() const
EventCollectionContext & operator=(const EventCollectionContext &)=delete
ListName::const_iterator m_fileIterator