74 error() <<
"Error initializing base class Service!" <<
endmsg;
79 error() <<
"Unable to locate IAddressCreator interface of "
80 <<
"EventPersistencySvc" <<
endmsg;
95 if ( svc && !db.empty() ) {
96 std::string ident =
name() +
' ';
97 ident +=
"DATAFILE='" +
m_database.value().substr( 5 ) +
"' ";
99 ident +=
"SVC='" +
m_dbSvc +
"' ";
102 ident +=
"OPT='READ' ";
104 status = svc->connect( ident );
113 std::string top =
"/NTUPLES/" +
name() +
'/' + nam;
117 status = tup->
item( itName, *item );
119 error() <<
"Item " << itName <<
" is not part of the collection:" << top <<
endmsg;
122 error() <<
"Cannot connect to collection:" << top <<
endmsg;
131 std::string seltyp = typ;
132 if ( !seltyp.empty() || !crit.empty() ) {
133 if ( !crit.empty() && seltyp.length() == 0 ) seltyp =
"NTuple::Selector";
136 if ( !crit.empty() ) stmt->setCriteria( crit );
153 bool use_it = ( statement ) ? ( *statement )( tuple ) :
true;
154 if ( use_it ) {
return status; }
169 long* ip = (
long*)pAddr->
ipar();
176 bool use_it = ( statement ) ? ( *statement )( tuple ) :
true;
177 if ( use_it ) {
return status; }
219 auto ctxt = std::make_unique<MyContextType>();
225 refpCtxt = ctxt.release();
274 error() <<
"Failed to access " << pA->
par()[0] <<
":" << pA->
par()[1] <<
" SvcTyp:" << long( pA->
svcType() )
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
A DataObject is the base class of any identifiable object on any data store.
IRegistry * registry() const
Get pointer to Registry.
void setCriteria(const std::string &crit)
std::string m_currentInput
EventCollectionContext(const EventCollectionSelector *pSelector)
Standard constructor.
EventCollectionContext(const EventCollectionContext &)=delete
No copy.
void * identifier() const override
GenericAddress * m_pAddressBuffer
~EventCollectionContext() override
Standard destructor.
void setCurrentInput(const std::string &v)
void setFileIterator(ListName::const_iterator new_iter)
std::list< std::string > ListName
const std::string & currentInput() const
EventCollectionContext & operator=(const EventCollectionContext &)=delete
const EventCollectionSelector * m_pSelector
ListName::const_iterator fileIterator()
ListName::const_iterator m_fileIterator
std::optional< NTuple::Item< IOpaqueAddress * > > item
IOpaqueAddress * addressBuffer
Definition of class EventCollectionSelector.
StatusCode rewind(Context &refCtxt) const override
Rewind the dataset.
StatusCode previous(Context &refCtxt) const override
Get previous iteration item from the event loop context.
virtual StatusCode connectCollection(MyContextType *ctxt) const
Connect collection to selector.
virtual StatusCode connectDataSource(const std::string &db, const std::string &typ) const
Connect collection's data source to selector.
StatusCode createContext(Context *&refpCtxt) const override
Create a new event loop context.
Gaudi::Property< std::string > m_authentication
StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&refpAddr) const override
Create new Opaque address corresponding to the current record.
virtual StatusCode getPreviousRecord(NTuple::Tuple *tuple) const
Read next record of the N-tuple.
SmartIF< IAddressCreator > m_pAddrCreator
StatusCode releaseContext(Context *&refCtxt) const override
Release existing event iteration context.
StatusCode last(Context &refCtxt) const override
Access last item in the iteration.
Gaudi::Property< std::string > m_database
StatusCode initialize() override
Service override: Initialize service.
virtual StatusCode connectTuple(const std::string &nam, const std::string &itName, NTuple::Tuple *&tup, std::optional< NTuple::Item< IOpaqueAddress * > > &item) const
Connect to existing N-tuple.
Gaudi::Property< std::string > m_tupleSvcName
Gaudi::Property< std::string > m_itemName
Gaudi::Property< std::string > m_dbSvc
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...
Gaudi::Property< std::string > m_cntName
virtual StatusCode getNextRecord(NTuple::Tuple *tuple) const
Read next record of the N-tuple.
SmartIF< INTupleSvc > m_tupleSvc
Reference to Tuple service.
virtual StatusCode connectStatement(const std::string &typ, const std::string &crit, INTuple *tuple) const
Connect selection statement to refine data access.
Gaudi::Property< std::string > m_dbType
Gaudi::Property< std::string > m_statement
StatusCode finalize() override
Service override: Finalize Service.
Gaudi::Property< std::string > m_criteria
StatusCode next(Context &refCtxt) const override
Get next iteration item from the event loop context.
Generic Transient Address.
The Event Selector Interface.
NTuple interface class definition.
virtual StatusCode attachSelector(ISelectStatement *sel)=0
Attach selector.
virtual ISelectStatement * selector()=0
Access selector.
Opaque address interface definition.
virtual long svcType() const =0
Retrieve service type.
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
virtual const CLID & clID() const =0
Retrieve class information from link.
virtual const std::string * par() const =0
Retrieve String parameters.
The IRegistry represents the entry door to the environment any data object residing in a transient da...
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
A select statement can either contain.
virtual SmartIF< IService > & service(const Gaudi::Utils::TypeNameString &typeName, const bool createIf=true)=0
Returns a smart pointer to a service.
Class acting as a smart pointer holding a N tuple _Item.
Abstract base class which allows the user to interact with the actual N tuple implementation.
StatusCode item(const std::string &name, Item< TYPE > &result)
Locate a scalar Item of data to the N tuple type safe.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
StatusCode finalize() override
const std::string & name() const override
Retrieve name of the service.
StatusCode initialize() override
Small smart pointer class with automatic reference counting for IInterface.
This class is used for returning status codes from appropriate routines.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto SUCCESS
constexpr static const auto FAILURE