|
| virtual | ~WebdaqInfoSvc () noexcept override |
| virtual StatusCode initialize | ATLAS_NOT_THREAD_SAFE () override |
| virtual StatusCode | configure () override |
| virtual StatusCode | stop () override |
| virtual StatusCode | finalize () override |
| virtual void | handle (const Incident &incident) override |
| virtual bool | configure (const boost::property_tree::ptree &) override |
| virtual bool | prepareForRun (const boost::property_tree::ptree &) override |
| virtual bool | prepareWorker (const boost::property_tree::ptree &) override |
| virtual bool | finalizeWorker (const boost::property_tree::ptree &) override |
| virtual bool | finalize (const boost::property_tree::ptree &) override |
| virtual bool | registerObject (const std::string publishPath, std::shared_ptr< hltinterface::GenericHLTContainer > obj) override |
| virtual bool | releaseObject (const std::string fullName) override |
| | De-register an object.
|
| virtual bool | pullInfo (const std::string &, const std::string &) override |
| virtual bool | beginEvent (const boost::property_tree::ptree &) override |
| virtual bool | endEvent (const boost::property_tree::ptree &) override |
| virtual std::vector< std::shared_ptr< hltinterface::GenericHLTContainer > > | queryISRegistry (const std::string &) override |
| virtual void | get (const std::string &, THList &) override |
| virtual void | getUnsummed (const std::string &, std::map< std::string, std::vector< TObject * > > &) override |
| virtual void | clear (const std::string &) override |
| virtual void | reset (const std::string &) override |
| virtual bool | registerTObject (const std::string &, const std::string &, TObject *) override |
| virtual bool | discoverTObject (const std::string &, const std::string &, TObject *&) override |
| virtual bool | releaseTObject (const std::string &, const std::string &) override |
| virtual void | clearToRelease (const std::string &) override |
| virtual mutex_type & | getPublicationMutex () const override |
| | Producers are expected to hold m_pubMutex while mutating a registered container, and across the endEvent() call itself.
|
| virtual void | setModification (bool b) override |
Service that publishes IS objects via the webdaq REST API.
On initialize() the service installs itself as the hltinterface::IInfoRegister singleton and provides a default ContainerFactory. Producers (e.g. TrigLArNoiseBurstRecoAlg) keep using the hltinterface API unchanged: construct GenericHLTContainer objects via the factory, register through IInfoRegister and append values inside beginEvent / endEvent. endEvent takes a JSON snapshot of each container and a background thread ships the snapshots to the IS server via webdaq.
Only the IS half of the IInfoRegister interface is implemented, histograms are handled by WebdaqHistSvc.
Required environment variables:
- TDAQ_PARTITION : the partition to publish to
- TDAQ_WEBDAQ_BASE : protocol, hostname and, if required, port of the webdaq server to publish through (e.g. http://localhost:8080). Same variable used by WebdaqHistSvc.
- TDAQ_IS_SERVER : (optional) name of the IS server, default is taken from the ISServerName property
Definition at line 51 of file WebdaqInfoSvc.h.
| virtual mutex_type & WebdaqInfoSvc::getPublicationMutex |
( |
| ) |
const |
|
inlineoverridevirtual |
Producers are expected to hold m_pubMutex while mutating a registered container, and across the endEvent() call itself.
endEvent() serialises every registered container, because the IInfoRegister interface gives no way to tell which one the caller just finished writing.
TrigLArNoiseBurstRecoAlg is currently not using this mutex (note that this is currently not a problem since TrigLArNoiseBurstRecoAlg is the only producer we have). The reason is that MonSvcInfoService hands out the global OH mutex, and this would coupel IS publication with the OH one. In this new service we hand out our own, avoiding coupling IS to histogram operations.
- Todo
- Adopt this in TrigLArNoiseBurstRecoAlg, which still uses a private mutex, once the legacy service is retired. TrigExISPublishing already uses it. The mutex would become unnecessary overloading endEvent(ptree, fullName) in hltinterface, identifying the caller's object. Each producer would then touch only its own container and a private mutex would suffices. A cleaner alternative would be locking inside GenericHLTContainer. But this would require changing the accessors that are currently handing out raw references The hltinterface change should also drop const from getPublicationMutex(): returning a non-const reference from a const method forces the workaround below.
Definition at line 115 of file WebdaqInfoSvc.h.
115 {
116
118 return mtx;
119 }
#define ATLAS_THREAD_SAFE
std::mutex m_pubMutex
Publication mutex handed out by getPublicationMutex().