ATLAS Offline Software
IOVSvcTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 (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 }
541 
542 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
543 
547 StatusCode
548 IOVSvcTool::regProxy( DataProxy *proxy, const std::string& key) {
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 }
577 
578 
579 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
580 
584 StatusCode
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 }
609 
610 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
611 
612 namespace {
613 
614  template <class SET>
615  void removeFromSet (IOVEntry* ent, SET& set)
616  {
617  typename SET::iterator it = set.lower_bound(ent);
618  while (it != set.end() && !set.key_comp()(*it, ent) && !set.key_comp()(ent,*it)) {
619  if (*it == ent)
620  set.erase (it++);
621  else
622  ++it;
623  }
624  }
625 
626 
627 } // anonymous namespace
628 
629 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
630 
634 StatusCode
636  SG::DataProxy *pNew) {
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 }
679 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
680 
684 StatusCode
685 IOVSvcTool::regProxy( const CLID& clid, const std::string& key ) {
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 }
698 
699 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
700 
704 StatusCode
705 IOVSvcTool::deregProxy( const CLID& clid, const std::string& key ) {
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 }
718 
719 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
720 
724 StatusCode
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 }
748 
749 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
750 
754 StatusCode
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 }
777 
778 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
779 
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 }
829 
830 
831 StatusCode
832 IOVSvcTool::setRange(const CLID& clid, const std::string& key,
833  IOVRange& iovr)
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 }
860 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
861 
862 StatusCode
863 IOVSvcTool::getRange(const CLID& clid, const std::string& key,
864  IOVRange& iov) const {
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 }
879 
880 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
881 
882 StatusCode
883 IOVSvcTool::getRangeFromDB(const CLID& clid, const std::string& key,
884  IOVRange& range, std::string &tag,
885  std::unique_ptr<IOpaqueAddress>& ioa,
886  const IOVTime& curTime) const {
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 }
896 
897 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
898 
899 StatusCode
900 IOVSvcTool::getRangeFromDB(const CLID& clid, const std::string& key,
901  const IOVTime& time, IOVRange& range,
902  std::string& tag,
903  std::unique_ptr<IOpaqueAddress>& ioa) const {
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 }
919 
920 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
921 
922 StatusCode
923 IOVSvcTool::setRangeInDB(const CLID& clid, const std::string& key,
924  const IOVRange& range, const std::string &tag) {
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 }
956 
957 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
958 
959 StatusCode
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 }
1072 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1073 
1074 StatusCode
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 }
1090 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1091 
1092 StatusCode
1094  const std::string& key ) {
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 }
1110 
1111 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1112 
1113 void
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 }
1138 
1139 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1140 
1141 void
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 }
1165 
1166 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1167 
1168 void
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 }
1180 
1181 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1182 
1183 void
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 }
1200 
1201 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1202 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1203 
1204 StatusCode
1206  const CallBackID& c,
1207  const IOVSvcCallBackFcn& fcn,
1208  bool trigger) {
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 }
1291 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1292 
1293 StatusCode
1295  const CallBackID& c2, const IOVSvcCallBackFcn& fcn2,
1296  bool trigger) {
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 }
1393 
1394 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1395 
1396 StatusCode
1397 IOVSvcTool::regFcn(const IAlgTool* ia,
1398  const CallBackID& c2, const IOVSvcCallBackFcn& fcn2,
1399  bool trigger) {
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 }
1426 
1427 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1428 
1429 StatusCode
1431  std::set<std::string>& tools) {
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 }
1443 
1444 
1445 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1446 
1447 StatusCode
1449  // Set flag to reset all proxies
1450  m_resetAllCallbacks = true;
1451  return (StatusCode::SUCCESS);
1452 }
1453 
1454 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1455 
1456 void
1457 IOVSvcTool::scanStartSet(startSet &pSet, const std::string &type,
1458  std::set<SG::DataProxy*, SortDPptr> &proxiesToReset,
1459  const IOVTime& curTime) const {
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 }
1490 
1491 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1492 
1493 void
1494 IOVSvcTool::scanStopSet(stopSet &pSet, const std::string &type,
1495  std::set<SG::DataProxy*, SortDPptr> &proxiesToReset,
1496  const IOVTime& curTime) const {
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 }
1525 
1526 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1527 
1528 bool
1530 
1531  return ! ( m_proxies.find( proxy ) == m_proxies.end() );
1532 
1533 }
1534 
1535 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1536 
1537 bool
1538 IOVSvcTool::holdsProxy( const CLID& clid, const std::string& key ) const {
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 }
1551 
1552 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1553 
1554 bool
1556 
1557  return ! (m_cbidMap.find(cb) == m_cbidMap.end());
1558 
1559 }
1560 
1561 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1562 
1563 bool
1564 IOVSvcTool::holdsAlgTool( const IAlgTool* ia ) const {
1565 
1566  ObjMap::const_iterator oitr = m_objMap.find( ia );
1567 
1568  return !(oitr == m_objMap.end());
1569 
1570 }
1571 
1572 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1573 
1574 void
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 }
1587 
1588 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1589 
1590 std::string
1592 
1593  return fullProxyName(tad->clID(), tad->name());
1594 
1595 }
1596 
1597 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1598 
1599 std::string
1601  return fullProxyName(dp->clID(), dp->name());
1602 }
1603 
1604 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1605 
1606 std::string
1607 IOVSvcTool::fullProxyName( const CLID& clid, const std::string& key ) const {
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 }
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:1564
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
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: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::resetAllProxies
virtual void resetAllProxies() override
Definition: IOVSvcTool.cxx:1575
IOVSvcTool::getTriggeredTools
virtual StatusCode getTriggeredTools(const std::string &key, std::set< std::string > &tools) override
Definition: IOVSvcTool.cxx:1430
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: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
IOVSvcTool::reinitialize
virtual StatusCode reinitialize() override
Definition: IOVSvcTool.cxx:1448
CBTree::connectNode
void connectNode(CBNode *node, CBNode *parent)
Definition: CBTree.cxx:144
skel.it
it
Definition: skel.GENtoEVGEN.py:396
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:1142
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:1494
IOVSvcTool::regFcn
virtual StatusCode regFcn(SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger=false) override
Definition: IOVSvcTool.cxx:1205
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
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:923
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::holdsCallback
virtual bool holdsCallback(const CallBackID &) const override
Definition: IOVSvcTool.cxx:1555
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:635
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
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:755
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
IOVAddress.h
IOVSvcTool::fullProxyName
std::string fullProxyName(const SG::TransientAddress *) const
Definition: IOVSvcTool.cxx:1591
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:863
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:221
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
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:185
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:725
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::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: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
TransientAddress.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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: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
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: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:44
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: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
IOVSvcTool::setRange
virtual StatusCode setRange(const CLID &clid, const std::string &key, IOVRange &) override
Definition: IOVSvcTool.cxx:832
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
SET
#define SET(n)
Definition: MD5.cxx:147
IOVSvcTool::m_resetAllCallbacks
bool m_resetAllCallbacks
Definition: IOVSvcTool.h:248
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:1169