ATLAS Offline Software
IOVSvcTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "IOVSvcTool.h"
6 /*****************************************************************************
7  *
8  * IOVSvcTool.cxx
9  * IOVSvc
10  *
11  * Author: Charles Leggett
12  *
13  * Tool to provide automatic updating and callbacks for time dependent data
14  *
15  *****************************************************************************/
16 
17 
18 #include "GaudiKernel/ISvcLocator.h"
19 #include "GaudiKernel/IIncidentSvc.h"
20 #include "GaudiKernel/Incident.h"
21 #include "GaudiKernel/IAlgTool.h"
22 #include "GaudiKernel/IToolSvc.h"
23 #include "GaudiKernel/IClassIDSvc.h"
24 #include "GaudiKernel/Guards.h"
25 #include "GaudiKernel/ConcurrencyFlags.h"
26 
30 #include "AthenaKernel/IIOVDbSvc.h"
31 #include "AthenaKernel/IOVRange.h"
33 #include "SGTools/DataProxy.h"
34 #include "StoreGate/StoreGateSvc.h"
35 
36 #include "IOVEntry.h"
37 #include "IOVSvc/IOVAddress.h"
38 #include "CBTree.h"
40 
41 #include <stdint.h>
42 #include <ctype.h>
43 #include <stdexcept>
44 #include <atomic>
45 
46 using SG::DataProxy;
48 
49 std::string toUpper(const std::string& str) {
50  const char *cstr = str.c_str();
51  std::string str2("");
52  for (unsigned int i=0; i < str.length(); ++i) {
53  str2 += toupper(*(cstr+i));
54  }
55 
56  return str2;
57 }
58 
59 namespace {
60  std::atomic<bool> s_firstRun(true);
61 }
62 
63 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
64 
65 using namespace std;
66 
67 //
69 //
70 
71 bool
73  const SG::TransientAddress* y) const {
74 
75  if ( x->clID() == y->clID() ) {
76  return ( x->name() < y->name() );
77  } else {
78  return ( x->clID() < y->clID() );
79  }
80 
81 }
82 
83 //
85 //
86 
87 bool
89  if (a&&b) {
90  if (a->name()!=b->name()) return a->name()<b->name();
91  if (a->clID()!=b->clID()) return a->clID()<b->clID();
92  }
93  //Fall back to ptr comp (in principle random, but similar name and
94  //clid means that the path in COOL is likely to be similar):
95  return a<b;
96 }
97 
98 //
100 //
101 
102 
103 IOVSvcTool::IOVSvcTool(const std::string& type, const std::string& name,
104  const IInterface* parent):
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 }
115 
116 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
117 
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 }
149 
150 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
151 
152 StatusCode
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 }
215 
216 
217 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
218 
219 void
220 IOVSvcTool::handle(const Incident &inc) {
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)) {
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(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)) {
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(),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 
491 
497  if (m_resetAllCallbacks) {
498  m_resetAllCallbacks = false;
499  if (perr != nullptr) throw (*perr);
500  return;
501  }
502 
503 
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 }
540 
541 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
542 
546 StatusCode
547 IOVSvcTool::regProxy( DataProxy *proxy, const std::string& key) {
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 }
576 
577 
578 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
579 
583 StatusCode
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 
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 
604 
605  return StatusCode::SUCCESS;
606 
607 }
608 
609 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
610 
611 namespace {
612 
613  template <class SET>
614  void removeFromSet (IOVEntry* ent, SET& set)
615  {
616  typename SET::iterator it = set.lower_bound(ent);
617  while (it != set.end() && !set.key_comp()(*it, ent) && !set.key_comp()(ent,*it)) {
618  if (*it == ent)
619  set.erase (it++);
620  else
621  ++it;
622  }
623  }
624 
625 
626 } // anonymous namespace
627 
628 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
629 
633 StatusCode
635  SG::DataProxy *pNew) {
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) {
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 }
678 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
679 
683 StatusCode
684 IOVSvcTool::regProxy( const CLID& clid, const std::string& key ) {
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 }
697 
698 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
699 
703 StatusCode
704 IOVSvcTool::deregProxy( const CLID& clid, const std::string& key ) {
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 }
717 
718 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
719 
723 StatusCode
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 }
747 
748 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
749 
753 StatusCode
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 }
776 
777 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
778 
780 {
781  if (iovr.start().isTimestamp()) {
784  } else {
787  }
788 
789  IOVRange *range = new IOVRange(iovr);
790 
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 }
828 
829 
830 StatusCode
831 IOVSvcTool::setRange(const CLID& clid, const std::string& key,
832  IOVRange& iovr)
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 }
859 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
860 
861 StatusCode
862 IOVSvcTool::getRange(const CLID& clid, const std::string& key,
863  IOVRange& iov) const {
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 }
878 
879 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
880 
881 StatusCode
882 IOVSvcTool::getRangeFromDB(const CLID& clid, const std::string& key,
883  IOVRange& range, std::string &tag,
884  std::unique_ptr<IOpaqueAddress>& ioa,
885  const IOVTime& curTime) const {
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 }
895 
896 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
897 
898 StatusCode
899 IOVSvcTool::getRangeFromDB(const CLID& clid, const std::string& key,
900  const IOVTime& time, IOVRange& range,
901  std::string& tag,
902  std::unique_ptr<IOpaqueAddress>& ioa) const {
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 }
918 
919 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
920 
921 StatusCode
922 IOVSvcTool::setRangeInDB(const CLID& clid, const std::string& key,
923  const IOVRange& range, const std::string &tag) {
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 }
955 
956 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
957 
958 StatusCode
959 IOVSvcTool::preLoadProxies(const EventContext& ctx) {
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 
988  StatusCode sc;
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  std::string key = dp->name();
1029  resetKeys[f].push_back(key);
1030  }
1031 
1032  CBNode* cn = m_trigTree->findNode( dp );
1033  if (cn != nullptr) {
1034  m_trigTree->cascadeTrigger(1, cn);
1035  }
1036 
1037  }
1038 
1039  if (scr.isFailure()) {
1040  ATH_MSG_ERROR("Problems preLoading proxies. No callbacks triggered.");
1041  return scr;
1042  }
1043 
1045  for (int i=2; i<= m_trigTree->maxLevel(); ++i) {
1046  CBTree::nodeSet::const_iterator itt, itt_s, itt_e;
1047  m_trigTree->listNodes( i, itt_s, itt_e );
1048  for (itt = itt_s; itt != itt_e; ++itt) {
1049  CBNode* node = *itt;
1050 
1051  if (node->trigger()) {
1052  BFCN *ff = node->fcn();
1053  if (m_sortKeys) { resetKeys[ff].sort(); }
1054  auditorSvc()->before("Callback",m_fcnMap[ff].name(),ctx);
1055  if ((*ff)(i,resetKeys[ff]).isFailure()) {
1056  auditorSvc()->after("Callback",m_fcnMap[ff].name(),ctx);
1057  ATH_MSG_ERROR("Problems calling ");
1058  return StatusCode::FAILURE;
1059  }
1060  auditorSvc()->after("Callback",m_fcnMap[ff].name(),ctx);
1061  }
1062  }
1063  }
1064 
1066 
1067  m_triggered = true;
1068 
1069  return scr;
1070 }
1071 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1072 
1073 StatusCode
1075 
1076  ATH_MSG_VERBOSE("triggerCallback(BFCN*)");
1077 
1078  int I {}; // initialize to something
1079  std::list<std::string> klist;
1080  klist.push_back(key);
1081  if ( (*fcn)(I,klist).isFailure() ) {
1082  ATH_MSG_ERROR("calling ");
1083  return StatusCode::FAILURE;
1084  }
1085 
1086  return StatusCode::SUCCESS;
1087 
1088 }
1089 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1090 
1091 StatusCode
1093  const std::string& key ) {
1094 
1095  ATH_MSG_VERBOSE("triggerCallback(DataProxy*)");
1096 
1097  std::map<const SG::DataProxy*, BFCN*>::const_iterator pitr =
1098  m_proxyMap.find(dp);
1099  if (pitr == m_proxyMap.end()) {
1100  ATH_MSG_ERROR("no callback associated with DataProxy " << m_names[dp]);
1101  return StatusCode::FAILURE;
1102  }
1103 
1104  BFCN* fcn = pitr->second;
1105 
1106  return ( triggerCallback(fcn,key) );
1107 
1108 }
1109 
1110 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1111 
1112 void
1114  startITR start_itr;
1115  std::string objname;
1116 
1117  if (m_startSet_Clock.begin() != m_startSet_Clock.end()) {
1118  msg() << endl << "ClockTime start set: " << endl;
1119  for (start_itr = m_startSet_Clock.begin(); start_itr!=m_startSet_Clock.end(); ++start_itr ) {
1120  objname = m_names.at( (*start_itr)->proxy() );
1121  msg() << " " << objname << " (" << (*start_itr)->proxy() << ") "
1122  << (*start_itr)->range()->start() << endl;
1123  }
1124  msg() << endl;
1125  }
1126 
1127  if (m_startSet_RE.begin() != m_startSet_RE.end()) {
1128  msg() << "Run/Event start set: " << endl;
1129  for (start_itr = m_startSet_RE.begin(); start_itr!=m_startSet_RE.end();++start_itr ) {
1130  objname = m_names.at( (*start_itr)->proxy() );
1131  msg() << " " << objname << " (" << (*start_itr)->proxy() << ") "
1132  << (*start_itr)->range()->start() << endl;
1133  }
1134  }
1135 
1136 }
1137 
1138 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1139 
1140 void
1142  stopITR stop_itr;
1143  std::string objname;
1144 
1145  if (m_stopSet_Clock.begin() != m_stopSet_Clock.end()) {
1146  msg() << endl << "ClockTime stop set: " << endl;
1147  for( stop_itr=m_stopSet_Clock.begin(); stop_itr!=m_stopSet_Clock.end(); ++stop_itr ) {
1148  objname = m_names.at((*stop_itr)->proxy());
1149  msg() << " " << objname << " (" << (*stop_itr)->proxy() << ") "
1150  << (*stop_itr)->range()->stop() << endl;
1151  }
1152  msg() << endl;
1153  }
1154 
1155  if (m_stopSet_RE.begin() != m_stopSet_RE.end()) {
1156  msg() << "Run/Event stop set: " << endl;
1157  for( stop_itr=m_stopSet_RE.begin(); stop_itr!=m_stopSet_RE.end(); ++stop_itr ) {
1158  objname = m_names.at((*stop_itr)->proxy());
1159  msg() << " " << objname << " (" << (*stop_itr)->proxy() << ") "
1160  << (*stop_itr)->range()->stop() << endl;
1161  }
1162  }
1163 }
1164 
1165 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1166 
1167 void
1169  msg() << endl;
1170  msg() << "------------------------------ IOVSvc Proxy Map "
1171  << "------------------------------" << endl;
1172 
1173  for (DataProxy* p : m_proxies) {
1174  PrintProxyMap(p);
1175  }
1176  msg() << "----------------------------------------------------------"
1177  << "---------------------" << endl;
1178 }
1179 
1180 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1181 
1182 void
1184 
1185  msg() << " " << dp << " " << dp->clID() << " "
1186  << m_names.find(dp)->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 }
1201 
1202 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1203 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1204 
1205 StatusCode
1207  const CallBackID& c,
1208  const IOVSvcCallBackFcn& fcn,
1209  bool trigger) {
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 {
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 }
1292 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1293 
1294 StatusCode
1296  const CallBackID& c2, const IOVSvcCallBackFcn& fcn2,
1297  bool trigger) {
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
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 }
1394 
1395 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1396 
1397 StatusCode
1398 IOVSvcTool::regFcn(const IAlgTool* ia,
1399  const CallBackID& c2, const IOVSvcCallBackFcn& fcn2,
1400  bool trigger) {
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 }
1427 
1428 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1429 
1430 StatusCode
1432  std::set<std::string>& tools) {
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 }
1444 
1445 
1446 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1447 
1448 StatusCode
1450  // Set flag to reset all proxies
1451  m_resetAllCallbacks = true;
1452  return (StatusCode::SUCCESS);
1453 }
1454 
1455 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1456 
1457 void
1458 IOVSvcTool::scanStartSet(startSet &pSet, const std::string &type,
1459  std::set<SG::DataProxy*, SortDPptr> &proxiesToReset,
1460  const IOVTime& curTime) const {
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 }
1491 
1492 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1493 
1494 void
1495 IOVSvcTool::scanStopSet(stopSet &pSet, const std::string &type,
1496  std::set<SG::DataProxy*, SortDPptr> &proxiesToReset,
1497  const IOVTime& curTime) const {
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 }
1526 
1527 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1528 
1529 bool
1531 
1532  return ! ( m_proxies.find( proxy ) == m_proxies.end() );
1533 
1534 }
1535 
1536 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1537 
1538 bool
1539 IOVSvcTool::holdsProxy( const CLID& clid, const std::string& key ) const {
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 }
1552 
1553 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1554 
1555 bool
1557 
1558  return ! (m_cbidMap.find(cb) == m_cbidMap.end());
1559 
1560 }
1561 
1562 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1563 
1564 bool
1565 IOVSvcTool::holdsAlgTool( const IAlgTool* ia ) const {
1566 
1567  ObjMap::const_iterator oitr = m_objMap.find( ia );
1568 
1569  return !(oitr == m_objMap.end());
1570 
1571 }
1572 
1573 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1574 
1575 void
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 }
1588 
1589 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1590 
1591 std::string
1593 
1594  return fullProxyName(tad->clID(), tad->name());
1595 
1596 }
1597 
1598 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1599 
1600 std::string
1602  return fullProxyName(dp->clID(), dp->name());
1603 }
1604 
1605 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1606 
1607 std::string
1608 IOVSvcTool::fullProxyName( const CLID& clid, const std::string& key ) const {
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 }
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
IOVSvcTool::holdsAlgTool
virtual bool holdsAlgTool(const IAlgTool *ia) const override
Definition: IOVSvcTool.cxx:1565
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:842
IOVSvcTool::m_forceReset
Gaudi::Property< bool > m_forceReset
Definition: IOVSvcTool.h:256
IOVSvcTool::stopSet
std::multiset< IOVEntry *, IOVEntry::IOVEntryStopCritereon > stopSet
Definition: IOVSvcTool.h:197
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:407
IOVTime::MAXRUN
static constexpr uint32_t MAXRUN
Definition: IOVTime.h:48
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:18
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:882
IOVSvcTool::resetAllProxies
virtual void resetAllProxies() override
Definition: IOVSvcTool.cxx:1576
IOVSvcTool::getTriggeredTools
virtual StatusCode getTriggeredTools(const std::string &key, std::set< std::string > &tools) override
Definition: IOVSvcTool.cxx:1431
IOVRange.h
Validity Range object. Holds two IOVTime instances (start and stop)
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:116
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:133
IOVSvcTool::reinitialize
virtual StatusCode reinitialize() override
Definition: IOVSvcTool.cxx:1449
CBTree::connectNode
void connectNode(CBNode *node, CBNode *parent)
Definition: CBTree.cxx:144
skel.it
it
Definition: skel.GENtoEVGEN.py:407
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
IOVEntry.h
IOVSvcTool::PrintStopSet
void PrintStopSet() const
Definition: IOVSvcTool.cxx:1141
CBTree.h
IOVSvcTool::scanStopSet
void scanStopSet(stopSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const
Definition: IOVSvcTool.cxx:1495
python.RatesEmulationExample.lock
lock
Definition: RatesEmulationExample.py:148
IOVSvcTool::regFcn
virtual StatusCode regFcn(SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger=false) override
Definition: IOVSvcTool.cxx:1206
IOVSvcTool::handle
virtual void handle(const Incident &) override
Definition: IOVSvcTool.cxx:220
IOVCallbackError.h
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
IIOVDbSvc.h
Abstract interface to IOVDbSvc to access IOVRange and tag information.
CBTree::clearTrigger
void clearTrigger() const
Definition: CBTree.cxx:417
x
#define x
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
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
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
IOVSvcTool::setRangeInDB
virtual StatusCode setRangeInDB(const CLID &clid, const std::string &key, const IOVRange &range, const std::string &tag) override
Definition: IOVSvcTool.cxx:922
SG::TransientAddress::name
const std::string & name() const
Get the primary (hashed) SG key.
Definition: TransientAddress.h:217
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:584
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:209
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::holdsCallback
virtual bool holdsCallback(const CallBackID &) const override
Definition: IOVSvcTool.cxx:1556
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::replaceProxy
virtual StatusCode replaceProxy(SG::DataProxy *pOld, SG::DataProxy *pNew) override
replace a registered DataProxy with a new version
Definition: IOVSvcTool.cxx:634
SG::TransientAddress::clID
CLID clID() const
Retrieve string key:
Definition: TransientAddress.h:210
IOVSvcTool::m_preLoadData
Gaudi::Property< bool > m_preLoadData
Definition: IOVSvcTool.h:252
IAddressProvider
interface for IOA providers
Definition: IAddressProvider.h:28
IOVSvcTool::m_firstEventOfRun
bool m_firstEventOfRun
Definition: IOVSvcTool.h:247
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
IOVTime::MAXTIMESTAMP
static constexpr uint64_t MAXTIMESTAMP
Definition: IOVTime.h:58
test_pyathena.parent
parent
Definition: test_pyathena.py:15
SortDPptr::operator()
bool operator()(const SG::DataProxy *, const SG::DataProxy *) const
Definition: IOVSvcTool.cxx:88
IOVSvcCallBackFcn
boost::function< StatusCode(IOVSVC_CALLBACK_ARGS) > IOVSvcCallBackFcn
the type of an IOVSvc call back: it wraps both the method and the object the method is called on
Definition: IOVSvcDefs.h:58
IOVSvcTool::preLoadDataTAD
virtual StatusCode preLoadDataTAD(const SG::TransientAddress *) override
add to a set of TADs that who's data will be preLoaded
Definition: IOVSvcTool.cxx:754
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:140
IOVSvcTool::holdsProxy
virtual bool holdsProxy(SG::DataProxy *proxy) const override
Definition: IOVSvcTool.cxx:1530
run
Definition: run.py:1
IOVEntry::removedStop
bool removedStop() const
Definition: IOVEntry.h:80
CBTree::listNodes
void listNodes() const
Definition: CBTree.cxx:337
IOVAddress.h
IOVSvcTool::fullProxyName
std::string fullProxyName(const SG::TransientAddress *) const
Definition: IOVSvcTool.cxx:1592
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
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
IOVSvcTool::initialize
virtual StatusCode initialize() override
Definition: IOVSvcTool.cxx:153
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
IOVSvcTool::IOVSvcTool
IOVSvcTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: IOVSvcTool.cxx:103
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
IProxyDict.h
IOVSvcTool::p_cndSvc
ServiceHandle< StoreGateSvc > p_cndSvc
Definition: IOVSvcTool.h:185
IOVSvcTool::m_preLoadExtensibleFolders
Gaudi::Property< bool > m_preLoadExtensibleFolders
Definition: IOVSvcTool.h:254
IOVSvcTool::getRange
virtual StatusCode getRange(const CLID &clid, const std::string &key, IOVRange &iov) const override
Definition: IOVSvcTool.cxx:862
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:240
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:76
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:1074
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::preLoadTAD
virtual StatusCode preLoadTAD(const SG::TransientAddress *) override
add to a set of TADs that will be registered at start of first event
Definition: IOVSvcTool.cxx:724
IOVSvcTool::scanStartSet
void scanStartSet(startSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const
Definition: IOVSvcTool.cxx:1458
IOVSvcTool::startSet
std::multiset< IOVEntry *, IOVEntry::IOVEntryStartCritereon > startSet
Definition: IOVSvcTool.h:196
IOVSvcTool.h
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
a
TList * a
Definition: liststreamerinfos.cxx:10
CBNode::name
const std::string & name() const
Definition: CBNode.h:74
y
#define y
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:779
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
python.Constants.INFO
int INFO
Definition: Control/AthenaCommon/python/Constants.py:15
TransientAddress.h
SortTADptr::operator()
bool operator()(const SG::TransientAddress *, const SG::TransientAddress *) const
Definition: IOVSvcTool.cxx:72
IOVSvcTool::m_names
std::map< const SG::DataProxy *, std::string > m_names
Definition: IOVSvcTool.h:201
DeMoScan.first
bool first
Definition: DeMoScan.py:534
DEBUG
#define DEBUG
Definition: page_access.h:11
IOVSvcTool::m_fcnMap
std::map< BFCN *, CallBackID > m_fcnMap
Definition: IOVSvcTool.h:219
IOVSvcTool::m_first
std::atomic< bool > m_first
Definition: IOVSvcTool.h:244
IOVCallbackError
Definition: IOVCallbackError.h:14
IProxyProviderSvc.h
IOVSvcTool::m_objMap
ObjMap m_objMap
Definition: IOVSvcTool.h:223
IIOVDbSvc::KeyInfo
Filled by IIOVDbSvc::getKeyInfo.
Definition: IIOVDbSvc.h:44
IOVSvcTool::~IOVSvcTool
virtual ~IOVSvcTool()
Definition: IOVSvcTool.cxx:118
IOVSvcTool::m_bfcnMap
std::multimap< BFCN *, const SG::DataProxy * > m_bfcnMap
Definition: IOVSvcTool.h:214
IAddressProvider.h
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
IOVSvcTool::m_cbidMap
std::map< CallBackID, BFCN * > m_cbidMap
Definition: IOVSvcTool.h:220
IOVTime::MINTIMESTAMP
static constexpr uint64_t MINTIMESTAMP
Definition: IOVTime.h:56
IOVSvcTool::preLoadProxies
StatusCode preLoadProxies(const EventContext &ctx)
Definition: IOVSvcTool.cxx:959
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:23
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
StoreGateSvc.h
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:547
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
IOVSvcTool::PrintStartSet
void PrintStartSet() const
Definition: IOVSvcTool.cxx:1113
IOVEntry::getStopITR
stopITR getStopITR() const
Definition: IOVEntry.h:89
IOVSvcTool::setRange
virtual StatusCode setRange(const CLID &clid, const std::string &key, IOVRange &) override
Definition: IOVSvcTool.cxx:831
node
Definition: node.h:21
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
SET
#define SET(n)
Definition: MD5.cxx:147
IOVSvcTool::m_resetAllCallbacks
bool m_resetAllCallbacks
Definition: IOVSvcTool.h:248
python.SystemOfUnits.L
float L
Definition: SystemOfUnits.py:92
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
DataProxy.h
IOVSvcTool::p_startSet
startSet * p_startSet
Definition: IOVSvcTool.h:227
IOVSvcTool::PrintProxyMap
void PrintProxyMap() const
Definition: IOVSvcTool.cxx:1168