1 #define DETECTORDATASVC_DETDATASVC_CPP
16 #define ON_DEBUG if (UNLIKELY(outputLevel() <= MSG::DEBUG))
17 #define ON_VERBOSE if (UNLIKELY(outputLevel() <= MSG::VERBOSE))
19 #define DEBMSG ON_DEBUG debug()
20 #define VERMSG ON_VERBOSE verbose()
35 error() <<
"Unable to retrieve " << m_persistencySvcName <<
endmsg;
39 sc = setDataLoader(cnv_svc);
41 error() <<
"Unable to set DataLoader" <<
endmsg;
46 m_addrCreator = cnv_svc;
47 if (
UNLIKELY(!m_addrCreator.isValid()) ) {
48 error() <<
"Unable to get AddressCreator." <<
endmsg;
52 return setupDetectorDescription();
59 debug() <<
"Setting DetectorDataSvc root node... " <<
endmsg;
77 error() <<
"Detector data location name not set. Detector data will "
83 unsigned long iargs[]={0,0};
94 error() <<
"Unable to set detector data store root" <<
endmsg;
99 error() <<
"Unable to create address for /dd" <<
endmsg;
107 info() <<
"Detector description not requested to be loaded" <<
endmsg;
159 unsigned long iargs[] = {0,0};
172 error() <<
"Unable to set detector data store root" <<
endmsg;
175 error() <<
"Unable to create address for /dd" <<
endmsg;
234 if ( 0 == toUpdate ) {
235 error() <<
"There is no DataObject to update" <<
endmsg;
241 if ( 0 == condition ) {
243 <<
"Cannot update DataObject: DataObject does not implement IValidity"
251 <<
"Cannot update DataObject: event time undefined"
258 DEBMSG <<
"DataObject is valid: no need to update" <<
endmsg;
267 DEBMSG <<
"Delegate update to relevant conversion service" <<
endmsg;
270 error() <<
"Could not update DataObject" <<
endmsg;
277 condition =
dynamic_cast<IValidity*
>(toUpdate);
278 if ( 0 == condition ) {
279 error() <<
"Updated DataObject does not implement IValidity" <<
endmsg;
284 error() <<
"Updated DataObject is not valid" <<
endmsg;
285 error() <<
"Are you sure the conversion service has updated it?" <<
endmsg;
290 DEBMSG <<
"Method updateObject exiting successfully" <<
endmsg;
GAUDI_API std::string getEnv(const char *var)
get a particular environment variable (returning "UNKNOWN" if not set)
virtual StatusCode setDataLoader(IConversionSvc *svc)
IDataManagerSvc: IDataManagerSvc: Pass a default data loader to the service.
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...
const std::string & type() const
Access to the incident type.
virtual void handle(const Incident &)
Inform that a new incident has occured.
const std::string & source() const
Access to the source of the incident.
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
No data loader available.
std::string m_rootName
Name of root event.
virtual StatusCode updateObject(IRegistry *pDirectory)
Update object identified by its directory entry.
MsgStream & warning() const
shortcut for the method msgStream(MSG::WARNING)
MsgStream & always() const
shortcut for the method msgStream(MSG::ALWAYS)
virtual StatusCode i_setRoot(const std::string &root_name, DataObject *pRootObj)
Initialize data store for new event by giving new event path and root object.
std::string m_persistencySvcName
Name of the persistency service.
bool isFailure() const
Test for a status code of FAILURE.
virtual bool validEventTime() const
Check if the event time has been set.
#define DECLARE_COMPONENT(type)
StatusCode setupDetectorDescription()
Deal with Detector Description initialization.
bool isValid() const
Allow for check if smart pointer is valid.
MsgStream & debug() const
shortcut for the method msgStream(MSG::DEBUG)
This class is used for returning status codes from appropriate routines.
virtual StatusCode finalize()
Finalize the service.
SmartIF< IAddressCreator > m_addrCreator
Address Creator to be used.
int m_detStorageType
Detector Data Persistency Storage type.
virtual const Gaudi::Time & eventTime() const
Get the event time.
DetDataSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
virtual bool isValid() const =0
Check if the object is valid (it can be always invalid).
virtual Gaudi::StateMachine::State FSMState() const
Get the current state.
virtual void setEventTime(const Gaudi::Time &time)
Set the new event time.
virtual const std::string & name() const
Retrieve name of the service.
virtual StatusCode initialize()
Service initialization.
GAUDI_API bool isEnvSet(const char *var)
Check if an environment variable is set or not.
const long XML_StorageType
virtual StatusCode clearStore()
Remove all data objects in the data store.
virtual StatusCode updateObject(DataObject *toUpdate)
Update object.
std::string m_detDbRootName
Name of the root node of the detector.
virtual StatusCode clearStore()
IDataManagerSvc: Remove all data objects in the data store.
Gaudi::Time m_eventTime
Current event time.
virtual StatusCode reinitialize()
Initialize the service.
std::string m_detDbLocation
Location of detector Db (filename,URL)
Base class for all Incidents (computing events).
Object pointer is invalid.
Templated class to add the standard messaging functionalities.
Interface for objects with a validity.
CLID m_rootCLID
Integer Property corresponding to CLID of root entry.
Opaque address interface definition.
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
A DataObject is the base class of any identifiable object on any data store.
virtual ~DetDataSvc()
Standard Destructor.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
virtual StatusCode finalize()
Service initialization.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
bool m_usePersistency
Flag to control if the persistency is required.