ATLAS Offline Software
Loading...
Searching...
No Matches
IOVSvcTool Class Reference

#include <IOVSvcTool.h>

Inheritance diagram for IOVSvcTool:

Public Member Functions

 IOVSvcTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode initialize () override
virtual StatusCode reinitialize () override
virtual void handle (const Incident &) override
virtual void setStoreName (const std::string &storeName) override
virtual const std::string & getStoreName () const override
virtual StatusCode regFcn (SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger=false) override
virtual StatusCode regFcn (const CallBackID &c1, const CallBackID &c2, const IOVSvcCallBackFcn &fcn2, bool trigger=false) override
virtual StatusCode regFcn (const IAlgTool *ia, const CallBackID &c2, const IOVSvcCallBackFcn &fcn2, bool trigger=false) override
virtual StatusCode setRange (const CLID &clid, const std::string &key, IOVRange &) override
virtual StatusCode getRange (const CLID &clid, const std::string &key, IOVRange &iov) const override
virtual StatusCode regProxy (SG::DataProxy *proxy, const std::string &key) override
 Register a DataProxy with the service.
virtual StatusCode regProxy (const CLID &clid, const std::string &key) override
 Register a DataProxy with the service.
virtual StatusCode deregProxy (SG::DataProxy *proxy) override
 Deregister a DataProxy with the service.
virtual StatusCode deregProxy (const CLID &clid, const std::string &key) override
 Deregister a DataProxy with the service.
virtual StatusCode replaceProxy (SG::DataProxy *pOld, SG::DataProxy *pNew) override
 replace a registered DataProxy with a new version
virtual StatusCode getRangeFromDB (const CLID &clid, const std::string &key, IOVRange &range, std::string &tag, std::unique_ptr< IOpaqueAddress > &ioa, const IOVTime &curTime) const override
virtual StatusCode getRangeFromDB (const CLID &clid, const std::string &key, const IOVTime &time, IOVRange &range, std::string &tag, std::unique_ptr< IOpaqueAddress > &ioa) const override
virtual StatusCode setRangeInDB (const CLID &clid, const std::string &key, const IOVRange &range, const std::string &tag) override
virtual StatusCode preLoadTAD (const SG::TransientAddress *) override
 add to a set of TADs that will be registered at start of first event
virtual StatusCode preLoadDataTAD (const SG::TransientAddress *) override
 add to a set of TADs that who's data will be preLoaded
virtual StatusCode getTriggeredTools (const std::string &key, std::set< std::string > &tools) override
virtual bool holdsProxy (SG::DataProxy *proxy) const override
virtual bool holdsProxy (const CLID &clid, const std::string &key) const override
virtual bool holdsCallback (const CallBackID &) const override
virtual bool holdsAlgTool (const IAlgTool *ia) const override
virtual void resetAllProxies () override
virtual void ignoreProxy (const CLID &clid, const std::string &key) override
virtual void ignoreProxy (SG::DataProxy *proxy) override
virtual ~IOVSvcTool ()

Private Types

typedef IOVSvcCallBackFcn BFCN
typedef std::multimap< constSG::DataProxy *, BFCN * >::iterator pmITR
typedef std::multimap< BFCN *, constSG::DataProxy * >::iterator fnITR
typedef std::multiset< IOVEntry *, IOVEntry::IOVEntryStartCritereonstartSet
typedef std::multiset< IOVEntry *, IOVEntry::IOVEntryStopCritereonstopSet
typedef startSet::iterator startITR
typedef stopSet::iterator stopITR
typedef std::map< const void *, std::set< CallBackID > * > ObjMap
typedef std::tuple< CLID, std::string > TADkey_t

Private Member Functions

