ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
IOVSvcTool Class Reference

#include <IOVSvcTool.h>

Inheritance diagram for IOVSvcTool:
Collaboration 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. More...
 
virtual StatusCode regProxy (const CLID &clid, const std::string &key) override
 Register a DataProxy with the service. More...
 
virtual StatusCode deregProxy (SG::DataProxy *proxy) override
 Deregister a DataProxy with the service. More...
 
virtual StatusCode deregProxy (const CLID &clid, const std::string &key) override
 Deregister a DataProxy with the service. More...
 
virtual StatusCode replaceProxy (SG::DataProxy *pOld, SG::DataProxy *pNew) override
 replace a registered DataProxy with a new version More...
 
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 More...
 
virtual StatusCode preLoadDataTAD (const SG::TransientAddress *) override
 add to a set of TADs that who's data will be preLoaded More...
 
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< const SG::DataProxy *, BFCN * >::iterator pmITR
 
typedef std::multimap< BFCN *, const SG::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 ()
 
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
 
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*, const SG::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<const SG::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 }

◆ ~IOVSvcTool()

IOVSvcTool::~IOVSvcTool ( )
virtual

Definition at line 118 of file IOVSvcTool.cxx.

118  {
119 
120  // cleanup
121 
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 
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 }

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 705 of file IOVSvcTool.cxx.

705  {
706 
707  DataProxy* proxy = p_cndSvc->proxy(clid,key);
708 
709  if (proxy == nullptr) {
710  ATH_MSG_ERROR("regProxy could not retrieve proxy "
711  << fullProxyName(clid,key) << " from store");
712  return StatusCode::FAILURE;
713  }
714 
715  return ( deregProxy(proxy) );
716 
717 }

◆ deregProxy() [2/2]

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

Deregister a DataProxy with the service.

Definition at line 585 of file IOVSvcTool.cxx.

585  {
586 
587 
588  if (proxy == nullptr) {
589  ATH_MSG_ERROR("proxy == 0");
590  return StatusCode::FAILURE;
591  }
592 
593  ATH_MSG_DEBUG("removing proxy " << fullProxyName(proxy) << " at " << proxy);
594 
596  if (itr == m_proxies.end()) {
597  ATH_MSG_DEBUG("Proxy for " << fullProxyName(proxy)
598  << " not registered: " << proxy->name());
599  return StatusCode::SUCCESS;
600  }
601 
602  m_proxies.erase( itr );
603 
605 
606  return StatusCode::SUCCESS;
607 
608 }

◆ fullProxyName() [1/3]

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

Definition at line 1607 of file IOVSvcTool.cxx.

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

◆ fullProxyName() [2/3]

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

Definition at line 1600 of file IOVSvcTool.cxx.

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

◆ fullProxyName() [3/3]

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

Definition at line 1591 of file IOVSvcTool.cxx.

1591  {
1592 
1593  return fullProxyName(tad->clID(), tad->name());
1594 
1595 }

◆ getRange()

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

Definition at line 863 of file IOVSvcTool.cxx.

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

◆ 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 900 of file IOVSvcTool.cxx.

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

◆ 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 883 of file IOVSvcTool.cxx.

886  {
887 
888  if (curTime.isValid()) {
889  return getRangeFromDB(clid, key, curTime, range, tag, ioa);
890  } else {
891  ATH_MSG_ERROR("Current Event not defined");
892  return StatusCode::FAILURE;
893  }
894 
895 }

◆ 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 1430 of file IOVSvcTool.cxx.

1431  {
1432 
1433  bool match = false;
1434  for (pmITR pitr=m_proxyMap.begin(); pitr != m_proxyMap.end(); ++pitr) {
1435  if (key == pitr->first->name()) {
1436  tools.insert( m_fcnMap[pitr->second].objName() );
1437  match = true;
1438  }
1439  }
1440 
1441  return ( (match) ? StatusCode::SUCCESS : StatusCode::FAILURE );
1442 }

◆ 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 (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)) {
336  PrintProxyMap();
337  msg() << endmsg;
338  }
339 
340  if (msgLvl(MSG::DEBUG)) {
341  msg() << "Callback Tree:" << endmsg;
343  }
344 
345  // preLoad the ranges and data if requested.
346  if (preLoadProxies().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)) {
368  PrintStartSet();
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 &&
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].push_back(key);
453  }
454  }
455 
457 
458  // Check to see if it's first event, and if preLoadProxies has already
459  // called the functions
460 
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());
473  if ((*ff)(i,resetKeys[ff]).isFailure()) {
474  auditorSvc()->after("Callback",m_fcnMap.at(ff).name());
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());
482 
483  }
484  }
485  if (perr != nullptr) break;
486  }
487  }
488 
489 
492 
498  if (m_resetAllCallbacks) {
499  m_resetAllCallbacks = false;
500  if (perr != nullptr) throw (*perr);
501  return;
502  }
503 
504 
507  for (DataProxy* prx : proxiesToReset) {
508  pitr = m_entries.find( prx );
509  if ( pitr != m_entries.end() && pitr->second->range()->isInRange(curTime) ) {
510  ATH_MSG_VERBOSE("range still valid for " << m_names.at(prx));
511  } else {
512  ATH_MSG_DEBUG("calling provider()->udpateAddress(TAD) for " << m_names.at(prx) );
513  if (!prx->updateAddress()) {
514  ATH_MSG_ERROR("handle: Could not update address");
515  if (perr != nullptr) throw (*perr);
516  return;
517  }
518  }
519 
520  if (msgLvl(MSG::VERBOSE)) {
521  IOpaqueAddress *ioa = prx->address();
522  // Print out some debug info if this is an IOVAddress (coming
523  // from IOVASCIIDbSvc)
524  IOVAddress *iova = dynamic_cast<IOVAddress*>(ioa);
525  if (iova != nullptr) {
526  ATH_MSG_VERBOSE(" range: " << iova->range());
527  }
528  }
529 
530  }
531 
532  if (perr != nullptr) throw (*perr);
533 
534  } // end if(inc.type() == m_checkTrigger)
535 
536  if ( inc.type() == IncidentType::BeginRun) {
537  s_firstRun = false;
538  }
539 
540 }

◆ holdsAlgTool()

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

Definition at line 1564 of file IOVSvcTool.cxx.

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

◆ holdsCallback()

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

Definition at line 1555 of file IOVSvcTool.cxx.

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

◆ holdsProxy() [1/2]

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

Definition at line 1538 of file IOVSvcTool.cxx.

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

◆ holdsProxy() [2/2]

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

Definition at line 1529 of file IOVSvcTool.cxx.

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

◆ 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 }

◆ 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 755 of file IOVSvcTool.cxx.

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

◆ preLoadProxies()

StatusCode IOVSvcTool::preLoadProxies ( )
private

Trigger Callback functions

Definition at line 960 of file IOVSvcTool.cxx.

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

◆ 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 725 of file IOVSvcTool.cxx.

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

◆ PrintProxyMap() [1/2]

void IOVSvcTool::PrintProxyMap ( ) const
private

Definition at line 1169 of file IOVSvcTool.cxx.

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

◆ PrintProxyMap() [2/2]

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

Definition at line 1184 of file IOVSvcTool.cxx.

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

◆ PrintStartSet()

void IOVSvcTool::PrintStartSet ( ) const
private

Definition at line 1114 of file IOVSvcTool.cxx.

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

◆ PrintStopSet()

void IOVSvcTool::PrintStopSet ( ) const
private

Definition at line 1142 of file IOVSvcTool.cxx.

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

◆ regFcn() [1/3]

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

Definition at line 1294 of file IOVSvcTool.cxx.

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

◆ regFcn() [2/3]

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

Definition at line 1397 of file IOVSvcTool.cxx.

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

◆ regFcn() [3/3]

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

Definition at line 1205 of file IOVSvcTool.cxx.

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

◆ regProxy() [1/2]

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

Register a DataProxy with the service.

Definition at line 685 of file IOVSvcTool.cxx.

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

◆ regProxy() [2/2]

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

Register a DataProxy with the service.

Definition at line 548 of file IOVSvcTool.cxx.

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

◆ reinitialize()

StatusCode IOVSvcTool::reinitialize ( )
overridevirtual

Definition at line 1448 of file IOVSvcTool.cxx.

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

◆ replaceProxy()

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

replace a registered DataProxy with a new version

Definition at line 635 of file IOVSvcTool.cxx.

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

◆ resetAllProxies()

void IOVSvcTool::resetAllProxies ( )
overridevirtual

Definition at line 1575 of file IOVSvcTool.cxx.

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

◆ scanStartSet()

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

Definition at line 1457 of file IOVSvcTool.cxx.

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

◆ scanStopSet()

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

Definition at line 1494 of file IOVSvcTool.cxx.

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

◆ setRange()

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

Definition at line 832 of file IOVSvcTool.cxx.

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

◆ setRange_impl()

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

Definition at line 780 of file IOVSvcTool.cxx.

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

◆ setRangeInDB()

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

Definition at line 923 of file IOVSvcTool.cxx.

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

◆ 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()); }

◆ 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 1093 of file IOVSvcTool.cxx.

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

◆ triggerCallback() [2/2]

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

Definition at line 1075 of file IOVSvcTool.cxx.

1075  {
1076 
1077  ATH_MSG_VERBOSE("triggerCallback(BFCN*)");
1078 
1079  int I {}; // initialize to something
1080  std::list<std::string> klist;
1081  klist.push_back(key);
1082  if ( (*fcn)(I,klist).isFailure() ) {
1083  ATH_MSG_ERROR("calling ");
1084  return StatusCode::FAILURE;
1085  }
1086 
1087  return StatusCode::SUCCESS;
1088 
1089 }

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.

◆ 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

bool IOVSvcTool::m_first {true}
private

Definition at line 244 of file IOVSvcTool.h.

◆ m_firstEventOfRun

bool IOVSvcTool::m_firstEventOfRun {false}
private

Definition at line 247 of file IOVSvcTool.h.

◆ m_forceReset

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

Definition at line 256 of file IOVSvcTool.h.

◆ 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.

◆ 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.

◆ m_preLoadExtensibleFolders

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

Definition at line 254 of file IOVSvcTool.h.

◆ m_preLoadRanges

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

Definition at line 251 of file IOVSvcTool.h.

◆ 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.

◆ m_sortKeys

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

Definition at line 255 of file IOVSvcTool.h.

◆ 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.

◆ m_trigTree

CBTree* IOVSvcTool::m_trigTree {nullptr}
private

Definition at line 233 of file IOVSvcTool.h.

◆ m_updateInterval

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

Definition at line 257 of file IOVSvcTool.h.

◆ 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.

◆ p_stopSet

stopSet* IOVSvcTool::p_stopSet {nullptr}
private

Definition at line 228 of file IOVSvcTool.h.

◆ 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:
CBTree::addNode
CBNode * addNode(const std::string &name, CBNode *parent)
Definition: CBTree.cxx:65
CBTree::delNode
bool delNode(const SG::DataProxy *prx)
Definition: CBTree.cxx:114
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IOVSvcTool::m_preLoad
std::set< const SG::TransientAddress *, SortTADptr > m_preLoad
Definition: IOVSvcTool.h:235
IOVSvcTool::m_triggered
bool m_triggered
Definition: IOVSvcTool.h:246
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
IOVSvcTool::m_stopSet_Clock
stopSet m_stopSet_Clock
Definition: IOVSvcTool.h:231
IOVSvcTool::m_sortKeys
Gaudi::Property< bool > m_sortKeys
Definition: IOVSvcTool.h:255
CallBackID
Definition: CallBackID.h:24
TileDCSDataPlotter.dp
dp
Definition: TileDCSDataPlotter.py:840
IOVSvcTool::m_forceReset
Gaudi::Property< bool > m_forceReset
Definition: IOVSvcTool.h:256
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
dqt_zlumi_alleff_HIST.iov
iov
Definition: dqt_zlumi_alleff_HIST.py:119
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
IOVTime::MAXRUN
static constexpr uint32_t MAXRUN
Definition: IOVTime.h:48
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
IOVSvcTool::getRangeFromDB
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
Definition: IOVSvcTool.cxx:883
IOVSvcTool::m_proxies
std::set< SG::DataProxy *, SortDPptr > m_proxies
Definition: IOVSvcTool.h:212
calibdata.perr
def perr(error, exc=None, exit=False)
Definition: calibdata.py:117
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
IOVSvcTool::stopITR
stopSet::iterator stopITR
Definition: IOVSvcTool.h:199
IOVSvcTool::m_ignoredProxyNames
std::set< std::pair< CLID, std::string > > m_ignoredProxyNames
Definition: IOVSvcTool.h:217
IOVEntry::setStopITR
void setStopITR(stopITR itr)
Definition: IOVEntry.h:86
extractSporadic.c1
c1
Definition: extractSporadic.py:134
CBTree::connectNode
void connectNode(CBNode *node, CBNode *parent)
Definition: CBTree.cxx:144
IOVEntry::getStartITR
startITR getStartITR() const
Definition: IOVEntry.h:88
SG::TransientAddress
Definition: TransientAddress.h:32
CBTree::cascadeTrigger
void cascadeTrigger(const bool b, CBNode *start)
Definition: CBTree.cxx:374
IOVSvcTool::PrintStopSet
void PrintStopSet() const
Definition: IOVSvcTool.cxx:1142
IOVSvcTool::scanStopSet
void scanStopSet(stopSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const
Definition: IOVSvcTool.cxx:1494
IOVSvcTool::regFcn
virtual StatusCode regFcn(SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger=false) override
Definition: IOVSvcTool.cxx:1205
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
IIOVDbSvc
Abstract interface to IOVDbSvc to access IOVRange and tag information.
Definition: IIOVDbSvc.h:38
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
CBTree::clearTrigger
void clearTrigger() const
Definition: CBTree.cxx:417
CBTree::findNode
CBNode * findNode(const std::string &name)
Definition: CBTree.cxx:238
IOVSvcTool::m_updateInterval
Gaudi::Property< std::string > m_updateInterval
Definition: IOVSvcTool.h:257
pi
#define pi
Definition: TileMuonFitter.cxx:65
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
IOVSvcTool::m_partialPreLoadData
Gaudi::Property< bool > m_partialPreLoadData
Definition: IOVSvcTool.h:253
CBNode
Definition: CBNode.h:30
IOVTime::MINRUN
static constexpr uint32_t MINRUN
Definition: IOVTime.h:44
SG::TransientAddress::name
const std::string & name() const
Get the primary (hashed) SG key.
Definition: TransientAddress.h:208
IOVSvcTool::m_stopSet_RE
stopSet m_stopSet_RE
Definition: IOVSvcTool.h:231
IOVSvcTool::m_checkTrigger
std::string m_checkTrigger
Definition: IOVSvcTool.h:249
IOVSvcTool::m_partPreLoad
std::set< TADkey_t > m_partPreLoad
Definition: IOVSvcTool.h:242
IOVSvcTool::deregProxy
virtual StatusCode deregProxy(SG::DataProxy *proxy) override
Deregister a DataProxy with the service.
Definition: IOVSvcTool.cxx:585
IOVSvcTool::m_preLoadRanges
Gaudi::Property< bool > m_preLoadRanges
Definition: IOVSvcTool.h:251
IOVEntry::range
const IOVRange * range() const
Definition: IOVEntry.h:73
IOVSvcTool::m_startSet_RE
startSet m_startSet_RE
Definition: IOVSvcTool.h:230
IOVAddress
Definition: IOVAddress.h:11
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
IOVEntry::setStartITR
void setStartITR(startITR itr)
Definition: IOVEntry.h:85
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
IOVSvcTool::m_proxyMap
std::multimap< const SG::DataProxy *, BFCN * > m_proxyMap
Definition: IOVSvcTool.h:213
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
CBTree::replaceProxy
CBNode * replaceProxy(const SG::DataProxy *pOld, const SG::DataProxy *pNew)
Definition: CBTree.cxx:55
IOVAddress::range
virtual IOVRange range() const
Retrieve IOVRange.
Definition: IOVAddress.h:126
lumiFormat.i
int i
Definition: lumiFormat.py:85
CBTree::maxLevel
int maxLevel() const
Definition: CBTree.cxx:329
D3PDSizeSummary.ff
ff
Definition: D3PDSizeSummary.py:305
IOVSvcTool::p_toolSvc
ServiceHandle< IToolSvc > p_toolSvc
Definition: IOVSvcTool.h:189
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
IOVEntry::removedStart
bool removedStart() const
Definition: IOVEntry.h:79
IOVSvcTool::p_PPSvc
ServiceHandle< IProxyProviderSvc > p_PPSvc
Definition: IOVSvcTool.h:187
SG::TransientAddress::clID
CLID clID() const
Retrieve string key:
Definition: TransientAddress.h:201
IOVSvcTool::m_preLoadData
Gaudi::Property< bool > m_preLoadData
Definition: IOVSvcTool.h:252
IAddressProvider
interface for IOA providers
Definition: IAddressProvider.h:28
IOVSvcTool::m_first
bool m_first
Definition: IOVSvcTool.h:244
IOVSvcTool::m_firstEventOfRun
bool m_firstEventOfRun
Definition: IOVSvcTool.h:247
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
IOVTime::MAXTIMESTAMP
static constexpr uint64_t MAXTIMESTAMP
Definition: IOVTime.h:58
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
hist_file_dump.f
f
Definition: hist_file_dump.py:135
IOVSvcTool::holdsProxy
virtual bool holdsProxy(SG::DataProxy *proxy) const override
Definition: IOVSvcTool.cxx:1529
run
Definition: run.py:1
IOVEntry::removedStop
bool removedStop() const
Definition: IOVEntry.h:80
CBTree::listNodes
void listNodes() const
Definition: CBTree.cxx:337
IOVSvcTool::fullProxyName
std::string fullProxyName(const SG::TransientAddress *) const
Definition: IOVSvcTool.cxx:1591
CBTree::printTree
void printTree() const
Definition: CBTree.cxx:265
SG::DataProxy::clID
CLID clID() const
Retrieve clid.
IOVSvcTool::p_CLIDSvc
ServiceHandle< IClassIDSvc > p_CLIDSvc
Definition: IOVSvcTool.h:188
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
IOVSvcTool::m_entries
std::map< const SG::DataProxy *, IOVEntry * > m_entries
Definition: IOVSvcTool.h:225
CBTree
Definition: CBTree.h:30
IOVSvcTool::p_cndSvc
ServiceHandle< StoreGateSvc > p_cndSvc
Definition: IOVSvcTool.h:185
IOVSvcTool::m_preLoadExtensibleFolders
Gaudi::Property< bool > m_preLoadExtensibleFolders
Definition: IOVSvcTool.h:254
IOVSvcTool::ignoreProxy
virtual void ignoreProxy(const CLID &clid, const std::string &key) override
Definition: IOVSvcTool.h:161
tools
Definition: DataQuality/ZLumiScripts/python/tools/__init__.py:1
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
IOVEntry
Definition: IOVEntry.h:25
IOVSvcTool::m_trigTree
CBTree * m_trigTree
Definition: IOVSvcTool.h:233
IOVSvcTool::triggerCallback
StatusCode triggerCallback(IOVSvcCallBackFcn *, const std::string &key)
Definition: IOVSvcTool.cxx:1075
IOVSvcTool::startITR
startSet::iterator startITR
Definition: IOVSvcTool.h:198
IOVSvcTool::p_stopSet
stopSet * p_stopSet
Definition: IOVSvcTool.h:228
LArNewCalib_PedestalAutoCorr.cp
cp
Definition: LArNewCalib_PedestalAutoCorr.py:188
SG::DataProxy::name
virtual const name_type & name() const override final
Retrieve data object key == string.
IOVTime::MINEVENT
static constexpr uint32_t MINEVENT
Definition: IOVTime.h:50
python.consts.RED
RED
Definition: consts.py:3
IOVSvcTool::p_incSvc
ServiceHandle< IIncidentSvc > p_incSvc
Definition: IOVSvcTool.h:186
IOVSvcTool::scanStartSet
void scanStartSet(startSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const
Definition: IOVSvcTool.cxx:1457
IOVSvcTool::fnITR
std::multimap< BFCN *, const SG::DataProxy * >::iterator fnITR
Definition: IOVSvcTool.h:195
CallBackID::name
const std::string & name() const
Definition: CallBackID.h:46
python.DataFormatRates.c2
c2
Definition: DataFormatRates.py:123
python.consts.YELLOW
YELLOW
Definition: consts.py:3
python.consts.GREEN
GREEN
Definition: consts.py:3
CBNode::name
const std::string & name() const
Definition: CBNode.h:74
IOVSvcTool::m_storeName
std::string m_storeName
Definition: IOVSvcTool.h:183
IOVSvcTool::setRange_impl
void setRange_impl(SG::DataProxy *proxy, IOVRange &iovr)
Definition: IOVSvcTool.cxx:780
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
toUpper
std::string toUpper(const std::string &str)
Definition: IOVSvcTool.cxx:49
python.BackTrackingConfig.numThreads
int numThreads
Definition: BackTrackingConfig.py:61
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
IOVSvcTool::TADkey_t
std::tuple< CLID, std::string > TADkey_t
Definition: IOVSvcTool.h:237
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IOVSvcTool::m_names
std::map< const SG::DataProxy *, std::string > m_names
Definition: IOVSvcTool.h:201
DeMoScan.first
bool first
Definition: DeMoScan.py:536
DEBUG
#define DEBUG
Definition: page_access.h:11
IOVSvcTool::m_fcnMap
std::map< BFCN *, CallBackID > m_fcnMap
Definition: IOVSvcTool.h:219
IOVCallbackError
Definition: IOVCallbackError.h:14
IOVSvcTool::m_objMap
ObjMap m_objMap
Definition: IOVSvcTool.h:223
IIOVDbSvc::KeyInfo
Filled by IIOVDbSvc::getKeyInfo.
Definition: IIOVDbSvc.h:44
IOVSvcTool::m_bfcnMap
std::multimap< BFCN *, const SG::DataProxy * > m_bfcnMap
Definition: IOVSvcTool.h:214
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
IOVSvcTool::m_cbidMap
std::map< CallBackID, BFCN * > m_cbidMap
Definition: IOVSvcTool.h:220
IOVTime::MINTIMESTAMP
static constexpr uint64_t MINTIMESTAMP
Definition: IOVTime.h:56
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
I
#define I(x, y, z)
Definition: MD5.cxx:116
IOVSvcTool::TADkey
TADkey_t TADkey(const SG::DataProxy &p)
Definition: IOVSvcTool.h:238
IIOVDbSvc::KeyInfo::extensible
bool extensible
Definition: IIOVDbSvc.h:51
IOVSvcTool::m_startSet_Clock
startSet m_startSet_Clock
Definition: IOVSvcTool.h:230
IOVSvcTool::pmITR
std::multimap< const SG::DataProxy *, BFCN * >::iterator pmITR
Definition: IOVSvcTool.h:194
SG::DataProxy
Definition: DataProxy.h:45
IOVSvcTool::BFCN
IOVSvcCallBackFcn BFCN
Definition: IOVSvcTool.h:193
python.compressB64.c
def c
Definition: compressB64.py:93
IOVSvcTool::regProxy
virtual StatusCode regProxy(SG::DataProxy *proxy, const std::string &key) override
Register a DataProxy with the service.
Definition: IOVSvcTool.cxx:548
IOVSvcTool::preLoadProxies
StatusCode preLoadProxies()
Definition: IOVSvcTool.cxx:960
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
IOVSvcTool::PrintStartSet
void PrintStartSet() const
Definition: IOVSvcTool.cxx:1114
IOVEntry::getStopITR
stopITR getStopITR() const
Definition: IOVEntry.h:89
node
Definition: memory_hooks-stdcmalloc.h:74
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
BchCleanup.idb
idb
Definition: BchCleanup.py:152
IOVSvcTool::m_checkOnce
bool m_checkOnce
Definition: IOVSvcTool.h:245
IOVSvcTool::m_ignoredProxies
std::set< SG::DataProxy * > m_ignoredProxies
Definition: IOVSvcTool.h:216
IOVSvcTool::m_resetAllCallbacks
bool m_resetAllCallbacks
Definition: IOVSvcTool.h:248
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
IOVSvcTool::p_startSet
startSet * p_startSet
Definition: IOVSvcTool.h:227
IOVSvcTool::PrintProxyMap
void PrintProxyMap() const
Definition: IOVSvcTool.cxx:1169