22 #define GAUDISVC_TAGCOLLECTIONSVC_CPP
25 #include "GaudiKernel/SmartIF.h"
26 #include "GaudiKernel/AttribStringParser.h"
27 #include "GaudiKernel/DataObject.h"
28 #include "GaudiKernel/ObjectFactory.h"
29 #include "GaudiKernel/GenericAddress.h"
31 #include "GaudiKernel/IProperty.h"
32 #include "GaudiKernel/ISvcManager.h"
33 #include "GaudiKernel/ISvcLocator.h"
34 #include "GaudiKernel/IConversionSvc.h"
36 #include "GaudiKernel/MsgStream.h"
37 #include "GaudiKernel/Property.h"
76 std::vector<Prop> props;
77 long loc = ident.find(
" ");
78 std::string filename, auth, svc =
"DbCnvSvc";
79 logname = ident.substr(0,loc);
80 using Parser = Gaudi::Utils::AttribStringParser;
83 for (
auto attrib: Parser(ident.substr(loc + 1))) {
84 switch( ::
toupper(attrib.tag[0]) ) {
86 props.push_back(
Prop(
"Server", attrib.value));
90 filename = std::move(attrib.value);
93 switch( ::
toupper(attrib.value[0]) ) {
96 case 'W': typ =
'N';
break;
97 case 'U': typ =
'U';
break;
100 switch( ::
toupper(attrib.value[2]) ) {
101 case 'C': typ =
'R';
break;
103 default: typ =
'O';
break;
106 default: typ = 0;
break;
110 switch( ::
toupper(attrib.tag[1]) ) {
111 case 'V': svc = std::move(attrib.value);
break;
113 switch(::
toupper(attrib.value[0])) {
115 props.push_back(
Prop(
"ShareFiles", attrib.value));
122 switch(::
toupper(attrib.value[0])) {
124 svc =
"HbookCnv::ConvSvc";
127 props.push_back(
Prop(
"DbType", attrib.value));
128 svc =
"PoolDbCnvSvc";
131 props.push_back(
Prop(
"DbType", attrib.value));
137 props.push_back(
Prop(attrib.tag, attrib.value));
154 log <<
MSG::ERROR <<
"Cannot add " << ident <<
" invalid filename!" <<
endmsg;
160 const std::string& typ,
161 const std::vector<Prop>& props,
177 for ( std::vector<Prop>::const_iterator j = props.begin(); j != props.end(); j++) {
Definition of the MsgStream class used to transmit messages.
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
virtual StatusCode findObject(const std::string &fullPath, DataObject *&pObject)
Find object identified by its full path in the data store.
virtual StatusCode finalize()
DataSvc overrides: stop the service.
virtual StatusCode initialize()
DataSvc overrides: Initialize the service.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
std::string m_rootName
Name of root event.
virtual StatusCode setDataProvider(IDataProviderSvc *pService)=0
Set Data provider service.
Invalid root path object cannot be retrieved or stored.
IRegistry * registry() const
Get pointer to Registry.
virtual StatusCode sysInitialize()=0
Initialize Service.
Helper class to parse a string of format "type/name".
std::pair< std::string, std::string > Prop
Gaudi tag collection service definition.
virtual StatusCode finalize()
DataSvc overrides: stop the service.
#define DECLARE_COMPONENT(type)
virtual long repSvcType() const =0
Retrieve the class type of the data store the converter uses.
This class is used for returning status codes from appropriate routines.
virtual SmartIF< IService > & createService(const Gaudi::Utils::TypeNameString &nametype)=0
Creates and instance of a service type that has been declared beforehand and assigns it a name...
Requested interface is not available.
virtual StatusCode setProperty(const Property &p)=0
Set the property by property.
SimpleProperty< std::string > StringProperty
virtual const std::string & name() const
Retrieve name of the service.
virtual ~TagCollectionSvc()
Standard Destructor.
virtual unsigned long release()=0
Release Interface instance.
bool isValid() const
Allow for check if smart pointer is valid.
virtual StatusCode initialize()
DataSvc overrides: Initialize the service.
virtual StatusCode connect(const std::string &ident, std::string &logname)
Add file to list I/O list.
StatusCode attachTuple(const std::string &filename, const std::string &logname, const char typ, const long t)
Attach output/input file.
A DataObject is the base class of any identifiable object on any data store.
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
void toupper(std::string &s)
virtual StatusCode createService(const std::string &nam, const std::string &typ, const std::vector< Prop > &props, IConversionSvc *&pSvc)
Create conversion service.
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.
Connections m_connections
Container of connection points.