StatusCode preLoadProxies (const EventContext &ctx)
StatusCode preLoadData ()
StatusCode triggerCallback (IOVSvcCallBackFcn *, const std::string &key)
StatusCode triggerCallback (const SG::DataProxy *, const std::string &key)
std::string fullProxyName (const SG::TransientAddress *) const
std::string fullProxyName (const SG::DataProxy *) const
std::string fullProxyName (const CLID &, const std::string &) const
void setRange_impl (SG::DataProxy *proxy, IOVRange &iovr)
TADkey_t TADkey (const SG::DataProxy &p)
TADkey_t TADkey (const SG::TransientAddress &t)
void scanStartSet (startSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const
void scanStopSet (stopSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const
void PrintStartSet () const
void PrintStopSet () const
void PrintProxyMap () const
void PrintProxyMap (const SG::DataProxy *) const

Private Attributes

std::string m_storeName
ServiceHandle< StoreGateSvcp_cndSvc
ServiceHandle< IIncidentSvc > p_incSvc
ServiceHandle< IProxyProviderSvcp_PPSvc
ServiceHandle< IClassIDSvc > p_CLIDSvc
ServiceHandle< IToolSvc > p_toolSvc
std::map< const SG::DataProxy *, std::string > m_names
std::recursive_mutex m_handleMutex ATLAS_THREAD_SAFE
std::set< SG::DataProxy *, SortDPptrm_proxies
std::multimap< const SG::DataProxy *, BFCN * > m_proxyMap
std::multimap< BFCN *, const SG::DataProxy * > m_bfcnMap
std::set< SG::DataProxy * > m_ignoredProxies
std::set< std::pair< CLID, std::string > > m_ignoredProxyNames
std::map< BFCN *, CallBackIDm_fcnMap
std::map< CallBackID, BFCN * > m_cbidMap
ObjMap m_objMap
std::map< const SG::DataProxy *, IOVEntry * > m_entries
startSetp_startSet {nullptr}
stopSetp_stopSet {nullptr}
startSet m_startSet_Clock
startSet m_startSet_RE
stopSet m_stopSet_Clock
stopSet m_stopSet_RE
CBTreem_trigTree {nullptr}
std::set< const SG::TransientAddress *, SortTADptrm_preLoad
std::set< TADkey_tm_partPreLoad
std::atomic< bool > m_first {true}
bool m_checkOnce {false}
bool m_triggered {false}
bool m_firstEventOfRun {false}
bool m_resetAllCallbacks {false}
std::string m_checkTrigger
Gaudi::Property< bool > m_preLoadRanges {this, "preLoadRanges", false}
Gaudi::Property< bool > m_preLoadData {this, "preLoadData", false}
Gaudi::Property< bool > m_partialPreLoadData {this, "partialPreLoadData", true}
Gaudi::Property< bool > m_preLoadExtensibleFolders {this, "preLoadExtensibleFolders", true}
Gaudi::Property< bool > m_sortKeys {this, "sortKeys", true}
Gaudi::Property< bool > m_forceReset {this, "forceResetAtBeginRun", false}
Gaudi::Property< std::string > m_updateInterval {this, "updateInterval", "Event"}

Detailed Description

Definition at line 70 of file IOVSvcTool.h.

Member Typedef Documentation

◆ BFCN

Definition at line 193 of file IOVSvcTool.h.

◆ fnITR

typedef std::multimap<BFCN*,constSG::DataProxy*>::iterator IOVSvcTool::fnITR
private

Definition at line 195 of file IOVSvcTool.h.

◆ ObjMap

typedef std::map<const void*, std::set<CallBackID>* > IOVSvcTool::ObjMap
private

Definition at line 222 of file IOVSvcTool.h.

◆ pmITR

typedef std::multimap<constSG::DataProxy*,BFCN*>::iterator IOVSvcTool::pmITR
private

Definition at line 194 of file IOVSvcTool.h.

◆ startITR

typedef startSet::iterator IOVSvcTool::startITR
private

Definition at line 198 of file IOVSvcTool.h.

◆ startSet

Definition at line 196 of file IOVSvcTool.h.

◆ stopITR

typedef stopSet::iterator IOVSvcTool::stopITR
private

Definition at line 199 of file IOVSvcTool.h.

◆ stopSet

Definition at line 197 of file IOVSvcTool.h.

◆ TADkey_t

typedef std::tuple<CLID, std::string> IOVSvcTool::TADkey_t
private

Definition at line 237 of file IOVSvcTool.h.

Constructor & Destructor Documentation

◆ IOVSvcTool()

IOVSvcTool::IOVSvcTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 103 of file IOVSvcTool.cxx.

104 :
105 base_class( type, name, parent ),
106 m_storeName("StoreGateSvc"),
107 p_cndSvc("DetectorStore",name),
108 p_incSvc("IncidentSvc",name), p_PPSvc("ProxyProviderSvc",name),
109 p_CLIDSvc("ClassIDSvc",name), p_toolSvc("ToolSvc",name),
110 p_startSet(nullptr),
111 p_stopSet(nullptr)
112{
113 m_trigTree = new CBTree();
114}
ServiceHandle< IClassIDSvc > p_CLIDSvc
Definition IOVSvcTool.h:188
std::string m_storeName
Definition IOVSvcTool.h:183
startSet * p_startSet
Definition IOVSvcTool.h:227
ServiceHandle< IProxyProviderSvc > p_PPSvc
Definition IOVSvcTool.h:187
stopSet * p_stopSet
Definition IOVSvcTool.h:228
CBTree * m_trigTree
Definition IOVSvcTool.h:233
ServiceHandle< IToolSvc > p_toolSvc
Definition IOVSvcTool.h:189
ServiceHandle< StoreGateSvc > p_cndSvc
Definition IOVSvcTool.h:185
ServiceHandle< IIncidentSvc > p_incSvc
Definition IOVSvcTool.h:186

◆ ~IOVSvcTool()

IOVSvcTool::~IOVSvcTool ( )
virtual

Definition at line 118 of file IOVSvcTool.cxx.

118 {
119
120 // cleanup
121
122 std::map<const DataProxy*, IOVEntry*>::iterator itr;
123 for (itr = m_entries.begin(); itr != m_entries.end(); ++itr) {
124 IOVEntry *ent = itr->second;
125 delete (ent);
126 }
127
128 ObjMap::iterator oitr;
129 for (oitr = m_objMap.begin(); oitr != m_objMap.end(); ++oitr) {
130 delete ( oitr->second );
131 }
132
133 for (std::map<CallBackID, BFCN*>::iterator i = m_cbidMap.begin();
134 i != m_cbidMap.end();
135 ++i)
136 {
137 delete i->second;
138 }
139
140 std::set< const TransientAddress*, SortTADptr >::const_iterator titr;
141 for (titr = m_preLoad.begin(); titr != m_preLoad.end(); ++titr)
142 {
143 delete *titr;
144 }
145
146 delete m_trigTree;
147
148}
ObjMap m_objMap
Definition IOVSvcTool.h:223
std::map< CallBackID, BFCN * > m_cbidMap
Definition IOVSvcTool.h:220
std::set< const SG::TransientAddress *, SortTADptr > m_preLoad
Definition IOVSvcTool.h:235
std::map< const SG::DataProxy *, IOVEntry * > m_entries
Definition IOVSvcTool.h:225

Member Function Documentation

◆ deregProxy() [1/2]

StatusCode IOVSvcTool::deregProxy ( const CLID & clid,
const std::string & key )
overridevirtual

Deregister a DataProxy with the service.

Definition at line 704 of file IOVSvcTool.cxx.

704 {
705
706 DataProxy* proxy = p_cndSvc->proxy(clid,key);
707
708 if (proxy == nullptr) {
709 ATH_MSG_ERROR("regProxy could not retrieve proxy "
710 << fullProxyName(clid,key) << " from store");
711 return StatusCode::FAILURE;
712 }
713
714 return ( deregProxy(proxy) );
715
716}
#define ATH_MSG_ERROR(x)
std::string fullProxyName(const SG::TransientAddress *) const
virtual StatusCode deregProxy(SG::DataProxy *proxy) override
Deregister a DataProxy with the service.

◆ deregProxy() [2/2]

StatusCode IOVSvcTool::deregProxy ( SG::DataProxy * proxy)
overridevirtual

Deregister a DataProxy with the service.

Definition at line 584 of file IOVSvcTool.cxx.

584 {
585
586
587 if (proxy == nullptr) {
588 ATH_MSG_ERROR("proxy == 0");
589 return StatusCode::FAILURE;
590 }
591
592 ATH_MSG_DEBUG("removing proxy " << fullProxyName(proxy) << " at " << proxy);
593
594 std::set<SG::DataProxy*, SortDPptr>::iterator itr = m_proxies.find(proxy);
595 if (itr == m_proxies.end()) {
596 ATH_MSG_DEBUG("Proxy for " << fullProxyName(proxy)
597 << " not registered: " << proxy->name());
598 return StatusCode::SUCCESS;
599 }
600
601 m_proxies.erase( itr );
602
603 m_trigTree->delNode(proxy);
604
605 return StatusCode::SUCCESS;
606
607}
#define ATH_MSG_DEBUG(x)
std::set< SG::DataProxy *, SortDPptr > m_proxies
Definition IOVSvcTool.h:212

◆ fullProxyName() [1/3]

std::string IOVSvcTool::fullProxyName ( const CLID & clid,
const std::string & key ) const
private

Definition at line 1608 of file IOVSvcTool.cxx.

1608 {
1609
1610 std::string fullname, tname;
1611 if (p_CLIDSvc->getTypeNameOfID( clid, tname ).isFailure()) {
1612 fullname = "[";
1613 fullname += std::to_string(clid);
1614 fullname += '/';
1615 fullname += key;
1616 fullname += ']';
1617 } else {
1618 fullname = "[";
1619 fullname += tname;
1620 fullname += ':';
1621 fullname += std::to_string(clid);
1622 fullname += '/';
1623 fullname += key;
1624 fullname += ']';
1625 }
1626
1627 return fullname;
1628}

◆ fullProxyName() [2/3]

std::string IOVSvcTool::fullProxyName ( const SG::DataProxy * dp) const
private

Definition at line 1601 of file IOVSvcTool.cxx.

1601 {
1602 return fullProxyName(dp->clID(), dp->name());
1603}

◆ fullProxyName() [3/3]

std::string IOVSvcTool::fullProxyName ( const SG::TransientAddress * tad) const
private

Definition at line 1592 of file IOVSvcTool.cxx.

1592 {
1593
1594 return fullProxyName(tad->clID(), tad->name());
1595
1596}
CLID clID() const
Retrieve string key:
const std::string & name() const
Get the primary (hashed) SG key.

◆ getRange()

StatusCode IOVSvcTool::getRange ( const CLID & clid,
const std::string & key,
IOVRange & iov ) const
overridevirtual

Definition at line 862 of file IOVSvcTool.cxx.

863 {
864
865 DataProxy* dp = p_cndSvc->proxy(clid,key);
866
867 std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
868 std::map<const DataProxy*,IOVEntry*>::const_iterator itr(m_entries.find(dp));
869 if (itr == m_entries.end()) {
870 return StatusCode::FAILURE;
871 }
872
873 iov = *(itr->second->range());
874
875 return StatusCode::SUCCESS;
876
877}

◆ getRangeFromDB() [1/2]

StatusCode IOVSvcTool::getRangeFromDB ( const CLID & clid,
const std::string & key,
const IOVTime & time,
IOVRange & range,
std::string & tag,
std::unique_ptr< IOpaqueAddress > & ioa ) const
overridevirtual

Definition at line 899 of file IOVSvcTool.cxx.

902 {
903 StatusCode sc(StatusCode::FAILURE);
904 DataProxy* dp = p_cndSvc->proxy(clid,key);
905 if (nullptr != dp) {
906 IIOVDbSvc *idb =
907 dynamic_cast<IIOVDbSvc*>(dp->provider());
908 if (idb != nullptr) {
909 sc = idb->getRange(clid, key, time, range, tag, ioa);
910 } else {
911 ATH_MSG_ERROR("Provider is not an IIOVDbSvc");
912 }
913 } else {
914 ATH_MSG_ERROR("No proxy found for clid " << clid << " key " << key);
915 }
916 return sc;
917}
static Double_t sc
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ getRangeFromDB() [2/2]

StatusCode IOVSvcTool::getRangeFromDB ( const CLID & clid,
const std::string & key,
IOVRange & range,
std::string & tag,
std::unique_ptr< IOpaqueAddress > & ioa,
const IOVTime & curTime ) const
overridevirtual

Definition at line 882 of file IOVSvcTool.cxx.

885 {
886
887 if (curTime.isValid()) {
888 return getRangeFromDB(clid, key, curTime, range, tag, ioa);
889 } else {
890 ATH_MSG_ERROR("Current Event not defined");
891 return StatusCode::FAILURE;
892 }
893
894}
virtual StatusCode getRangeFromDB(const CLID &clid, const std::string &key, IOVRange &range, std::string &tag, std::unique_ptr< IOpaqueAddress > &ioa, const IOVTime &curTime) const override
bool isValid() const noexcept
Definition IOVTime.cxx:117

◆ getStoreName()

virtual const std::string & IOVSvcTool::getStoreName ( ) const
inlineoverridevirtual

Definition at line 91 of file IOVSvcTool.h.

91{ return m_storeName; }

◆ getTriggeredTools()

StatusCode IOVSvcTool::getTriggeredTools ( const std::string & key,
std::set< std::string > & tools )
overridevirtual

Definition at line 1431 of file IOVSvcTool.cxx.

1432 {
1433
1434 bool match = false;
1435 for (pmITR pitr=m_proxyMap.begin(); pitr != m_proxyMap.end(); ++pitr) {
1436 if (key == pitr->first->name()) {
1437 tools.insert( m_fcnMap[pitr->second].objName() );
1438 match = true;
1439 }
1440 }
1441
1442 return ( (match) ? StatusCode::SUCCESS : StatusCode::FAILURE );
1443}
std::multimap< constSG::DataProxy *, BFCN * >::iterator pmITR
Definition IOVSvcTool.h:194
std::map< BFCN *, CallBackID > m_fcnMap
Definition IOVSvcTool.h:219
std::multimap< const SG::DataProxy *, BFCN * > m_proxyMap
Definition IOVSvcTool.h:213
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:357

◆ handle()

void IOVSvcTool::handle ( const Incident & inc)
overridevirtual

Trigger Callback functions

Clear trigger tree

On reinitialize, one sets a flag to force reset of all callbacks. After executing the callbacks, reset flag and return - no proxies reset and don't need to read in new ranges

Read in the next set of IOVRanges

Definition at line 220 of file IOVSvcTool.cxx.

220 {
221
222 bool initial_first = m_first;
223
224 // Don't bother doing anything if we're handled the first run, and
225 // preLoadData has been set, or if we only want to check once at the
226 // beginning of the job
227 if (!initial_first && m_preLoadData && m_checkOnce) {
228 return;
229 }
230 else if (!initial_first) {
231 if ( inc.type() != m_checkTrigger && inc.type() != IncidentType::BeginRun ) {
232 return;
233 }
234 }
235
236 std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
237 if (initial_first) {
238 if (!m_first && m_preLoadData && m_checkOnce) {
239 return;
240 }
241 // cppcheck-suppress oppositeInnerCondition
242 else if (!m_first) {
243 if ( inc.type() != m_checkTrigger && inc.type() != IncidentType::BeginRun ) {
244 return;
245 }
246 }
247 // cppcheck-suppress identicalInnerCondition
248 if (m_first) {
249 for (const auto& e : m_ignoredProxyNames) {
250 DataProxy* proxy = p_cndSvc->proxy(e.first,e.second);
251 ATH_MSG_DEBUG("retrieving "<<fullProxyName(e.first,e.second));
252 if (proxy == nullptr) {
253 ATH_MSG_ERROR("ignoreProxy: could not retrieve proxy "
254 << fullProxyName(e.first,e.second) << " from store");
255 } else {
256 ignoreProxy( proxy );
257 ATH_MSG_DEBUG("will ignore resetting proxy " << fullProxyName(proxy));
258 }
259 }
260 m_first = false;
261 }
262 else {
263 initial_first=false;
264 }
265 }//end first
266 const bool first = initial_first;
267
268 // Forcing IOV checks on the first event in the run for AthenaMP (ATEAM-439)
269 if(Gaudi::Concurrency::ConcurrencyFlags::numProcs()==0) {
270 if (inc.type() == IncidentType::BeginRun) {
271 m_firstEventOfRun = true;
272 }
273
274 if (inc.type() == IncidentType::BeginEvent && m_firstEventOfRun) {
275 m_firstEventOfRun = false;
276 if (m_checkTrigger == "BeginEvent") {
277 return;
278 }
279 }
280 }
281
282 set< DataProxy*, SortDPptr > proxiesToReset;
283 if ( inc.type() == m_checkTrigger || inc.type() == IncidentType::BeginRun ) {
284
285 const EventContext& context = inc.context();
286
287 IOVTime curTime;
288
289 const EventIDBase& eventID = context.eventID();
290 uint32_t event = eventID.lumi_block();
291 uint32_t run = eventID.run_number();
292
293 ATH_MSG_DEBUG("Got event info: " << "run="<< run << ", event=" << event);
294 curTime.setRunEvent(run,event);
295
296 // get ns timestamp from event
297 curTime.setTimestamp(1000000000L*(uint64_t)eventID.time_stamp() + eventID.time_stamp_ns_offset());
298
299 if (msgLvl(MSG::DEBUG)) {
300 msg().setColor(MSG::YELLOW,MSG::RED);
301 msg() << inc.type() << ": [R/LB] = " << curTime << endmsg;
302 }
303
304 if (inc.type() == IncidentType::BeginRun) {
305 // Signal BeginRun directly to IOVDbSvc
306 SmartIF<IIOVDbSvc> iovDB{service("IOVDbSvc", false)};
307 if (!iovDB) {
308 ATH_MSG_DEBUG("Unable to get the IOVDbSvc");
309 return;
310 }
311 if (StatusCode::SUCCESS != iovDB->signalBeginRun(curTime,
312 inc.context()))
313 {
314 ATH_MSG_ERROR("Unable to signal begin run to IOVDbSvc");
315 return;
316 }
317 else {
318 ATH_MSG_DEBUG("Signaled begin run to IOVDbSvc " << curTime);
319 }
320 }
321
322 if (first) {
323
324 std::set< const TransientAddress*, SortTADptr >::const_iterator titr;
325 for (titr = m_preLoad.begin(); titr != m_preLoad.end(); ++titr) {
326 const TransientAddress *tad = *titr;
327 StatusCode sc = regProxy(tad->clID(), tad->name());
328 if (StatusCode::SUCCESS != sc) {
329 ATH_MSG_ERROR("handle: Could not register proxy for " <<
330 fullProxyName(tad->clID(), tad->name()));
331 return;
332 }
333 }
334
335 if (msgLvl(MSG::VERBOSE)) {
337 msg() << endmsg;
338 }
339
340 if (msgLvl(MSG::DEBUG)) {
341 msg() << "Callback Tree:" << endmsg;
342 m_trigTree->printTree();
343 }
344
345 // preLoad the ranges and data if requested.
346 if (preLoadProxies(inc.context()).isFailure()) {
347 ATH_MSG_ERROR("Problems preloading IOVRanges");
348 throw( std::runtime_error("IOVSvcTool::preLoadProxies") );
349 }
350
351 // Signal EndProxyPreload directly to IOVDbSvc
352 SmartIF<IIOVDbSvc> iovDB{service("IOVDbSvc", false)};
353 if (iovDB) {
354 iovDB->signalEndProxyPreload();
355 ATH_MSG_DEBUG("Signaled end proxy preload to IOVDbSvc " << curTime);
356 }
357 }// end if first
358
359 // If preLoadData has been set, never check validity of data again.
360 if (m_preLoadData && m_checkOnce) {
361 return;
362 }
363
364 // Otherwise, do the normal check for validity
365
366
367 if (msgLvl(MSG::DEBUG)) {
369 PrintStopSet();
370 msg() << endmsg;
371 }
372
373 std::map<BFCN*, std::list<std::string> > resetKeys;
374
375 //
378 //
379
380 if (inc.type() == IncidentType::BeginRun && m_forceReset && !s_firstRun) {
381
382 ATH_MSG_DEBUG("Resetting all proxies on BeginRun incident for store \""
383 << m_storeName << "\"");
384
385 if (msgLvl(MSG::VERBOSE)) {
386 std::set< const SG::DataProxy* >::const_iterator pit;
387 for (SG::DataProxy* p : m_proxies) {
388 msg() << " " << m_names.at(p) << std::endl;
389 }
390 msg() << endmsg;
391 }
392 proxiesToReset = m_proxies;
393 m_triggered = false;
394 } else {
395 scanStartSet(m_startSet_Clock,"(ClockTime)",proxiesToReset,curTime);
396 scanStartSet(m_startSet_RE,"(R/E)",proxiesToReset,curTime);
397
398 scanStopSet(m_stopSet_Clock,"(ClockTime)",proxiesToReset,curTime);
399 scanStopSet(m_stopSet_RE,"(R/E)",proxiesToReset,curTime);
400 }
401
402 for (auto p : m_ignoredProxies) {
403 auto itr = proxiesToReset.find(p);
404 if (itr != proxiesToReset.end()) {
405 proxiesToReset.erase( itr );
406 }
407 }
408
409 // If MT, must not call any callback functions after first event
410 if (!first && proxiesToReset.size() > 0 &&
411 ( (Gaudi::Concurrency::ConcurrencyFlags::numThreads() +
412 Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents()) > 0 ) ) {
413 ATH_MSG_FATAL("Cannot update Conditions via callback functions in MT after the first event");
414 for (const auto* prox : proxiesToReset) {
415 ATH_MSG_FATAL("CLID=" << prox->clID() << ", name=" << prox->name());
416 }
417 throw GaudiException("Cannot update Conditions via callback functions in MT after the first event",name(),StatusCode::FAILURE);
418 }
419
420 //
423 //
424 for (DataProxy* prx : proxiesToReset) {
425 ATH_MSG_VERBOSE("clearing proxy payload for " << m_names.at(prx));
426
427 // Reset proxy except when one wants to reset callbacks
428
429 if (!m_resetAllCallbacks) p_cndSvc->clearProxyPayload( prx );
430
431 m_trigTree->cascadeTrigger(true, prx);
432
433 // Load data if preload requested.
434
435 if ( (m_partialPreLoadData &&
436 m_partPreLoad.find(TADkey(*prx)) != m_partPreLoad.end())
437 ||
438 m_preLoadData ) {
439 ATH_MSG_VERBOSE("preloading data");
440
441 Gaudi::Guards::AuditorGuard auditor(m_names.at(prx), auditorSvc(), "preLoadProxy");
442 if (prx->accessData() == nullptr) {
443 ATH_MSG_ERROR("problems preloading data for " << m_names.at(prx));
444 }
445 }
446
447 std::list<std::string> keys;
448 pair<pmITR,pmITR> fitr = m_proxyMap.equal_range( prx );
449 for (pmITR p=fitr.first; p!=fitr.second; ++p) {
450 BFCN *f = p->second;
451 std::string key = prx->name();
452 resetKeys[f].emplace_back(prx->name());
453 }
454 }
455
457
458 // Check to see if it's first event, and if preLoadProxies has already
459 // called the functions
460
461 IOVCallbackError* perr(0);
462
463 if (! (first && m_triggered) ) {
464 for (int i=2; i<= m_trigTree->maxLevel(); ++i) {
465 CBTree::nodeSet::const_iterator itt, itt_s, itt_e;
466 m_trigTree->listNodes( i, itt_s, itt_e );
467 for (itt = itt_s; itt != itt_e; ++itt) {
468 CBNode* node = *itt;
469
470 if (node->trigger()) {
471 BFCN *ff = node->fcn();
472 auditorSvc()->before("Callback",m_fcnMap.at(ff).name(),inc.context());
473 if ((*ff)(i,resetKeys[ff]).isFailure()) {
474 auditorSvc()->after("Callback",m_fcnMap.at(ff).name(),inc.context());
475 ATH_MSG_ERROR("Problems calling " << m_fcnMap.at(ff).name()
476 << std::endl << "Skipping all subsequent callbacks.");
477 // this will cause a mem leak, but I don't care
478 perr = new IOVCallbackError(m_fcnMap.at(ff).name());
479 break;
480 }
481 auditorSvc()->after("Callback",m_fcnMap.at(ff).name(),inc.context());
482 }
483 }
484 if (perr != nullptr) break;
485 }
486 }
487
488
490 m_trigTree->clearTrigger();
491
498 m_resetAllCallbacks = false;
499 if (perr != nullptr) throw (*perr);
500 return;
501 }
502
503
505 std::map<const DataProxy*, IOVEntry*>::iterator pitr;
506 for (DataProxy* prx : proxiesToReset) {
507 pitr = m_entries.find( prx );
508 if ( pitr != m_entries.end() && pitr->second->range()->isInRange(curTime) ) {
509 ATH_MSG_VERBOSE("range still valid for " << m_names.at(prx));
510 } else {
511 ATH_MSG_DEBUG("calling provider()->udpateAddress(TAD) for " << m_names.at(prx) );
512 if (!prx->updateAddress()) {
513 ATH_MSG_ERROR("handle: Could not update address");
514 if (perr != nullptr) throw (*perr);
515 return;
516 }
517 }
518
519 if (msgLvl(MSG::VERBOSE)) {
520 IOpaqueAddress *ioa = prx->address();
521 // Print out some debug info if this is an IOVAddress (coming
522 // from IOVASCIIDbSvc)
523 IOVAddress *iova = dynamic_cast<IOVAddress*>(ioa);
524 if (iova != nullptr) {
525 ATH_MSG_VERBOSE(" range: " << iova->range());
526 }
527 }
528
529 }
530
531 if (perr != nullptr) throw (*perr);
532
533 } // end if(inc.type() == m_checkTrigger)
534
535 if ( inc.type() == IncidentType::BeginRun) {
536 s_firstRun = false;
537 }
538
539}
#define endmsg
#define ATH_MSG_FATAL(x)
#define ATH_MSG_VERBOSE(x)
virtual IOVRange range() const
Retrieve IOVRange.
Definition IOVAddress.h:126
bool m_checkOnce
Definition IOVSvcTool.h:245
virtual StatusCode regProxy(SG::DataProxy *proxy, const std::string &key) override
Register a DataProxy with the service.
Gaudi::Property< bool > m_forceReset
Definition IOVSvcTool.h:256
std::set< std::pair< CLID, std::string > > m_ignoredProxyNames
Definition IOVSvcTool.h:217
void PrintStopSet() const
Gaudi::Property< bool > m_partialPreLoadData
Definition IOVSvcTool.h:253
StatusCode preLoadProxies(const EventContext &ctx)
bool m_triggered
Definition IOVSvcTool.h:246
std::set< TADkey_t > m_partPreLoad
Definition IOVSvcTool.h:242
stopSet m_stopSet_Clock
Definition IOVSvcTool.h:231
std::set< SG::DataProxy * > m_ignoredProxies
Definition IOVSvcTool.h:216
void scanStopSet(stopSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const
void PrintStartSet() const
std::atomic< bool > m_first
Definition IOVSvcTool.h:244
stopSet m_stopSet_RE
Definition IOVSvcTool.h:231
Gaudi::Property< bool > m_preLoadData
Definition IOVSvcTool.h:252
virtual void ignoreProxy(const CLID &clid, const std::string &key) override
Definition IOVSvcTool.h:161
void scanStartSet(startSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const
std::string m_checkTrigger
Definition IOVSvcTool.h:249
std::map< const SG::DataProxy *, std::string > m_names
Definition IOVSvcTool.h:201
TADkey_t TADkey(const SG::DataProxy &p)
Definition IOVSvcTool.h:238
void PrintProxyMap() const
IOVSvcCallBackFcn BFCN
Definition IOVSvcTool.h:193
startSet m_startSet_Clock
Definition IOVSvcTool.h:230
bool m_firstEventOfRun
Definition IOVSvcTool.h:247
bool m_resetAllCallbacks
Definition IOVSvcTool.h:248
startSet m_startSet_RE
Definition IOVSvcTool.h:230
void setRunEvent(uint32_t run, uint32_t event) noexcept
Definition IOVTime.cxx:96
void setTimestamp(uint64_t timestamp) noexcept
Definition IOVTime.cxx:72
bool first
Definition DeMoScan.py:534
perr(error, exc=None, exit=False)
Definition calibdata.py:116
setEventNumber uint32_t
MsgStream & msg
Definition testRead.cxx:32

◆ holdsAlgTool()

bool IOVSvcTool::holdsAlgTool ( const IAlgTool * ia) const
overridevirtual

Definition at line 1565 of file IOVSvcTool.cxx.

1565 {
1566
1567 ObjMap::const_iterator oitr = m_objMap.find( ia );
1568
1569 return !(oitr == m_objMap.end());
1570
1571}

◆ holdsCallback()

bool IOVSvcTool::holdsCallback ( const CallBackID & cb) const
overridevirtual

Definition at line 1556 of file IOVSvcTool.cxx.

1556 {
1557
1558 return ! (m_cbidMap.find(cb) == m_cbidMap.end());
1559
1560}

◆ holdsProxy() [1/2]

bool IOVSvcTool::holdsProxy ( const CLID & clid,
const std::string & key ) const
overridevirtual

Definition at line 1539 of file IOVSvcTool.cxx.

1539 {
1540
1541 DataProxy* proxy = p_cndSvc->proxy(clid,key);
1542
1543 if (proxy == nullptr) {
1544 ATH_MSG_ERROR("holdsProxy: could not retrieve proxy "
1545 << fullProxyName(clid,key) << " from store");
1546 return false;
1547 }
1548
1549 return ( holdsProxy(proxy) );
1550
1551}
virtual bool holdsProxy(SG::DataProxy *proxy) const override

◆ holdsProxy() [2/2]

bool IOVSvcTool::holdsProxy ( SG::DataProxy * proxy) const
overridevirtual

Definition at line 1530 of file IOVSvcTool.cxx.

1530 {
1531
1532 return ! ( m_proxies.find( proxy ) == m_proxies.end() );
1533
1534}

◆ ignoreProxy() [1/2]

virtual void IOVSvcTool::ignoreProxy ( const CLID & clid,
const std::string & key )
inlineoverridevirtual

Definition at line 161 of file IOVSvcTool.h.

161 {
162 m_ignoredProxyNames.insert( std::make_pair(clid,key) );
163 }

◆ ignoreProxy() [2/2]

virtual void IOVSvcTool::ignoreProxy ( SG::DataProxy * proxy)
inlineoverridevirtual

Definition at line 165 of file IOVSvcTool.h.

165 {
166 m_ignoredProxies.insert(proxy);
167 }

◆ initialize()

StatusCode IOVSvcTool::initialize ( )
overridevirtual

Definition at line 153 of file IOVSvcTool.cxx.

153 {
154
155 SmartIF<IProperty> iovSvcProp{service("IOVSvc")};
156 ATH_CHECK( iovSvcProp.isValid() );
157
158 ATH_CHECK( setProperty( iovSvcProp->getProperty("preLoadRanges") ) );
159 ATH_CHECK( setProperty( iovSvcProp->getProperty("preLoadData") ) );
160 ATH_CHECK( setProperty( iovSvcProp->getProperty("partialPreLoadData") ) );
161 ATH_CHECK( setProperty( iovSvcProp->getProperty("preLoadExtensibleFolders") ) );
162 ATH_CHECK( setProperty( iovSvcProp->getProperty("updateInterval") ) );
163 ATH_CHECK( setProperty( iovSvcProp->getProperty("sortKeys") ) );
164 ATH_CHECK( setProperty( iovSvcProp->getProperty("forceResetAtBeginRun") ) );
165 ATH_CHECK( setProperty( iovSvcProp->getProperty("OutputLevel") ) );
166
167 int pri=100;
168
169 std::string updi = toUpper(m_updateInterval);
170
171 if (updi== "JOB") {
172 m_checkOnce = true;
173 m_checkTrigger = "BeginRun";
174 p_incSvc->addListener( this, "BeginRun", pri, true);
175 msg() << MSG::INFO;
176 msg().setColor(MSG::GREEN);
177 msg() << "IOVRanges will be checked only ";
178 msg().setColor(MSG::CYAN);
179 msg() << "once";
180 msg().setColor(MSG::GREEN);
181 msg() << " at the start of the job" << endmsg;
182 } else if (updi == "RUN") {
183 m_checkTrigger = "BeginRun";
184 p_incSvc->addListener( this, "BeginRun", pri, true);
185 msg() << MSG::INFO;
186 msg().setColor(MSG::GREEN);
187 msg() << "IOVRanges will be checked at every ";
188 msg().setColor(MSG::CYAN);
189 msg() << "Run" << endmsg;
190 } else if (updi == "EVENT") {
191 m_checkTrigger = "BeginEvent";
192 p_incSvc->addListener( this, "BeginEvent", pri, true);
193 p_incSvc->addListener( this, "BeginRun", pri, true);
194 msg() << MSG::INFO;
195 msg().setColor(MSG::GREEN);
196 msg() << "IOVRanges will be checked at every ";
197 msg().setColor(MSG::CYAN);
198 msg() << "Event" << endmsg;
199 } else {
200 ATH_MSG_FATAL("jobOption \"updateInterval\" must be one of "
201 << "\"event\" \"run\" or \"job\"");
202 return StatusCode::FAILURE;
203 }
204
205 if (m_preLoadData) {
206 msg() << MSG::INFO;
207 msg().setColor(MSG::GREEN);
208 msg() << "IOV Data will be preloaded at the same interval" << endmsg;
209 }
210
211 ATH_MSG_DEBUG("Tool initialized");
212
213 return StatusCode::SUCCESS;
214}
#define ATH_CHECK
Evaluate an expression and check for errors.
std::string toUpper(const std::string &str)
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
Gaudi::Property< std::string > m_updateInterval
Definition IOVSvcTool.h:257

◆ preLoadData()

StatusCode IOVSvcTool::preLoadData ( )
private

◆ preLoadDataTAD()

StatusCode IOVSvcTool::preLoadDataTAD ( const SG::TransientAddress * tad_in)
overridevirtual

add to a set of TADs that who's data will be preLoaded

Definition at line 754 of file IOVSvcTool.cxx.

754 {
755
756 if (m_preLoad.find(tad_in) != m_preLoad.end()) {
757 ATH_MSG_WARNING("preLoadDataTAD: TransientAddress "
758 << fullProxyName( tad_in )
759 << " alread in preLoad set. Not inserting");
760 return StatusCode::SUCCESS;
761 }
762
763 if (m_partPreLoad.find(TADkey(*tad_in)) != m_partPreLoad.end()) {
764 ATH_MSG_WARNING("preLoadDataTAD: TransientAddress "
765 << fullProxyName( tad_in )
766 << " alread in partPreLoad set. Not inserting");
767 return StatusCode::SUCCESS;
768 }
769
770 TransientAddress* tad = new TransientAddress (tad_in->clID(),tad_in->name());
771 m_preLoad.insert( tad );
772 m_partPreLoad.insert( TADkey(*tad) );
773
774 return StatusCode::SUCCESS;
775}
#define ATH_MSG_WARNING(x)

◆ preLoadProxies()

StatusCode IOVSvcTool::preLoadProxies ( const EventContext & ctx)
private

Trigger Callback functions

Definition at line 959 of file IOVSvcTool.cxx.

959 {
960
961 ATH_MSG_DEBUG("preLoadProxies()");
962
963 StatusCode scr(StatusCode::SUCCESS);
964
965 SmartIF<IIOVDbSvc> iovDB{service("IOVDbSvc", false)};
966
967 std::map<BFCN*, std::list<std::string> > resetKeys;
968 for (DataProxy* dp : m_proxies) {
969 Gaudi::Guards::AuditorGuard auditor(m_names[dp], auditorSvc(), "preLoadProxy");
970
971 if (msgLvl(MSG::VERBOSE)) {
972 msg().setColor(MSG::CYAN);
973 msg() << "loading proxy for CLID: " << dp->clID()
974 << " " << m_names[dp] << endmsg;
975 }
976
977 if (dp->provider() == nullptr) {
978 msg() << MSG::FATAL << "No provider found for proxy " << m_names[dp]
979 << ". It is probably not a conditions object" << endl;
980 msg() << "Proxy Map: ";
981 PrintProxyMap(dp);
982 msg() << endmsg;
983 scr = StatusCode::FAILURE;
984 return (scr);
985 }
986
987
989 // preload IOVRanges for callback functions or if jobOption set
990 // This gets us to an IAddressProvider (eg IOVDbSvc)
991 pair<pmITR,pmITR> pi = m_proxyMap.equal_range(dp);
992 if (pi.first != pi.second || m_preLoadRanges) {
993 ATH_MSG_VERBOSE("updating Range");
994 if (!dp->updateAddress())
995 sc = StatusCode::FAILURE;
996 }
997
998 if ( ( m_partialPreLoadData &&
999 m_partPreLoad.find(TADkey(*dp)) != m_partPreLoad.end() )
1000 || m_preLoadData ) {
1001
1002 IIOVDbSvc::KeyInfo kinfo;
1003 if ( !m_preLoadExtensibleFolders && iovDB &&
1004 iovDB->getKeyInfo(dp->name(), kinfo) && kinfo.extensible ) {
1005 ATH_MSG_VERBOSE("not preloading data for extensible folder " << dp->name());
1006 }
1007 else {
1008 ATH_MSG_VERBOSE("preloading data for ("
1009 << dp->clID() << "/"
1010 << dp->name() << ")");
1011 if( dp->accessData() != nullptr ) {
1012 sc = StatusCode::SUCCESS;
1013 } else {
1014 sc = StatusCode::FAILURE;
1015 ATH_MSG_ERROR("preLoading proxies: accessData() failed for " <<
1016 dp->clID() << "/" << dp->name() << ")");
1017 }
1018 }
1019 }
1020
1021 if (sc.isFailure()) scr=sc;
1022
1023
1024 // accumulate callBacks
1025 pmITR pitr;
1026 for (pitr=pi.first; pitr!=pi.second; ++pitr) {
1027 BFCN *f = pitr->second;
1028 resetKeys[f].emplace_back(dp->name());
1029 }
1030
1031 CBNode* cn = m_trigTree->findNode( dp );
1032 if (cn != nullptr) {
1033 m_trigTree->cascadeTrigger(1, cn);
1034 }
1035
1036 }
1037
1038 if (scr.isFailure()) {
1039 ATH_MSG_ERROR("Problems preLoading proxies. No callbacks triggered.");
1040 return scr;
1041 }
1042
1044 for (int i=2; i<= m_trigTree->maxLevel(); ++i) {
1045 CBTree::nodeSet::const_iterator itt, itt_s, itt_e;
1046 m_trigTree->listNodes( i, itt_s, itt_e );
1047 for (itt = itt_s; itt != itt_e; ++itt) {
1048 CBNode* node = *itt;
1049
1050 if (node->trigger()) {
1051 BFCN *ff = node->fcn();
1052 if (m_sortKeys) { resetKeys[ff].sort(); }
1053 auditorSvc()->before("Callback",m_fcnMap[ff].name(),ctx);
1054 if ((*ff)(i,resetKeys[ff]).isFailure()) {
1055 auditorSvc()->after("Callback",m_fcnMap[ff].name(),ctx);
1056 ATH_MSG_ERROR("Problems calling ");
1057 return StatusCode::FAILURE;
1058 }
1059 auditorSvc()->after("Callback",m_fcnMap[ff].name(),ctx);
1060 }
1061 }
1062 }
1063
1064 m_trigTree->clearTrigger();
1065
1066 m_triggered = true;
1067
1068 return scr;
1069}
#define pi
Gaudi::Property< bool > m_preLoadRanges
Definition IOVSvcTool.h:251
Gaudi::Property< bool > m_sortKeys
Definition IOVSvcTool.h:255
Gaudi::Property< bool > m_preLoadExtensibleFolders
Definition IOVSvcTool.h:254

◆ preLoadTAD()

StatusCode IOVSvcTool::preLoadTAD ( const SG::TransientAddress * tad_in)
overridevirtual

add to a set of TADs that will be registered at start of first event

Definition at line 724 of file IOVSvcTool.cxx.

724 {
725
726 // check to see if it's a duplicate in preLoad
727 if (m_preLoad.find( tad_in ) != m_preLoad.end()) {
728 ATH_MSG_WARNING("preLoadTAD: TransientAddress ("
729 << tad_in->clID() << "/" << tad_in->name()
730 << ") alread in preLoad set. Not inserting");
731 return StatusCode::SUCCESS;
732 }
733
734 // check to see if it's a duplicate in partPreLoad
735 if (m_partPreLoad.find( TADkey(*tad_in) ) != m_partPreLoad.end()) {
736 ATH_MSG_WARNING("preLoadTAD: TransientAddress ("
737 << tad_in->clID() << "/" << tad_in->name()
738 << ") alread in partPreLoad set. Not inserting");
739 return StatusCode::SUCCESS;
740 }
741
742 TransientAddress* tad = new TransientAddress (tad_in->clID(),tad_in->name());
743 m_preLoad.insert( tad );
744
745 return StatusCode::SUCCESS;
746}

◆ PrintProxyMap() [1/2]

void IOVSvcTool::PrintProxyMap ( ) const
private

Definition at line 1167 of file IOVSvcTool.cxx.

1167 {
1168 msg() << endl;
1169 msg() << "------------------------------ IOVSvc Proxy Map "
1170 << "------------------------------" << endl;
1171
1172 for (DataProxy* p : m_proxies) {
1173 PrintProxyMap(p);
1174 }
1175 msg() << "----------------------------------------------------------"
1176 << "---------------------" << endl;
1177}

◆ PrintProxyMap() [2/2]

void IOVSvcTool::PrintProxyMap ( const SG::DataProxy * dp) const
private

Definition at line 1182 of file IOVSvcTool.cxx.

1182 {
1183
1184 auto it = m_names.find(dp);
1185 msg() << " " << dp << " " << dp->clID() << " "
1186 << (it == m_names.end() ? "???" : it->second) << endl;
1187 auto pi = m_proxyMap.equal_range(dp);
1188 if (pi.first == pi.second) {
1189 msg() << " -> no callback associated" << endl;
1190 } else {
1191 for (auto pitr=pi.first; pitr!=pi.second; ++pitr) {
1192 BFCN* fcn = pitr->second;
1193 map<BFCN*,CallBackID>::const_iterator fitr = m_fcnMap.find(fcn);
1194 if (fitr != m_fcnMap.end()) {
1195 CallBackID cbid = fitr->second;
1196 msg() << " -> " << fcn << " " << cbid.name() << endl;
1197 }
1198 }
1199 }
1200}
const std::string & name() const
Definition CallBackID.h:36

◆ PrintStartSet()

void IOVSvcTool::PrintStartSet ( ) const
private

Definition at line 1112 of file IOVSvcTool.cxx.

1112 {
1113 startITR start_itr;
1114 std::string objname;
1115
1116 if (m_startSet_Clock.begin() != m_startSet_Clock.end()) {
1117 msg() << endl << "ClockTime start set: " << endl;
1118 for (start_itr = m_startSet_Clock.begin(); start_itr!=m_startSet_Clock.end(); ++start_itr ) {
1119 objname = m_names.at( (*start_itr)->proxy() );
1120 msg() << " " << objname << " (" << (*start_itr)->proxy() << ") "
1121 << (*start_itr)->range()->start() << endl;
1122 }
1123 msg() << endl;
1124 }
1125
1126 if (m_startSet_RE.begin() != m_startSet_RE.end()) {
1127 msg() << "Run/Event start set: " << endl;
1128 for (start_itr = m_startSet_RE.begin(); start_itr!=m_startSet_RE.end();++start_itr ) {
1129 objname = m_names.at( (*start_itr)->proxy() );
1130 msg() << " " << objname << " (" << (*start_itr)->proxy() << ") "
1131 << (*start_itr)->range()->start() << endl;
1132 }
1133 }
1134
1135}
startSet::iterator startITR
Definition IOVSvcTool.h:198

◆ PrintStopSet()

void IOVSvcTool::PrintStopSet ( ) const
private

Definition at line 1140 of file IOVSvcTool.cxx.

1140 {
1141 stopITR stop_itr;
1142 std::string objname;
1143
1144 if (m_stopSet_Clock.begin() != m_stopSet_Clock.end()) {
1145 msg() << endl << "ClockTime stop set: " << endl;
1146 for( stop_itr=m_stopSet_Clock.begin(); stop_itr!=m_stopSet_Clock.end(); ++stop_itr ) {
1147 objname = m_names.at((*stop_itr)->proxy());
1148 msg() << " " << objname << " (" << (*stop_itr)->proxy() << ") "
1149 << (*stop_itr)->range()->stop() << endl;
1150 }
1151 msg() << endl;
1152 }
1153
1154 if (m_stopSet_RE.begin() != m_stopSet_RE.end()) {
1155 msg() << "Run/Event stop set: " << endl;
1156 for( stop_itr=m_stopSet_RE.begin(); stop_itr!=m_stopSet_RE.end(); ++stop_itr ) {
1157 objname = m_names.at((*stop_itr)->proxy());
1158 msg() << " " << objname << " (" << (*stop_itr)->proxy() << ") "
1159 << (*stop_itr)->range()->stop() << endl;
1160 }
1161 }
1162}
stopSet::iterator stopITR
Definition IOVSvcTool.h:199

◆ regFcn() [1/3]

StatusCode IOVSvcTool::regFcn ( const CallBackID & c1,
const CallBackID & c2,
const IOVSvcCallBackFcn & fcn2,
bool trigger = false )
overridevirtual

Definition at line 1295 of file IOVSvcTool.cxx.

1297 {
1298
1299 // Check if second function has been registered with same proxy
1300 BFCN *obs1 = m_cbidMap[c1];
1301 BFCN *obs2;
1302 std::set<const SG::DataProxy*> proxyset;
1303 if (m_cbidMap.find(c2) != m_cbidMap.end()) {
1304 obs2 = m_cbidMap[c2];
1305
1306 std::pair<fnITR,fnITR> fi1 = m_bfcnMap.equal_range( obs1 );
1307 for (fnITR fitr1= fi1.first; fitr1!=fi1.second; ++fitr1) {
1308 const SG::DataProxy* prx1 = fitr1->second;
1309
1310 std::pair<fnITR,fnITR> fi2 = m_bfcnMap.equal_range( obs2 );
1311 for (fnITR fitr2=fi2.first; fitr2!=fi2.second; ++fitr2) {
1312 const SG::DataProxy* prx2 = fitr2->second;
1313
1314 if (prx1 == prx2) {
1315 ATH_MSG_DEBUG("Callback function " << c2.name()
1316 << " cannot be registered since it has already been registered "
1317 << "against " << m_names[prx1]);
1318 } else {
1319 proxyset.insert(prx1); // don't care if it gets done many times
1320 }
1321 }
1322 }
1323 } else {
1324 obs2 = new BFCN( fcn2 );
1325 m_cbidMap[c2] = obs2;
1326 m_fcnMap[obs2] = c2;
1327
1328 // get all proxies that fcn1 is registered against
1329 std::pair<fnITR,fnITR> fi1 = m_bfcnMap.equal_range( obs1 );
1330 for(fnITR fitr1=fi1.first; fitr1!=fi1.second; ++fitr1) {
1331 const SG::DataProxy *prx1 = fitr1->second;
1332 proxyset.insert(prx1);
1333 }
1334 }
1335
1336 if (proxyset.size() == 0) {
1337 ATH_MSG_DEBUG("Callback function " << c2.name()
1338 << " cannot be registered, since it has already been registered"
1339 << " against everything it can be.");
1340 return StatusCode::SUCCESS;
1341 }
1342
1343 // attach pointer to map of CallBackIDs
1344 ObjMap::const_iterator oitr = m_objMap.find(c2.ptr());
1345 if ( oitr != m_objMap.end()) {
1346 oitr->second->insert(c2);
1347 } else {
1348 std::set<CallBackID> *cbs = new std::set<CallBackID>;
1349 cbs->insert( c2 );
1350 m_objMap[c2.ptr()] = cbs;
1351 }
1352
1353 // Link fcn2 to all proxies known to fcn1
1354 std::set<const SG::DataProxy*>::iterator pitr;
1355 std::list<std::string> klist;
1356 for (pitr=proxyset.begin(); pitr!=proxyset.end(); ++pitr) {
1357 const SG::DataProxy* prx = *pitr;
1358 m_proxyMap.insert(std::pair<const SG::DataProxy*,BFCN* >(prx,obs2));
1359 m_bfcnMap.insert(std::pair<BFCN*,const SG::DataProxy*>(obs2,prx));
1360
1361 ATH_MSG_DEBUG("register by " << c2.name() << " bound to " << m_names[prx]);
1362 klist.push_back( prx->name() );
1363
1364 }
1365
1366 // note that the ordering of the parameters in addNode is the reverse
1367 // order of regFcn
1368 CBNode *cn = m_trigTree->findNode(obs2);
1369 if ( cn == nullptr) {
1370 m_trigTree->addNode(obs2,c2,obs1);
1371 } else {
1372 CBNode *cp = m_trigTree->findNode(obs1);
1373 if (cp == nullptr) {
1374 ATH_MSG_ERROR("regFcn: could not locate parent of " << cn->name()
1375 << ". This should never happen");
1376 return StatusCode::FAILURE;
1377 }
1378 m_trigTree->connectNode(cn,cp);
1379 }
1380
1381
1382 if (trigger) {
1383 if (m_first) {
1384 ATH_MSG_INFO("Still in initialize phase, not tiggering callback for "
1385 << c2.name() << " bound to " << *klist.begin());
1386 } else {
1387 return triggerCallback(obs2, *(klist.begin()) );
1388 }
1389 }
1390
1391 return StatusCode::SUCCESS;
1392
1393}
#define ATH_MSG_INFO(x)
const std::string & name() const
Definition CBNode.h:74
std::multimap< BFCN *, constSG::DataProxy * >::iterator fnITR
Definition IOVSvcTool.h:195
StatusCode triggerCallback(IOVSvcCallBackFcn *, const std::string &key)
std::multimap< BFCN *, const SG::DataProxy * > m_bfcnMap
Definition IOVSvcTool.h:214
virtual const name_type & name() const override final
Retrieve data object key == string.

◆ regFcn() [2/3]

StatusCode IOVSvcTool::regFcn ( const IAlgTool * ia,
const CallBackID & c2,
const IOVSvcCallBackFcn & fcn2,
bool trigger = false )
overridevirtual

Definition at line 1398 of file IOVSvcTool.cxx.

1400 {
1401
1402 ObjMap::const_iterator oitr = m_objMap.find( ia );
1403
1404 if (oitr == m_objMap.end()) {
1405 // tool not registered at all
1406 ATH_MSG_ERROR("No callback registered with AlgTool " << ia->name());
1407 return StatusCode::FAILURE;
1408
1409 } else {
1410 std::set<CallBackID> *sc = oitr->second;
1411
1412 if (sc->size() == 1) {
1413 // this is ok - only one callback registered with this tool
1414 CallBackID cb = *(sc->begin());
1415
1416 return regFcn(cb, c2, fcn2, trigger);
1417
1418 } else {
1419 // there is more than one callback registered to this tool
1420 ATH_MSG_ERROR("More than one callback registered to AlgTool "
1421 << ia->name() << ". Found : " << sc->size());
1422 return StatusCode::FAILURE;
1423 }
1424 }
1425
1426}
virtual StatusCode regFcn(SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger=false) override

◆ regFcn() [3/3]

StatusCode IOVSvcTool::regFcn ( SG::DataProxy * dp,
const CallBackID & c,
const IOVSvcCallBackFcn & fcn,
bool trigger = false )
overridevirtual

Definition at line 1206 of file IOVSvcTool.cxx.

1209 {
1210
1211 std::string tname,fullname;
1212 StatusCode sc = p_CLIDSvc->getTypeNameOfID( dp->clID(), tname );
1213 if (sc.isFailure()) {
1214 ATH_MSG_ERROR("Unable to get type name from ClassIDSvc");
1215 return StatusCode::FAILURE;
1216 }
1217 fullname = tname + "[" + dp->name() + "]";
1218
1219 // see if proxy already bound
1220 if (m_proxies.find( dp ) == m_proxies.end()) {
1221 ATH_MSG_ERROR("Cannot register object " << c.name()
1222 << " with DataHandle " << fullname
1223 << " -> Need to bind DataHandle first");
1224 return StatusCode::FAILURE;
1225 } else {
1226 m_names[dp] = fullname;
1227 }
1228
1229 // check if this prox/function pair already registered
1230
1231 std::pair<pmITR,pmITR> fitr = m_proxyMap.equal_range( dp );
1232 for (pmITR p=fitr.first; p!=fitr.second; ++p) {
1233 if ( m_fcnMap[p->second] == c ) {
1234 ATH_MSG_ERROR("CallBack function " << c.name()
1235 << " already registered against " << fullname);
1236 return StatusCode::FAILURE;
1237 }
1238 }
1239
1240 // this function could have already been registered against another
1241 // DataProxy, so see if we can find it.
1242 BFCN *obs;
1243 if (m_cbidMap.find(c) == m_cbidMap.end()) {
1244 // obs = new BFCN (boost::bind(updFcn,const_cast<T*>(obj),_1,_2));
1245 obs = new BFCN(fcn);
1246 m_cbidMap[c] = obs;
1247 m_fcnMap[obs] = c;
1248 } else {
1249 obs = m_cbidMap[c];
1250 }
1251
1252 m_proxyMap.insert(std::pair<const SG::DataProxy*,BFCN* >(dp,obs));
1253 m_bfcnMap.insert(std::pair<BFCN*, const SG::DataProxy*> (obs,dp));
1254
1255 // attach pointer to map of CallBackIDs
1256 ObjMap::const_iterator oitr = m_objMap.find(c.ptr());
1257 if ( oitr != m_objMap.end()) {
1258 oitr->second->insert(c);
1259 } else {
1260 std::set<CallBackID> *cbs = new std::set<CallBackID>;
1261 cbs->insert( c );
1262 m_objMap[c.ptr()] = cbs;
1263 }
1264
1265 // add it to the trigger tree.
1266 CBNode *cn = m_trigTree->findNode(obs);
1267 if ( cn == nullptr) {
1268 m_trigTree->addNode(obs,c,dp);
1269 } else {
1270 CBNode *cp = m_trigTree->findNode(dp);
1271 if (cp)
1272 m_trigTree->connectNode(cn,cp);
1273 else
1274 ATH_MSG_ERROR("Cannot find callback node for parent DataProxy "
1275 << dp->name());
1276 }
1277
1278 ATH_MSG_DEBUG("register by " << c.name() << " bound to " << fullname);
1279
1280 if (trigger) {
1281 if (m_first) {
1282 ATH_MSG_INFO("Still in initialize phase, not tiggering callback for "
1283 << c.name() << " bound to " << fullname);
1284 } else {
1285 return triggerCallback(obs, dp->name());
1286 }
1287 }
1288
1289 return StatusCode::SUCCESS;
1290
1291}

◆ regProxy() [1/2]

StatusCode IOVSvcTool::regProxy ( const CLID & clid,
const std::string & key )
overridevirtual

Register a DataProxy with the service.

Definition at line 684 of file IOVSvcTool.cxx.

684 {
685
686 DataProxy* proxy = p_cndSvc->proxy(clid,key);
687
688 if (proxy == nullptr) {
689 ATH_MSG_ERROR("regProxy could not retrieve proxy "
690 << fullProxyName(clid,key) << " from store");
691 return StatusCode::FAILURE;
692 }
693
694 return ( regProxy(proxy, key) );
695
696}

◆ regProxy() [2/2]

StatusCode IOVSvcTool::regProxy ( SG::DataProxy * proxy,
const std::string & key )
overridevirtual

Register a DataProxy with the service.

Definition at line 547 of file IOVSvcTool.cxx.

547 {
548
549
550 if (proxy == nullptr) {
551 ATH_MSG_ERROR("proxy == 0");
552 return StatusCode::FAILURE;
553 }
554
555 ATH_MSG_DEBUG("registering proxy " << fullProxyName(proxy) << " at " << proxy);
556
557 if (m_proxies.find(proxy) != m_proxies.end()) {
558 ATH_MSG_DEBUG("Proxy for " << fullProxyName(proxy)
559 << " already registered: " << proxy->name());
560 return StatusCode::SUCCESS;
561 }
562
563 std::string tname, fullname;
564 ATH_CHECK( p_CLIDSvc->getTypeNameOfID(proxy->clID(), tname) );
565
566 fullname = tname + "[" + key + "]";
567
568 m_proxies.insert( proxy );
569 m_names[ proxy ] = fullname;
570
571 m_trigTree->addNode(proxy,fullname);
572
573 return StatusCode::SUCCESS;
574
575}

◆ reinitialize()

StatusCode IOVSvcTool::reinitialize ( )
overridevirtual

Definition at line 1449 of file IOVSvcTool.cxx.

1449 {
1450 // Set flag to reset all proxies
1451 m_resetAllCallbacks = true;
1452 return (StatusCode::SUCCESS);
1453}

◆ replaceProxy()

StatusCode IOVSvcTool::replaceProxy ( SG::DataProxy * pOld,
SG::DataProxy * pNew )
overridevirtual

replace a registered DataProxy with a new version

Definition at line 634 of file IOVSvcTool.cxx.

635 {
636 std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
637 assert(nullptr != pOld);
638 assert(nullptr != pNew);
639
640 ATH_MSG_DEBUG("replace proxy " << fullProxyName(pOld)
641 << " @" << pOld << " with " << fullProxyName(pNew)
642 << " @" << pNew);
643
644 //start with the proxy list
645 if (0 == m_proxies.erase(pOld)) {
646 ATH_MSG_DEBUG("unregProxy: original proxy "
647 << fullProxyName(pOld) << " not found. Will return now ");
648 return StatusCode::SUCCESS;
649 }
650 m_proxies.insert(pNew);
651 //new name (possibly identical to old)
652 m_names.erase(pOld);
653 std::string tname;
654 ATH_CHECK( p_CLIDSvc->getTypeNameOfID(pNew->clID(), tname) );
655
656 m_names[pNew]=tname + "[" + pNew->name() + "]";
657
658 if (pOld != pNew) {
659 std::map< const SG::DataProxy*, IOVEntry*>::iterator ent =
660 m_entries.find(pOld);
661 if (ent != m_entries.end()) {
662 removeFromSet (ent->second, m_startSet_Clock);
663 removeFromSet (ent->second, m_startSet_RE);
664 removeFromSet (ent->second, m_stopSet_Clock);
665 removeFromSet (ent->second, m_stopSet_RE);
666
667 setRange_impl (pNew, *(const_cast<IOVRange*>(ent->second->range())));
668 delete ent->second;
669 m_entries.erase (ent);
670 }
671 }
672
673 return (m_trigTree->replaceProxy(pOld, pNew) ?
674 StatusCode::SUCCESS :
675 StatusCode::FAILURE );
676
677}
void setRange_impl(SG::DataProxy *proxy, IOVRange &iovr)
CLID clID() const
Retrieve clid.

◆ resetAllProxies()

void IOVSvcTool::resetAllProxies ( )
overridevirtual

Definition at line 1576 of file IOVSvcTool.cxx.

1576 {
1577
1578 for (DataProxy* prx : m_proxies) {
1579 ATH_MSG_VERBOSE("clearing proxy payload for " << m_names[prx]);
1580
1581 p_cndSvc->clearProxyPayload(prx);
1582
1583 m_trigTree->cascadeTrigger(true, prx);
1584
1585 }
1586
1587}

◆ scanStartSet()

void IOVSvcTool::scanStartSet ( startSet & pSet,
const std::string & type,
std::set< SG::DataProxy *, SortDPptr > & proxiesToReset,
const IOVTime & curTime ) const
private

Definition at line 1458 of file IOVSvcTool.cxx.

1460 {
1461
1462 if (pSet.begin()==pSet.end()) return;
1463
1464 if (msgLvl(MSG::DEBUG)) {
1465 msg() << MSG::DEBUG << "--> scan for resets: start set: " << type << endl;
1466 }
1467
1468 startITR start_itr( pSet.begin() );
1469 while ( start_itr != pSet.end() ) {
1470
1471 if (m_resetAllCallbacks || (*start_itr)->range()->start() > curTime) {
1472 if (msgLvl(MSG::DEBUG)) {
1473 msg() << "\t" << m_names.at((*start_itr)->proxy()) << ": "
1474 << (*start_itr)->range()->start()<<" <- removed"<<endl;
1475 }
1476 proxiesToReset.insert( (*start_itr)->proxy() );
1477
1478 (*start_itr)->setRemovedStart( true );
1479 pSet.erase(start_itr++);
1480
1481 } else {
1482 break;
1483 }
1484 }
1485
1486 if (msgLvl(MSG::DEBUG)) {
1487 msg() << endmsg;
1488 }
1489
1490}

◆ scanStopSet()

void IOVSvcTool::scanStopSet ( stopSet & pSet,
const std::string & type,
std::set< SG::DataProxy *, SortDPptr > & proxiesToReset,
const IOVTime & curTime ) const
private

Definition at line 1495 of file IOVSvcTool.cxx.

1497 {
1498
1499 if (pSet.begin()==pSet.end()) return;
1500 if (msgLvl(MSG::DEBUG)) {
1501 msg() << MSG::DEBUG << "--> scan for resets: stop set: " << type << endl;
1502 }
1503
1504 stopITR stop_itr(pSet.begin());
1505 while ( stop_itr != pSet.end() ) {
1506
1507 if (m_resetAllCallbacks || (*stop_itr)->range()->stop() <= curTime) {
1508 if (msgLvl(MSG::DEBUG)) {
1509 msg() << " " << m_names.at((*stop_itr)->proxy()) << ": "
1510 << (*stop_itr)->range()->stop()<< " -> removed"<<endl;
1511 }
1512 proxiesToReset.insert( (*stop_itr)->proxy() );
1513
1514 (*stop_itr)->setRemovedStop( true );
1515 pSet.erase(stop_itr++);
1516
1517 } else {
1518 break;
1519 }
1520 }
1521 if (msgLvl(MSG::DEBUG)) {
1522 msg() << endmsg;
1523 }
1524
1525}

◆ setRange()

StatusCode IOVSvcTool::setRange ( const CLID & clid,
const std::string & key,
IOVRange & iovr )
overridevirtual

Definition at line 831 of file IOVSvcTool.cxx.

833{
834
835 ATH_MSG_DEBUG("setRange() for clid: " << clid << " key: " << key
836 << " in IOVrange:" << iovr);
837
838 if (!iovr.start().isValid() || !iovr.stop().isValid()) {
839 ATH_MSG_ERROR("IOVRange " << iovr << "is not valid. Start OK: "
840 << iovr.start().isValid() << " Stop OK: " << iovr.stop().isValid()
841 << " run/evt/time min/max "
842 << IOVTime::MINRUN << "/" << IOVTime::MAXRUN << " "
843 << IOVTime::MINEVENT << "/" << IOVTime::MAXEVENT << " "
844 << IOVTime::MINTIMESTAMP << "/" << IOVTime::MAXTIMESTAMP << " ");
845 return StatusCode::FAILURE;
846 }
847
848 DataProxy* proxy = p_cndSvc->proxy(clid,key);
849
850 if (proxy == nullptr) {
851 ATH_MSG_ERROR("setRange: Could not locate proxy for " << fullProxyName(clid,key));
852 return StatusCode::FAILURE;
853 }
854
855 std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
856 setRange_impl (proxy, iovr);
857 return StatusCode::SUCCESS;
858}
const IOVTime & stop() const
Definition IOVRange.h:39
const IOVTime & start() const
Definition IOVRange.h:38
static constexpr uint64_t MAXTIMESTAMP
Definition IOVTime.h:58
static constexpr uint32_t MAXRUN
Definition IOVTime.h:48
static constexpr uint32_t MINEVENT
Definition IOVTime.h:50
static constexpr uint64_t MINTIMESTAMP
Definition IOVTime.h:56
static constexpr uint32_t MAXEVENT
Definition IOVTime.h:51
static constexpr uint32_t MINRUN
Definition IOVTime.h:44

◆ setRange_impl()

void IOVSvcTool::setRange_impl ( SG::DataProxy * proxy,
IOVRange & iovr )
private

Definition at line 779 of file IOVSvcTool.cxx.

780{
781 if (iovr.start().isTimestamp()) {
784 } else {
787 }
788
789 IOVRange *range = new IOVRange(iovr);
790
791 map<const DataProxy*, IOVEntry*>::iterator itr = m_entries.find(proxy);
792 if ( itr != m_entries.end() ) {
793
794 IOVEntry *ent = itr->second;
795 const IOVRange *irn = ent->range();
796
797 if (*irn == iovr) {
798 ATH_MSG_DEBUG("Range has not changed. Returning");
799 delete range;
800 return;
801 // is this true? still in the start and stop sets? FIXME
802 }
803
804
805 startITR sitr = ent->getStartITR();
806 if ( !ent->removedStart() ) {
807 p_startSet->erase( sitr );
808 }
809
810
811
812 stopITR pitr = ent->getStopITR();
813 if ( !ent->removedStop() ) {
814 p_stopSet->erase( pitr );
815 }
816
817 delete ent;
818 }
819
820 ATH_MSG_DEBUG("adding to start and stop sets");
821 IOVEntry *ent = new IOVEntry(proxy,range);
822
823 m_entries[ proxy ] = ent;
824
825 ent->setStartITR( p_startSet->insert( ent ) );
826 ent->setStopITR( p_stopSet->insert( ent ) );
827}
void setStartITR(startITR itr)
Definition IOVEntry.h:75
void setStopITR(stopITR itr)
Definition IOVEntry.h:76
const IOVRange * range() const
Definition IOVEntry.h:63
startITR getStartITR() const
Definition IOVEntry.h:78
bool removedStop() const
Definition IOVEntry.h:70
bool removedStart() const
Definition IOVEntry.h:69
stopITR getStopITR() const
Definition IOVEntry.h:79
bool isTimestamp() const noexcept
Definition IOVTime.h:111

◆ setRangeInDB()

StatusCode IOVSvcTool::setRangeInDB ( const CLID & clid,
const std::string & key,
const IOVRange & range,
const std::string & tag )
overridevirtual

Definition at line 922 of file IOVSvcTool.cxx.

923 {
924
925
926 if (!range.start().isValid() || !range.stop().isValid()) {
927 ATH_MSG_ERROR("IOVRange " << range << "is not valid.");
928 return StatusCode::FAILURE;
929 }
930
931 DataProxy* dp = p_cndSvc->proxy(clid,key);
932
933 if (dp == nullptr) {
934 ATH_MSG_ERROR("no Proxy found for " << fullProxyName( clid, key ));
935 return StatusCode::FAILURE;
936 }
937
938 std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
939 std::map<const DataProxy*,IOVEntry*>::const_iterator itr(m_entries.find(dp));
940 if (itr == m_entries.end()) {
941 ATH_MSG_WARNING(fullProxyName(clid,key) << " not registered with the IOVSvc");
942 }
943
944 IAddressProvider *iadp = dp->provider();
945 IIOVDbSvc *idb = dynamic_cast<IIOVDbSvc*>(iadp);
946
947 if (idb != nullptr) {
948 return idb->setRange(clid, key, range, tag);
949 } else {
950 ATH_MSG_ERROR("Provider is not an IIOVDbSvc");
951 return StatusCode::FAILURE;
952 }
953
954}

◆ setStoreName()

virtual void IOVSvcTool::setStoreName ( const std::string & storeName)
inlineoverridevirtual

Definition at line 88 of file IOVSvcTool.h.

88 {
89 m_storeName = storeName;
90 }

◆ TADkey() [1/2]

TADkey_t IOVSvcTool::TADkey ( const SG::DataProxy & p)
inlineprivate

Definition at line 238 of file IOVSvcTool.h.

239 { return TADkey_t (p.clID(), p.name()); }
std::tuple< CLID, std::string > TADkey_t
Definition IOVSvcTool.h:237

◆ TADkey() [2/2]

TADkey_t IOVSvcTool::TADkey ( const SG::TransientAddress & t)
inlineprivate

Definition at line 240 of file IOVSvcTool.h.

241 { return TADkey_t (t.clID(), t.name()); }

◆ triggerCallback() [1/2]

StatusCode IOVSvcTool::triggerCallback ( const SG::DataProxy * dp,
const std::string & key )
private

Definition at line 1091 of file IOVSvcTool.cxx.

1092 {
1093
1094 ATH_MSG_VERBOSE("triggerCallback(DataProxy*)");
1095
1096 std::map<const SG::DataProxy*, BFCN*>::const_iterator pitr =
1097 m_proxyMap.find(dp);
1098 if (pitr == m_proxyMap.end()) {
1099 ATH_MSG_ERROR("no callback associated with DataProxy " << m_names[dp]);
1100 return StatusCode::FAILURE;
1101 }
1102
1103 BFCN* fcn = pitr->second;
1104
1105 return ( triggerCallback(fcn,key) );
1106
1107}

◆ triggerCallback() [2/2]

StatusCode IOVSvcTool::triggerCallback ( IOVSvcCallBackFcn * fcn,
const std::string & key )
private

Definition at line 1073 of file IOVSvcTool.cxx.

1073 {
1074
1075 ATH_MSG_VERBOSE("triggerCallback(BFCN*)");
1076
1077 int I {}; // initialize to something
1078 std::list<std::string> klist;
1079 klist.push_back(key);
1080 if ( (*fcn)(I,klist).isFailure() ) {
1081 ATH_MSG_ERROR("calling ");
1082 return StatusCode::FAILURE;
1083 }
1084
1085 return StatusCode::SUCCESS;
1086
1087}
#define I(x, y, z)
Definition MD5.cxx:116

Member Data Documentation

◆ ATLAS_THREAD_SAFE

std::recursive_mutex m_handleMutex IOVSvcTool::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 203 of file IOVSvcTool.h.

◆ m_bfcnMap

std::multimap< BFCN*, const SG::DataProxy* > IOVSvcTool::m_bfcnMap
private

Definition at line 214 of file IOVSvcTool.h.

◆ m_cbidMap

std::map<CallBackID, BFCN*> IOVSvcTool::m_cbidMap
private

Definition at line 220 of file IOVSvcTool.h.

◆ m_checkOnce

bool IOVSvcTool::m_checkOnce {false}
private

Definition at line 245 of file IOVSvcTool.h.

245{false};

◆ m_checkTrigger

std::string IOVSvcTool::m_checkTrigger
private

Definition at line 249 of file IOVSvcTool.h.

◆ m_entries

std::map< const SG::DataProxy*, IOVEntry*> IOVSvcTool::m_entries
private

Definition at line 225 of file IOVSvcTool.h.

◆ m_fcnMap

std::map<BFCN*, CallBackID> IOVSvcTool::m_fcnMap
private

Definition at line 219 of file IOVSvcTool.h.

◆ m_first

std::atomic<bool> IOVSvcTool::m_first {true}
private

Definition at line 244 of file IOVSvcTool.h.

244{true};

◆ m_firstEventOfRun

bool IOVSvcTool::m_firstEventOfRun {false}
private

Definition at line 247 of file IOVSvcTool.h.

247{false};

◆ m_forceReset

Gaudi::Property<bool> IOVSvcTool::m_forceReset {this, "forceResetAtBeginRun", false}
private

Definition at line 256 of file IOVSvcTool.h.

256{this, "forceResetAtBeginRun", false};

◆ m_ignoredProxies

std::set<SG::DataProxy*> IOVSvcTool::m_ignoredProxies
private

Definition at line 216 of file IOVSvcTool.h.

◆ m_ignoredProxyNames

std::set< std::pair<CLID, std::string> > IOVSvcTool::m_ignoredProxyNames
private

Definition at line 217 of file IOVSvcTool.h.

◆ m_names

std::map< const SG::DataProxy*, std::string> IOVSvcTool::m_names
private

Definition at line 201 of file IOVSvcTool.h.

◆ m_objMap

ObjMap IOVSvcTool::m_objMap
private

Definition at line 223 of file IOVSvcTool.h.

◆ m_partialPreLoadData

Gaudi::Property<bool> IOVSvcTool::m_partialPreLoadData {this, "partialPreLoadData", true}
private

Definition at line 253 of file IOVSvcTool.h.

253{this, "partialPreLoadData", true};

◆ m_partPreLoad

std::set< TADkey_t > IOVSvcTool::m_partPreLoad
private

Definition at line 242 of file IOVSvcTool.h.

◆ m_preLoad

std::set< const SG::TransientAddress*, SortTADptr > IOVSvcTool::m_preLoad
private

Definition at line 235 of file IOVSvcTool.h.

◆ m_preLoadData

Gaudi::Property<bool> IOVSvcTool::m_preLoadData {this, "preLoadData", false}
private

Definition at line 252 of file IOVSvcTool.h.

252{this, "preLoadData", false};

◆ m_preLoadExtensibleFolders

Gaudi::Property<bool> IOVSvcTool::m_preLoadExtensibleFolders {this, "preLoadExtensibleFolders", true}
private

Definition at line 254 of file IOVSvcTool.h.

254{this, "preLoadExtensibleFolders", true};

◆ m_preLoadRanges

Gaudi::Property<bool> IOVSvcTool::m_preLoadRanges {this, "preLoadRanges", false}
private

Definition at line 251 of file IOVSvcTool.h.

251{this, "preLoadRanges", false};

◆ m_proxies

std::set< SG::DataProxy*, SortDPptr > IOVSvcTool::m_proxies
private

Definition at line 212 of file IOVSvcTool.h.

◆ m_proxyMap

std::multimap< const SG::DataProxy*, BFCN* > IOVSvcTool::m_proxyMap
private

Definition at line 213 of file IOVSvcTool.h.

◆ m_resetAllCallbacks

bool IOVSvcTool::m_resetAllCallbacks {false}
private

Definition at line 248 of file IOVSvcTool.h.

248{false};

◆ m_sortKeys

Gaudi::Property<bool> IOVSvcTool::m_sortKeys {this, "sortKeys", true}
private

Definition at line 255 of file IOVSvcTool.h.

255{this, "sortKeys", true};

◆ m_startSet_Clock

startSet IOVSvcTool::m_startSet_Clock
private

Definition at line 230 of file IOVSvcTool.h.

◆ m_startSet_RE

startSet IOVSvcTool::m_startSet_RE
private

Definition at line 230 of file IOVSvcTool.h.

◆ m_stopSet_Clock

stopSet IOVSvcTool::m_stopSet_Clock
private

Definition at line 231 of file IOVSvcTool.h.

◆ m_stopSet_RE

stopSet IOVSvcTool::m_stopSet_RE
private

Definition at line 231 of file IOVSvcTool.h.

◆ m_storeName

std::string IOVSvcTool::m_storeName
private

Definition at line 183 of file IOVSvcTool.h.

◆ m_triggered

bool IOVSvcTool::m_triggered {false}
private

Definition at line 246 of file IOVSvcTool.h.

246{false};

◆ m_trigTree

CBTree* IOVSvcTool::m_trigTree {nullptr}
private

Definition at line 233 of file IOVSvcTool.h.

233{nullptr};

◆ m_updateInterval

Gaudi::Property<std::string> IOVSvcTool::m_updateInterval {this, "updateInterval", "Event"}
private

Definition at line 257 of file IOVSvcTool.h.

257{this, "updateInterval", "Event"};

◆ p_CLIDSvc

ServiceHandle<IClassIDSvc> IOVSvcTool::p_CLIDSvc
private

Definition at line 188 of file IOVSvcTool.h.

◆ p_cndSvc

ServiceHandle<StoreGateSvc> IOVSvcTool::p_cndSvc
private

Definition at line 185 of file IOVSvcTool.h.

◆ p_incSvc

ServiceHandle<IIncidentSvc> IOVSvcTool::p_incSvc
private

Definition at line 186 of file IOVSvcTool.h.

◆ p_PPSvc

ServiceHandle<IProxyProviderSvc> IOVSvcTool::p_PPSvc
private

Definition at line 187 of file IOVSvcTool.h.

◆ p_startSet

startSet* IOVSvcTool::p_startSet {nullptr}
private

Definition at line 227 of file IOVSvcTool.h.

227{nullptr};

◆ p_stopSet

stopSet* IOVSvcTool::p_stopSet {nullptr}
private

Definition at line 228 of file IOVSvcTool.h.

228{nullptr};

◆ p_toolSvc

ServiceHandle<IToolSvc> IOVSvcTool::p_toolSvc
private

Definition at line 189 of file IOVSvcTool.h.


The documentation for this class was generated from the following files: