43 return m_currentInput;
52 return (
void*)m_pSelector;
58 return m_fileIterator;
61 { m_fileIterator = new_iter; }
69 : m_pSelector(pSelector)
104 log <<
MSG::ERROR <<
"Unable to locate IAddressCreator interface of " <<
"EventPersistencySvc" <<
endmsg;
120 if ( svc.
isValid( ) && db.length() > 0 ) {
121 std::string ident =
name() +
' ';
124 ident +=
"SVC='" +
m_dbSvc +
"' ";
127 ident +=
"OPT='READ' ";
131 status = svc->connect(ident);
139 std::string top =
"/NTUPLES/" +
name() +
'/' + nam;
143 status = tup->item(itName, *item);
144 if ( status.isSuccess() ) {
149 log <<
MSG::ERROR <<
"Item " << itName <<
" is not part of the collection:" << top <<
endmsg;
165 std::string seltyp = typ;
166 if ( seltyp.length() > 0 || crit.length() > 0 ) {
167 if ( crit.length() > 0 && seltyp.length() == 0 ) seltyp =
"NTuple::Selector";
170 if ( crit.length() > 0 ) stmt->setCriteria(crit);
187 bool use_it = (statement) ? (*statement)(tuple) :
true;
205 long* ip = (
long*)pAddr->
ipar();
212 bool use_it = (statement) ? (*statement)(tuple) :
true;
268 refpCtxt = ctxt.release();
276 return next(refCtxt, 1);
287 for (
int i=0;
i<jump &&
sc.isSuccess(); ++
i ) {
310 for (
int i=0;
i<jump &&
sc.isSuccess(); ++
i ) {
346 <<
":" << pA->
par()[1]
347 <<
" SvcTyp:" << long(pA->
svcType())
348 <<
" CLID:" << pA->
clID()
SmartIF< INTupleSvc > m_tupleSvc
Reference to Tuple service.
virtual const std::string * par() const =0
Retrieve String parameters.
Definition of the MsgStream class used to transmit messages.
virtual void * identifier() const
Small smart pointer class with automatic reference counting for IInterface.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
virtual StatusCode getNextRecord(NTuple::Tuple *tuple) const
Read next record of the N-tuple.
A select statement can either contain.
virtual unsigned long addRef()
Add reference to object.
EventCollectionContext(const EventCollectionSelector *pSelector)
Standard constructor.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
The Event Selector Interface.
virtual ~EventCollectionContext()
Standard destructor.
bool isSuccess() const
Test for a status code of SUCCESS.
virtual StatusCode releaseContext(Context *&refCtxt) const
Release existing event iteration context.
virtual StatusCode connectDataSource(const std::string &db, const std::string &typ) const
Connect collection's data source to selector.
virtual StatusCode resetCriteria(const std::string &cr, Context &c) const
Will set a new criteria for the selection of the next list of events and will change the state of the...
std::string m_criteria
Criteria.
virtual StatusCode initialize()
Service override: Initialize service.
Generic Transient Address.
virtual StatusCode previous(Context &refCtxt) const
Get previous iteration item from the event loop context.
virtual ISelectStatement * selector()=0
Access selector.
virtual long svcType() const =0
Retrieve service type.
virtual StatusCode createContext(Context *&refpCtxt) const
Create a new event loop context.
GenericAddress * m_pAddressBuffer
virtual StatusCode finalize()
Service override: Finalize Service.
IRegistry * registry() const
Get pointer to Registry.
MsgStream & err() const
shortcut for the method msgStream(MSG::ERROR)
#define DECLARE_COMPONENT(type)
NTuple interface class definition.
std::string m_tupleSvcName
Name of the event collection service name.
std::string m_cntName
Container name.
ListName::const_iterator fileIterator()
virtual unsigned long release()
release reference to object
const std::string & currentInput() const
bool isValid() const
Allow for check if smart pointer is valid.
virtual const CLID & clID() const =0
Retrieve class information from link.
virtual StatusCode createAddress(const Context &refCtxt, IOpaqueAddress *&refpAddr) const
Create new Opaque address corresponding to the current record.
This class is used for returning status codes from appropriate routines.
std::string m_itemName
Item name.
void setFileIterator(ListName::const_iterator new_iter)
The IRegistry represents the entry door to the environment any data object residing in a transient da...
virtual StatusCode last(Context &refCtxt) const
Access last item in the iteration.
virtual IOpaqueAddress * address() const =0
Retrieve opaque storage address.
std::string m_dbType
Database type identifier.
virtual const std::string & name() const
Retrieve name of the service.
Abstract base class which allows the user to interact with the actual N tuple implementation.
void setCurrentInput(const std::string &v)
std::string m_dbSvc
Database service (exclusive property with db type)
const EventCollectionSelector * m_pSelector
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
std::string m_database
Datafile name.
virtual StatusCode getPreviousRecord(NTuple::Tuple *tuple) const
Read next record of the N-tuple.
Definition of class EventCollectionSelector.
Templated class to add the standard messaging functionalities.
NTuple::Item< IOpaqueAddress * > * item
IOpaqueAddress * addressBuffer
virtual ~EventCollectionSelector()
Standard Destructor.
virtual StatusCode next(Context &refCtxt) const
Get next iteration item from the event loop context.
virtual StatusCode rewind(Context &refCtxt) const
Rewind the dataset.
virtual StatusCode connectTuple(const std::string &nam, const std::string &itName, NTuple::Tuple *&tup, NTuple::Item< IOpaqueAddress * > *&item) const
Connect to existing N-tuple.
std::list< std::string > ListName
std::string m_authentication
Authentication string (if needed)
EventCollectionSelector(const std::string &name, ISvcLocator *svcloc)
Standard Constructor.
Opaque address interface definition.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
SmartIF< IAddressCreator > m_pAddrCreator
virtual StatusCode attachSelector(ISelectStatement *sel)=0
Attach selector.
std::string m_currentInput
virtual StatusCode connectCollection(MyContextType *ctxt) const
Connect collection to selector.
ListName::const_iterator m_fileIterator
A DataObject is the base class of any identifiable object on any data store.
virtual const unsigned long * ipar() const =0
Access to generic link parameters.
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
void setCriteria(const std::string &crit)
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
std::string m_statement
Selector name.
virtual StatusCode connectStatement(const std::string &typ, const std::string &crit, INTuple *tuple) const
Connect selection statement to refine data access.