13 #define GAUDISVC_EVENTSELECTOR_EVENTSELECTORDATASTREAM_CPP 1
15 #include "GaudiKernel/AttribStringParser.h"
16 #include "GaudiKernel/IService.h"
17 #include "GaudiKernel/ISvcLocator.h"
18 #include "GaudiKernel/IConversionSvc.h"
19 #include "GaudiKernel/IDataManagerSvc.h"
20 #include "GaudiKernel/IPersistencySvc.h"
21 #include "GaudiKernel/PropertyMgr.h"
22 #include "GaudiKernel/MsgStream.h"
23 #include "GaudiKernel/EventSelectorDataStream.h"
57 if ( 0 != pSelector ) pSelector->
addRef();
65 if ( (*i).name() == nam ) {
75 if ( (*i).name() == nam ) {
85 std::string auth, dbtyp, collsvc,
item, crit,
sel, svc, stmt;
86 std::string cnt =
"/Event";
87 std::string db =
"<Unknown>";
90 if( !eds.isValid() ) {
91 std::cout <<
"ERROR: Unable to localize interface IDataManagerSvc from service EventDataSvc"
96 cnt = eds->rootName();
101 using Parser = Gaudi::Utils::AttribStringParser;
104 switch( ::
toupper(attrib.tag[0]) ) {
106 auth = std::move(attrib.value);
113 hash = attrib.value.find(
'#');
115 cnt = attrib.value.substr(0, hash);
116 item = attrib.value.substr(hash + 1);
119 cnt = std::move(attrib.value);
128 switch( ::
toupper(attrib.tag[1]) ) {
134 stmt = std::move(attrib.value);
146 switch( ::
toupper(attrib.tag[1]) ) {
148 dbtyp = std::move(attrib.value);
155 switch( ::
toupper(attrib.tag[1]) ) {
157 sel = std::move(attrib.value);
160 svc = std::move(attrib.value);
176 else if ( dbtyp.substr(0,4) ==
"POOL" ) {
179 else if ( svc.empty() ) {
186 if ( svc.length() == 0 && dbtyp.length() != 0 ) {
188 if ( ipers.isValid() ) {
190 status = ipers->getService(dbtyp, icnvSvc);
209 if ( !isData && !collsvc.empty() ) {
Definition of the MsgStream class used to transmit messages.
bool m_initialized
Initialization state.
const std::string & name() const
Retrieve stream name.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
MsgStream & operator<<(MsgStream &s, const EventSelectorDataStream &obj)
Output friend for MsgStream.
Properties * m_properties
Properties vector.
The Event Selector Interface.
bool isSuccess() const
Test for a status code of SUCCESS.
std::string m_criteria
Criteria.
std::string m_selectorType
Event selector type.
StringProperty * property(const std::string &nam)
Allow access to individual properties by name.
virtual const std::string & name() const =0
Retrieve the name of the instance.
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
virtual StatusCode initialize()
Parse input criteria.
ISvcLocator * m_pSvcLocator
Reference to service locator.
std::vector< StringProperty > Properties
General service interface definition.
This class is used for returning status codes from appropriate routines.
virtual StatusCode finalize()
Finalize stream and release resources.
IEvtSelector * m_pSelector
Pointer to valid selector.
SimpleProperty< std::string > StringProperty
std::string m_definition
Definition string.
const std::string & definition() const
Retrieve definition string.
EventSelectorDataStream(const std::string &nam, const std::string &def, ISvcLocator *svcloc)
Standard Constructor.
virtual unsigned long release()=0
Release Interface instance.
Definition of class EventSelectorDataStream.
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
virtual ~EventSelectorDataStream()
Standard Destructor.
std::string m_dbName
String with name of the db as parsed.
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
void toupper(std::string &s)
virtual void setSelector(IEvtSelector *pSelector)
Attach event selector object.
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.