ATLAS Offline Software
IOVSvcTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 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  static const bool CREATEIF(true);
156 
157  IIOVSvc* p_iovSvc(nullptr);
158  ATH_CHECK( service("IOVSvc", p_iovSvc,CREATEIF) );
159 
160  IProperty* iovSvcProp = dynamic_cast<IProperty*>( p_iovSvc );
161  if (iovSvcProp == nullptr) {
162  ATH_MSG_ERROR("Unable to dcast the IOVSvc to an IProperty");
163  return StatusCode::FAILURE;
164  }
165 
166  ATH_CHECK( setProperty( iovSvcProp->getProperty("preLoadRanges") ) );
167  ATH_CHECK( setProperty( iovSvcProp->getProperty("preLoadData") ) );
168  ATH_CHECK( setProperty( iovSvcProp->getProperty("partialPreLoadData") ) );
169  ATH_CHECK( setProperty( iovSvcProp->getProperty("preLoadExtensibleFolders") ) );
170  ATH_CHECK( setProperty( iovSvcProp->getProperty("updateInterval") ) );
171  ATH_CHECK( setProperty( iovSvcProp->getProperty("sortKeys") ) );
172  ATH_CHECK( setProperty( iovSvcProp->getProperty("forceResetAtBeginRun") ) );
173  ATH_CHECK( setProperty( iovSvcProp->getProperty("OutputLevel") ) );
174 
175  int pri=100;
176 
177  std::string updi = toUpper(m_updateInterval);
178 
179  if (updi== "JOB") {
180  m_checkOnce = true;
181  m_checkTrigger = "BeginRun";
182  p_incSvc->addListener( this, "BeginRun", pri, true);
183  msg() << MSG::INFO;
184  msg().setColor(MSG::GREEN);
185  msg() << "IOVRanges will be checked only ";
186  msg().setColor(MSG::CYAN);
187  msg() << "once";
188  msg().setColor(MSG::GREEN);
189  msg() << " at the start of the job" << endmsg;
190  } else if (updi == "RUN") {
191  m_checkTrigger = "BeginRun";
192  p_incSvc->addListener( this, "BeginRun", pri, true);
193  msg() << MSG::INFO;
194  msg().setColor(MSG::GREEN);
195  msg() << "IOVRanges will be checked at every ";
196  msg().setColor(MSG::CYAN);
197  msg() << "Run" << endmsg;
198  } else if (updi == "EVENT") {
199  m_checkTrigger = "BeginEvent";
200  p_incSvc->addListener( this, "BeginEvent", pri, true);
201  p_incSvc->addListener( this, "BeginRun", pri, true);
202  msg() << MSG::INFO;
203  msg().setColor(MSG::GREEN);
204  msg() << "IOVRanges will be checked at every ";
205  msg().setColor(MSG::CYAN);
206  msg() << "Event" << endmsg;
207  } else {
208  ATH_MSG_FATAL("jobOption \"updateInterval\" must be one of "
209  << "\"event\" \"run\" or \"job\"");
210  return StatusCode::FAILURE;
211  }
212 
213  if (m_preLoadData) {
214  msg() << MSG::INFO;
215  msg().setColor(MSG::GREEN);
216  msg() << "IOV Data will be preloaded at the same interval" << endmsg;
217  }
218 
219  ATH_MSG_DEBUG("Tool initialized");
220 
221  return StatusCode::SUCCESS;
222 }
223 
224 
225 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
226 
227 void
228 IOVSvcTool::handle(const Incident &inc) {
229 
230  bool initial_first = m_first;
231 
232  // Don't bother doing anything if we're handled the first run, and
233  // preLoadData has been set, or if we only want to check once at the
234  // beginning of the job
235  if (!initial_first && m_preLoadData && m_checkOnce) {
236  return;
237  }
238  else if (!initial_first) {
239  if ( inc.type() != m_checkTrigger && inc.type() != IncidentType::BeginRun ) {
240  return;
241  }
242  }
243 
244  std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
245  if (initial_first) {
246  if (!m_first && m_preLoadData && m_checkOnce) {
247  return;
248  }
249  // cppcheck-suppress oppositeInnerCondition
250  else if (!m_first) {
251  if ( inc.type() != m_checkTrigger && inc.type() != IncidentType::BeginRun ) {
252  return;
253  }
254  }
255  // cppcheck-suppress identicalInnerCondition
256  if (m_first) {
257  for (auto e : m_ignoredProxyNames) {
258  DataProxy* proxy = p_cndSvc->proxy(e.first,e.second);
259  ATH_MSG_DEBUG("retrieving "<<fullProxyName(e.first,e.second));
260  if (proxy == nullptr) {
261  ATH_MSG_ERROR("ignoreProxy: could not retrieve proxy "
262  << fullProxyName(e.first,e.second) << " from store");
263  } else {
264  ignoreProxy( proxy );
265  ATH_MSG_DEBUG("will ignore resetting proxy " << fullProxyName(proxy));
266  }
267  }
268  m_first = false;
269  }
270  else {
271  initial_first=false;
272  }
273  }//end first
274  const bool first = initial_first;
275 
276  // Forcing IOV checks on the first event in the run for AthenaMP (ATEAM-439)
277  if(Gaudi::Concurrency::ConcurrencyFlags::numProcs()==0) {
278  if (inc.type() == IncidentType::BeginRun) {
279  m_firstEventOfRun = true;
280  }
281 
282  if (inc.type() == IncidentType::BeginEvent && m_firstEventOfRun) {
283  m_firstEventOfRun = false;
284  if (m_checkTrigger == "BeginEvent") {
285  return;
286  }
287  }
288  }
289 
290  set< DataProxy*, SortDPptr > proxiesToReset;
291  if ( inc.type() == m_checkTrigger || inc.type() == IncidentType::BeginRun ) {
292 
293  const EventContext& context = inc.context();
294 
295  IOVTime curTime;
296 
297  const EventIDBase& eventID = context.eventID();
298  uint32_t event = eventID.lumi_block();
299  uint32_t run = eventID.run_number();
300 
301  ATH_MSG_DEBUG("Got event info: " << "run="<< run << ", event=" << event);
302  curTime.setRunEvent(run,event);
303 
304  // get ns timestamp from event
305  curTime.setTimestamp(1000000000L*(uint64_t)eventID.time_stamp() + eventID.time_stamp_ns_offset());
306 
307  if (msgLvl(MSG::DEBUG)) {
308  msg().setColor(MSG::YELLOW,MSG::RED);
309  msg() << inc.type() << ": [R/LB] = " << curTime << endmsg;
310  }
311 
312  if (inc.type() == IncidentType::BeginRun) {
313  // Signal BeginRun directly to IOVDbSvc
314  IIOVDbSvc *iovDB = 0;
315  if (StatusCode::SUCCESS != service("IOVDbSvc", iovDB, false)) {
316  ATH_MSG_DEBUG("Unable to get the IOVDbSvc");
317  return;
318  }
319  if (StatusCode::SUCCESS != iovDB->signalBeginRun(curTime,
320  inc.context()))
321  {
322  ATH_MSG_ERROR("Unable to signal begin run to IOVDbSvc");
323  return;
324  }
325  else {
326  ATH_MSG_DEBUG("Signaled begin run to IOVDbSvc " << curTime);
327  }
328  }
329 
330  if (first) {
331 
332  std::set< const TransientAddress*, SortTADptr >::const_iterator titr;
333  for (titr = m_preLoad.begin(); titr != m_preLoad.end(); ++titr) {
334  const TransientAddress *tad = *titr;
335  StatusCode sc = regProxy(tad->clID(), tad->name());
336  if (StatusCode::SUCCESS != sc) {
337  ATH_MSG_ERROR("handle: Could not register proxy for " <<
338  fullProxyName(tad->clID(), tad->name()));
339  return;
340  }
341  }
342 
343  if (msgLvl(MSG::VERBOSE)) {
344  PrintProxyMap();
345  msg() << endmsg;
346  }
347 
348  if (msgLvl(MSG::DEBUG)) {
349  msg() << "Callback Tree:" << endmsg;
351  }
352 
353  // preLoad the ranges and data if requested.
354  if (preLoadProxies().isFailure()) {
355  ATH_MSG_ERROR("Problems preloading IOVRanges");
356  throw( std::runtime_error("IOVSvcTool::preLoadProxies") );
357  }
358 
359  // Signal EndProxyPreload directly to IOVDbSvc
360  IIOVDbSvc *iovDB = nullptr;
361  if (service("IOVDbSvc", iovDB, false).isSuccess()) {
362  iovDB->signalEndProxyPreload();
363  ATH_MSG_DEBUG("Signaled end proxy preload to IOVDbSvc " << curTime);
364  }
365  }// end if first
366 
367  // If preLoadData has been set, never check validity of data again.
368  if (m_preLoadData && m_checkOnce) {
369  return;
370  }
371 
372  // Otherwise, do the normal check for validity
373 
374 
375  if (msgLvl(MSG::DEBUG)) {
376  PrintStartSet();
377  PrintStopSet();
378  msg() << endmsg;
379  }
380 
381  std::map<BFCN*, std::list<std::string> > resetKeys;
382 
383  //
386  //
387 
388  if (inc.type() == IncidentType::BeginRun && m_forceReset && !s_firstRun) {
389 
390  ATH_MSG_DEBUG("Resetting all proxies on BeginRun incident for store \""
391  << m_storeName << "\"");
392 
393  if (msgLvl(MSG::VERBOSE)) {
394  std::set< const SG::DataProxy* >::const_iterator pit;
395  for (SG::DataProxy* p : m_proxies) {
396  msg() << " " << m_names.at(p) << std::endl;
397  }
398  msg() << endmsg;
399  }
400  proxiesToReset = m_proxies;
401  m_triggered = false;
402  } else {
403  scanStartSet(m_startSet_Clock,"(ClockTime)",proxiesToReset,curTime);
404  scanStartSet(m_startSet_RE,"(R/E)",proxiesToReset,curTime);
405 
406  scanStopSet(m_stopSet_Clock,"(ClockTime)",proxiesToReset,curTime);
407  scanStopSet(m_stopSet_RE,"(R/E)",proxiesToReset,curTime);
408  }
409 
410  for (auto p : m_ignoredProxies) {
411  auto itr = proxiesToReset.find(p);
412  if (itr != proxiesToReset.end()) {
413  proxiesToReset.erase( itr );
414  }
415  }
416 
417  // If MT, must not call any callback functions after first event
418  if (!first && proxiesToReset.size() > 0 &&
420  Gaudi::Concurrency::ConcurrencyFlags::numConcurrentEvents()) > 0 ) ) {
421  ATH_MSG_FATAL("Cannot update Conditions via callback functions in MT after the first event");
422  for (const auto* prox : proxiesToReset) {
423  ATH_MSG_FATAL("CLID=" << prox->clID() << ", name=" << prox->name());
424  }
425  throw GaudiException("Cannot update Conditions via callback functions in MT after the first event",name(),StatusCode::FAILURE);
426  }
427 
428  //
431  //
432  for (DataProxy* prx : proxiesToReset) {
433  ATH_MSG_VERBOSE("clearing proxy payload for " << m_names.at(prx));
434 
435  // Reset proxy except when one wants to reset callbacks
436 
437  if (!m_resetAllCallbacks) p_cndSvc->clearProxyPayload( prx );
438 
439  m_trigTree->cascadeTrigger(true, prx);
440 
441  // Load data if preload requested.
442 
443  if ( (m_partialPreLoadData &&
444  m_partPreLoad.find(TADkey(*prx)) != m_partPreLoad.end())
445  ||
446  m_preLoadData ) {
447  ATH_MSG_VERBOSE("preloading data");
448 
449  Gaudi::Guards::AuditorGuard auditor(m_names.at(prx), auditorSvc(), "preLoadProxy");
450  if (prx->accessData() == nullptr) {
451  ATH_MSG_ERROR("problems preloading data for " << m_names.at(prx));
452  }
453  }
454 
455  std::list<std::string> keys;
456  pair<pmITR,pmITR> fitr = m_proxyMap.equal_range( prx );
457  for (pmITR p=fitr.first; p!=fitr.second; ++p) {
458  BFCN *f = p->second;
459  std::string key = prx->name();
460  resetKeys[f].push_back(key);
461  }
462  }
463 
465 
466  // Check to see if it's first event, and if preLoadProxies has already
467  // called the functions
468 
470 
471  if (! (first && m_triggered) ) {
472  for (int i=2; i<= m_trigTree->maxLevel(); ++i) {
473  CBTree::nodeSet::const_iterator itt, itt_s, itt_e;
474  m_trigTree->listNodes( i, itt_s, itt_e );
475  for (itt = itt_s; itt != itt_e; ++itt) {
476  CBNode* node = *itt;
477 
478  if (node->trigger()) {
479  BFCN *ff = node->fcn();
480  auditorSvc()->before("Callback",m_fcnMap.at(ff).name());
481  if ((*ff)(i,resetKeys[ff]).isFailure()) {
482  auditorSvc()->after("Callback",m_fcnMap.at(ff).name());
483  ATH_MSG_ERROR("Problems calling " << m_fcnMap.at(ff).name()
484  << std::endl << "Skipping all subsequent callbacks.");
485  // this will cause a mem leak, but I don't care
486  perr = new IOVCallbackError(m_fcnMap.at(ff).name());
487  break;
488  }
489  auditorSvc()->after("Callback",m_fcnMap.at(ff).name());
490 
491  }
492  }
493  if (perr != nullptr) break;
494  }
495  }
496 
497 
500 
506  if (m_resetAllCallbacks) {
507  m_resetAllCallbacks = false;
508  if (perr != nullptr) throw (*perr);
509  return;
510  }
511 
512 
515  for (DataProxy* prx : proxiesToReset) {
516  pitr = m_entries.find( prx );
517  if ( pitr != m_entries.end() && pitr->second->range()->isInRange(curTime) ) {
518  ATH_MSG_VERBOSE("range still valid for " << m_names.at(prx));
519  } else {
520  ATH_MSG_DEBUG("calling provider()->udpateAddress(TAD) for " << m_names.at(prx) );
521  if (!prx->updateAddress()) {
522  ATH_MSG_ERROR("handle: Could not update address");
523  if (perr != nullptr) throw (*perr);
524  return;
525  }
526  }
527 
528  if (msgLvl(MSG::VERBOSE)) {
529  IOpaqueAddress *ioa = prx->address();
530  // Print out some debug info if this is an IOVAddress (coming
531  // from IOVASCIIDbSvc)
532  IOVAddress *iova = dynamic_cast<IOVAddress*>(ioa);
533  if (iova != nullptr) {
534  ATH_MSG_VERBOSE(" range: " << iova->range());
535  }
536  }
537 
538  }
539 
540  if (perr != nullptr) throw (*perr);
541 
542  } // end if(inc.type() == m_checkTrigger)
543 
544  if ( inc.type() == IncidentType::BeginRun) {
545  s_firstRun = false;
546  }
547 
548 }
549 
550 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
551 
555 StatusCode
556 IOVSvcTool::regProxy( DataProxy *proxy, const std::string& key) {
557 
558 
559  if (proxy == nullptr) {
560  ATH_MSG_ERROR("proxy == 0");
561  return StatusCode::FAILURE;
562  }
563 
564  ATH_MSG_DEBUG("registering proxy " << fullProxyName(proxy) << " at " << proxy);
565 
566  if (m_proxies.find(proxy) != m_proxies.end()) {
567  ATH_MSG_DEBUG("Proxy for " << fullProxyName(proxy)
568  << " already registered: " << proxy->name());
569  return StatusCode::SUCCESS;
570  }
571 
572  std::string tname, fullname;
573  ATH_CHECK( p_CLIDSvc->getTypeNameOfID(proxy->clID(), tname) );
574 
575  fullname = tname + "[" + key + "]";
576 
577  m_proxies.insert( proxy );
578  m_names[ proxy ] = fullname;
579 
580  m_trigTree->addNode(proxy,fullname);
581 
582  return StatusCode::SUCCESS;
583 
584 }
585 
586 
587 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
588 
592 StatusCode
594 
595 
596  if (proxy == nullptr) {
597  ATH_MSG_ERROR("proxy == 0");
598  return StatusCode::FAILURE;
599  }
600 
601  ATH_MSG_DEBUG("removing proxy " << fullProxyName(proxy) << " at " << proxy);
602 
604  if (itr == m_proxies.end()) {
605  ATH_MSG_DEBUG("Proxy for " << fullProxyName(proxy)
606  << " not registered: " << proxy->name());
607  return StatusCode::SUCCESS;
608  }
609 
610  m_proxies.erase( itr );
611 
613 
614  return StatusCode::SUCCESS;
615 
616 }
617 
618 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
619 
620 namespace {
621 
622  template <class SET>
623  void removeFromSet (IOVEntry* ent, SET& set)
624  {
625  typename SET::iterator it = set.lower_bound(ent);
626  while (it != set.end() && !set.key_comp()(*it, ent) && !set.key_comp()(ent,*it)) {
627  if (*it == ent)
628  set.erase (it++);
629  else
630  ++it;
631  }
632  }
633 
634 
635 } // anonymous namespace
636 
637 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
638 
642 StatusCode
644  SG::DataProxy *pNew) {
645  std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
646  assert(nullptr != pOld);
647  assert(nullptr != pNew);
648 
649  ATH_MSG_DEBUG("replace proxy " << fullProxyName(pOld)
650  << " @" << pOld << " with " << fullProxyName(pNew)
651  << " @" << pNew);
652 
653  //start with the proxy list
654  if (0 == m_proxies.erase(pOld)) {
655  ATH_MSG_DEBUG("unregProxy: original proxy "
656  << fullProxyName(pOld) << " not found. Will return now ");
657  return StatusCode::SUCCESS;
658  }
659  m_proxies.insert(pNew);
660  //new name (possibly identical to old)
661  m_names.erase(pOld);
662  std::string tname;
663  ATH_CHECK( p_CLIDSvc->getTypeNameOfID(pNew->clID(), tname) );
664 
665  m_names[pNew]=tname + "[" + pNew->name() + "]";
666 
667  if (pOld != pNew) {
669  m_entries.find(pOld);
670  if (ent != m_entries.end()) {
671  removeFromSet (ent->second, m_startSet_Clock);
672  removeFromSet (ent->second, m_startSet_RE);
673  removeFromSet (ent->second, m_stopSet_Clock);
674  removeFromSet (ent->second, m_stopSet_RE);
675 
676  setRange_impl (pNew, *(const_cast<IOVRange*>(ent->second->range())));
677  delete ent->second;
678  m_entries.erase (ent);
679  }
680  }
681 
682  return (m_trigTree->replaceProxy(pOld, pNew) ?
683  StatusCode::SUCCESS :
684  StatusCode::FAILURE );
685 
686 }
687 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
688 
692 StatusCode
693 IOVSvcTool::regProxy( const CLID& clid, const std::string& key ) {
694 
695  DataProxy* proxy = p_cndSvc->proxy(clid,key);
696 
697  if (proxy == nullptr) {
698  ATH_MSG_ERROR("regProxy could not retrieve proxy "
699  << fullProxyName(clid,key) << " from store");
700  return StatusCode::FAILURE;
701  }
702 
703  return ( regProxy(proxy, key) );
704 
705 }
706 
707 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
708 
712 StatusCode
713 IOVSvcTool::deregProxy( const CLID& clid, const std::string& key ) {
714 
715  DataProxy* proxy = p_cndSvc->proxy(clid,key);
716 
717  if (proxy == nullptr) {
718  ATH_MSG_ERROR("regProxy could not retrieve proxy "
719  << fullProxyName(clid,key) << " from store");
720  return StatusCode::FAILURE;
721  }
722 
723  return ( deregProxy(proxy) );
724 
725 }
726 
727 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
728 
732 StatusCode
734 
735  // check to see if it's a duplicate in preLoad
736  if (m_preLoad.find( tad_in ) != m_preLoad.end()) {
737  ATH_MSG_WARNING("preLoadTAD: TransientAddress ("
738  << tad_in->clID() << "/" << tad_in->name()
739  << ") alread in preLoad set. Not inserting");
740  return StatusCode::SUCCESS;
741  }
742 
743  // check to see if it's a duplicate in partPreLoad
744  if (m_partPreLoad.find( TADkey(*tad_in) ) != m_partPreLoad.end()) {
745  ATH_MSG_WARNING("preLoadTAD: TransientAddress ("
746  << tad_in->clID() << "/" << tad_in->name()
747  << ") alread in partPreLoad set. Not inserting");
748  return StatusCode::SUCCESS;
749  }
750 
751  TransientAddress* tad = new TransientAddress (tad_in->clID(),tad_in->name());
752  m_preLoad.insert( tad );
753 
754  return StatusCode::SUCCESS;
755 }
756 
757 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
758 
762 StatusCode
764 
765  if (m_preLoad.find(tad_in) != m_preLoad.end()) {
766  ATH_MSG_WARNING("preLoadDataTAD: TransientAddress "
767  << fullProxyName( tad_in )
768  << " alread in preLoad set. Not inserting");
769  return StatusCode::SUCCESS;
770  }
771 
772  if (m_partPreLoad.find(TADkey(*tad_in)) != m_partPreLoad.end()) {
773  ATH_MSG_WARNING("preLoadDataTAD: TransientAddress "
774  << fullProxyName( tad_in )
775  << " alread in partPreLoad set. Not inserting");
776  return StatusCode::SUCCESS;
777  }
778 
779  TransientAddress* tad = new TransientAddress (tad_in->clID(),tad_in->name());
780  m_preLoad.insert( tad );
781  m_partPreLoad.insert( TADkey(*tad) );
782 
783  return StatusCode::SUCCESS;
784 }
785 
786 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
787 
789 {
790  if (iovr.start().isTimestamp()) {
793  } else {
796  }
797 
798  IOVRange *range = new IOVRange(iovr);
799 
801  if ( itr != m_entries.end() ) {
802 
803  IOVEntry *ent = itr->second;
804  const IOVRange *irn = ent->range();
805 
806  if (*irn == iovr) {
807  ATH_MSG_DEBUG("Range has not changed. Returning");
808  delete range;
809  return;
810  // is this true? still in the start and stop sets? FIXME
811  }
812 
813 
814  startITR sitr = ent->getStartITR();
815  if ( !ent->removedStart() ) {
816  p_startSet->erase( sitr );
817  }
818 
819 
820 
821  stopITR pitr = ent->getStopITR();
822  if ( !ent->removedStop() ) {
823  p_stopSet->erase( pitr );
824  }
825 
826  delete ent;
827  }
828 
829  ATH_MSG_DEBUG("adding to start and stop sets");
830  IOVEntry *ent = new IOVEntry(proxy,range);
831 
832  m_entries[ proxy ] = ent;
833 
834  ent->setStartITR( p_startSet->insert( ent ) );
835  ent->setStopITR( p_stopSet->insert( ent ) );
836 }
837 
838 
839 StatusCode
840 IOVSvcTool::setRange(const CLID& clid, const std::string& key,
841  IOVRange& iovr)
842 {
843 
844  ATH_MSG_DEBUG("setRange() for clid: " << clid << " key: " << key
845  << " in IOVrange:" << iovr);
846 
847  if (!iovr.start().isValid() || !iovr.stop().isValid()) {
848  ATH_MSG_ERROR("IOVRange " << iovr << "is not valid. Start OK: "
849  << iovr.start().isValid() << " Stop OK: " << iovr.stop().isValid()
850  << " run/evt/time min/max "
851  << IOVTime::MINRUN << "/" << IOVTime::MAXRUN << " "
852  << IOVTime::MINEVENT << "/" << IOVTime::MAXEVENT << " "
853  << IOVTime::MINTIMESTAMP << "/" << IOVTime::MAXTIMESTAMP << " ");
854  return StatusCode::FAILURE;
855  }
856 
857  DataProxy* proxy = p_cndSvc->proxy(clid,key);
858 
859  if (proxy == nullptr) {
860  ATH_MSG_ERROR("setRange: Could not locate proxy for " << fullProxyName(clid,key));
861  return StatusCode::FAILURE;
862  }
863 
864  std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
865  setRange_impl (proxy, iovr);
866  return StatusCode::SUCCESS;
867 }
868 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
869 
870 StatusCode
871 IOVSvcTool::getRange(const CLID& clid, const std::string& key,
872  IOVRange& iov) const {
873 
874  DataProxy* dp = p_cndSvc->proxy(clid,key);
875 
876  std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
877  std::map<const DataProxy*,IOVEntry*>::const_iterator itr(m_entries.find(dp));
878  if (itr == m_entries.end()) {
879  return StatusCode::FAILURE;
880  }
881 
882  iov = *(itr->second->range());
883 
884  return StatusCode::SUCCESS;
885 
886 }
887 
888 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
889 
890 StatusCode
891 IOVSvcTool::getRangeFromDB(const CLID& clid, const std::string& key,
892  IOVRange& range, std::string &tag,
893  std::unique_ptr<IOpaqueAddress>& ioa,
894  const IOVTime& curTime) const {
895 
896  if (curTime.isValid()) {
897  return getRangeFromDB(clid, key, curTime, range, tag, ioa);
898  } else {
899  ATH_MSG_ERROR("Current Event not defined");
900  return StatusCode::FAILURE;
901  }
902 
903 }
904 
905 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
906 
907 StatusCode
908 IOVSvcTool::getRangeFromDB(const CLID& clid, const std::string& key,
909  const IOVTime& time, IOVRange& range,
910  std::string& tag,
911  std::unique_ptr<IOpaqueAddress>& ioa) const {
912  StatusCode sc(StatusCode::FAILURE);
913  DataProxy* dp = p_cndSvc->proxy(clid,key);
914  if (nullptr != dp) {
915  IIOVDbSvc *idb =
916  dynamic_cast<IIOVDbSvc*>(dp->provider());
917  if (idb != nullptr) {
918  sc = idb->getRange(clid, key, time, range, tag, ioa);
919  } else {
920  ATH_MSG_ERROR("Provider is not an IIOVDbSvc");
921  }
922  } else {
923  ATH_MSG_ERROR("No proxy found for clid " << clid << " key " << key);
924  }
925  return sc;
926 }
927 
928 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
929 
930 StatusCode
931 IOVSvcTool::setRangeInDB(const CLID& clid, const std::string& key,
932  const IOVRange& range, const std::string &tag) {
933 
934 
935  if (!range.start().isValid() || !range.stop().isValid()) {
936  ATH_MSG_ERROR("IOVRange " << range << "is not valid.");
937  return StatusCode::FAILURE;
938  }
939 
940  DataProxy* dp = p_cndSvc->proxy(clid,key);
941 
942  if (dp == nullptr) {
943  ATH_MSG_ERROR("no Proxy found for " << fullProxyName( clid, key ));
944  return StatusCode::FAILURE;
945  }
946 
947  std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
948  std::map<const DataProxy*,IOVEntry*>::const_iterator itr(m_entries.find(dp));
949  if (itr == m_entries.end()) {
950  ATH_MSG_WARNING(fullProxyName(clid,key) << " not registered with the IOVSvc");
951  }
952 
953  IAddressProvider *iadp = dp->provider();
954  IIOVDbSvc *idb = dynamic_cast<IIOVDbSvc*>(iadp);
955 
956  if (idb != nullptr) {
957  return idb->setRange(clid, key, range, tag);
958  } else {
959  ATH_MSG_ERROR("Provider is not an IIOVDbSvc");
960  return StatusCode::FAILURE;
961  }
962 
963 }
964 
965 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
966 
967 StatusCode
969 
970  ATH_MSG_DEBUG("preLoadProxies()");
971 
972  StatusCode scr(StatusCode::SUCCESS);
973 
974  IIOVDbSvc *iovDB = nullptr;
975  service("IOVDbSvc", iovDB, false).ignore();
976 
977  std::map<BFCN*, std::list<std::string> > resetKeys;
978  for (DataProxy* dp : m_proxies) {
979  Gaudi::Guards::AuditorGuard auditor(m_names[dp], auditorSvc(), "preLoadProxy");
980 
981  if (msgLvl(MSG::VERBOSE)) {
982  msg().setColor(MSG::CYAN);
983  msg() << "loading proxy for CLID: " << dp->clID()
984  << " " << m_names[dp] << endmsg;
985  }
986 
987  if (dp->provider() == nullptr) {
988  msg() << MSG::FATAL << "No provider found for proxy " << m_names[dp]
989  << ". It is probably not a conditions object" << endl;
990  msg() << "Proxy Map: ";
991  PrintProxyMap(dp);
992  msg() << endmsg;
993  scr = StatusCode::FAILURE;
994  return (scr);
995  }
996 
997 
998  StatusCode sc;
999  // preload IOVRanges for callback functions or if jobOption set
1000  // This gets us to an IAddressProvider (eg IOVDbSvc)
1001  pair<pmITR,pmITR> pi = m_proxyMap.equal_range(dp);
1002  if (pi.first != pi.second || m_preLoadRanges) {
1003  ATH_MSG_VERBOSE("updating Range");
1004  if (!dp->updateAddress())
1005  sc = StatusCode::FAILURE;
1006  }
1007 
1008  if ( ( m_partialPreLoadData &&
1009  m_partPreLoad.find(TADkey(*dp)) != m_partPreLoad.end() )
1010  || m_preLoadData ) {
1011 
1012  IIOVDbSvc::KeyInfo kinfo;
1013  if ( !m_preLoadExtensibleFolders && iovDB &&
1014  iovDB->getKeyInfo(dp->name(), kinfo) && kinfo.extensible ) {
1015  ATH_MSG_VERBOSE("not preloading data for extensible folder " << dp->name());
1016  }
1017  else {
1018  ATH_MSG_VERBOSE("preloading data for ("
1019  << dp->clID() << "/"
1020  << dp->name() << ")");
1021  if( dp->accessData() != nullptr ) {
1022  sc = StatusCode::SUCCESS;
1023  } else {
1024  sc = StatusCode::FAILURE;
1025  ATH_MSG_ERROR("preLoading proxies: accessData() failed for " <<
1026  dp->clID() << "/" << dp->name() << ")");
1027  }
1028  }
1029  }
1030 
1031  if (sc.isFailure()) scr=sc;
1032 
1033 
1034  // accumulate callBacks
1035  pmITR pitr;
1036  for (pitr=pi.first; pitr!=pi.second; ++pitr) {
1037  BFCN *f = pitr->second;
1038  std::string key = dp->name();
1039  resetKeys[f].push_back(key);
1040  }
1041 
1042  CBNode* cn = m_trigTree->findNode( dp );
1043  if (cn != nullptr) {
1044  m_trigTree->cascadeTrigger(1, cn);
1045  }
1046 
1047  }
1048 
1049  if (scr.isFailure()) {
1050  ATH_MSG_ERROR("Problems preLoading proxies. No callbacks triggered.");
1051  return scr;
1052  }
1053 
1055  for (int i=2; i<= m_trigTree->maxLevel(); ++i) {
1056  CBTree::nodeSet::const_iterator itt, itt_s, itt_e;
1057  m_trigTree->listNodes( i, itt_s, itt_e );
1058  for (itt = itt_s; itt != itt_e; ++itt) {
1059  CBNode* node = *itt;
1060 
1061  if (node->trigger()) {
1062  BFCN *ff = node->fcn();
1063  if (m_sortKeys) { resetKeys[ff].sort(); }
1064  auditorSvc()->before("Callback",m_fcnMap[ff].name());
1065  if ((*ff)(i,resetKeys[ff]).isFailure()) {
1066  auditorSvc()->after("Callback",m_fcnMap[ff].name());
1067  ATH_MSG_ERROR("Problems calling ");
1068  return StatusCode::FAILURE;
1069  }
1070  auditorSvc()->after("Callback",m_fcnMap[ff].name());
1071  }
1072  }
1073  }
1074 
1076 
1077  m_triggered = true;
1078 
1079  return scr;
1080 }
1081 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1082 
1083 StatusCode
1085 
1086  ATH_MSG_VERBOSE("triggerCallback(BFCN*)");
1087 
1088  int I {}; // initialize to something
1089  std::list<std::string> klist;
1090  klist.push_back(key);
1091  if ( (*fcn)(I,klist).isFailure() ) {
1092  ATH_MSG_ERROR("calling ");
1093  return StatusCode::FAILURE;
1094  }
1095 
1096  return StatusCode::SUCCESS;
1097 
1098 }
1099 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1100 
1101 StatusCode
1103  const std::string& key ) {
1104 
1105  ATH_MSG_VERBOSE("triggerCallback(DataProxy*)");
1106 
1107  std::map<const SG::DataProxy*, BFCN*>::const_iterator pitr =
1108  m_proxyMap.find(dp);
1109  if (pitr == m_proxyMap.end()) {
1110  ATH_MSG_ERROR("no callback associated with DataProxy " << m_names[dp]);
1111  return StatusCode::FAILURE;
1112  }
1113 
1114  BFCN* fcn = pitr->second;
1115 
1116  return ( triggerCallback(fcn,key) );
1117 
1118 }
1119 
1120 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1121 
1122 void
1124  startITR start_itr;
1125  std::string objname;
1126 
1127  if (m_startSet_Clock.begin() != m_startSet_Clock.end()) {
1128  msg() << endl << "ClockTime start set: " << endl;
1129  for (start_itr = m_startSet_Clock.begin(); start_itr!=m_startSet_Clock.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  msg() << endl;
1135  }
1136 
1137  if (m_startSet_RE.begin() != m_startSet_RE.end()) {
1138  msg() << "Run/Event start set: " << endl;
1139  for (start_itr = m_startSet_RE.begin(); start_itr!=m_startSet_RE.end();++start_itr ) {
1140  objname = m_names.at( (*start_itr)->proxy() );
1141  msg() << " " << objname << " (" << (*start_itr)->proxy() << ") "
1142  << (*start_itr)->range()->start() << endl;
1143  }
1144  }
1145 
1146 }
1147 
1148 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1149 
1150 void
1152  stopITR stop_itr;
1153  std::string objname;
1154 
1155  if (m_stopSet_Clock.begin() != m_stopSet_Clock.end()) {
1156  msg() << endl << "ClockTime stop set: " << endl;
1157  for( stop_itr=m_stopSet_Clock.begin(); stop_itr!=m_stopSet_Clock.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  msg() << endl;
1163  }
1164 
1165  if (m_stopSet_RE.begin() != m_stopSet_RE.end()) {
1166  msg() << "Run/Event stop set: " << endl;
1167  for( stop_itr=m_stopSet_RE.begin(); stop_itr!=m_stopSet_RE.end(); ++stop_itr ) {
1168  objname = m_names.at((*stop_itr)->proxy());
1169  msg() << " " << objname << " (" << (*stop_itr)->proxy() << ") "
1170  << (*stop_itr)->range()->stop() << endl;
1171  }
1172  }
1173 }
1174 
1175 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1176 
1177 void
1179  msg() << endl;
1180  msg() << "------------------------------ IOVSvc Proxy Map "
1181  << "------------------------------" << endl;
1182 
1183  for (DataProxy* p : m_proxies) {
1184  PrintProxyMap(p);
1185  }
1186  msg() << "----------------------------------------------------------"
1187  << "---------------------" << endl;
1188 }
1189 
1190 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1191 
1192 void
1194 
1195  msg() << " " << dp << " " << dp->clID() << " "
1196  << m_names.find(dp)->second << endl;
1197  auto pi = m_proxyMap.equal_range(dp);
1198  if (pi.first == pi.second) {
1199  msg() << " -> no callback associated" << endl;
1200  } else {
1201  for (auto pitr=pi.first; pitr!=pi.second; ++pitr) {
1202  BFCN* fcn = pitr->second;
1203  map<BFCN*,CallBackID>::const_iterator fitr = m_fcnMap.find(fcn);
1204  CallBackID cbid = fitr->second;
1205  msg() << " -> " << fcn << " " << cbid.name() << endl;
1206  }
1207  }
1208 }
1209 
1210 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1211 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1212 
1213 StatusCode
1215  const CallBackID& c,
1216  const IOVSvcCallBackFcn& fcn,
1217  bool trigger) {
1218 
1219  std::string tname,fullname;
1220  StatusCode sc = p_CLIDSvc->getTypeNameOfID( dp->clID(), tname );
1221  if (sc.isFailure()) {
1222  ATH_MSG_ERROR("Unable to get type name from ClassIDSvc");
1223  return StatusCode::FAILURE;
1224  }
1225  fullname = tname + "[" + dp->name() + "]";
1226 
1227  // see if proxy already bound
1228  if (m_proxies.find( dp ) == m_proxies.end()) {
1229  ATH_MSG_ERROR("Cannot register object " << c.name()
1230  << " with DataHandle " << fullname
1231  << " -> Need to bind DataHandle first");
1232  return StatusCode::FAILURE;
1233  } else {
1234  m_names[dp] = fullname;
1235  }
1236 
1237  // check if this prox/function pair already registered
1238 
1239  std::pair<pmITR,pmITR> fitr = m_proxyMap.equal_range( dp );
1240  for (pmITR p=fitr.first; p!=fitr.second; ++p) {
1241  if ( m_fcnMap[p->second] == c ) {
1242  ATH_MSG_ERROR("CallBack function " << c.name()
1243  << " already registered against " << fullname);
1244  return StatusCode::FAILURE;
1245  }
1246  }
1247 
1248  // this function could have already been registered against another
1249  // DataProxy, so see if we can find it.
1250  BFCN *obs;
1251  if (m_cbidMap.find(c) == m_cbidMap.end()) {
1252  // obs = new BFCN (boost::bind(updFcn,const_cast<T*>(obj),_1,_2));
1253  obs = new BFCN(fcn);
1254  m_cbidMap[c] = obs;
1255  m_fcnMap[obs] = c;
1256  } else {
1257  obs = m_cbidMap[c];
1258  }
1259 
1260  m_proxyMap.insert(std::pair<const SG::DataProxy*,BFCN* >(dp,obs));
1261  m_bfcnMap.insert(std::pair<BFCN*, const SG::DataProxy*> (obs,dp));
1262 
1263  // attach pointer to map of CallBackIDs
1264  ObjMap::const_iterator oitr = m_objMap.find(c.ptr());
1265  if ( oitr != m_objMap.end()) {
1266  oitr->second->insert(c);
1267  } else {
1268  std::set<CallBackID> *cbs = new std::set<CallBackID>;
1269  cbs->insert( c );
1270  m_objMap[c.ptr()] = cbs;
1271  }
1272 
1273  // add it to the trigger tree.
1274  CBNode *cn = m_trigTree->findNode(obs);
1275  if ( cn == nullptr) {
1276  m_trigTree->addNode(obs,c,dp);
1277  } else {
1279  if (cp)
1280  m_trigTree->connectNode(cn,cp);
1281  else
1282  ATH_MSG_ERROR("Cannot find callback node for parent DataProxy "
1283  << dp->name());
1284  }
1285 
1286  ATH_MSG_DEBUG("register by " << c.name() << " bound to " << fullname);
1287 
1288  if (trigger) {
1289  if (m_first) {
1290  ATH_MSG_INFO("Still in initialize phase, not tiggering callback for "
1291  << c.name() << " bound to " << fullname);
1292  } else {
1293  return triggerCallback(obs, dp->name());
1294  }
1295  }
1296 
1297  return StatusCode::SUCCESS;
1298 
1299 }
1300 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1301 
1302 StatusCode
1304  const CallBackID& c2, const IOVSvcCallBackFcn& fcn2,
1305  bool trigger) {
1306 
1307  // Check if second function has been registered with same proxy
1308  BFCN *obs1 = m_cbidMap[c1];
1309  BFCN *obs2;
1310  std::set<const SG::DataProxy*> proxyset;
1311  if (m_cbidMap.find(c2) != m_cbidMap.end()) {
1312  obs2 = m_cbidMap[c2];
1313 
1314  std::pair<fnITR,fnITR> fi1 = m_bfcnMap.equal_range( obs1 );
1315  for (fnITR fitr1= fi1.first; fitr1!=fi1.second; ++fitr1) {
1316  const SG::DataProxy* prx1 = fitr1->second;
1317 
1318  std::pair<fnITR,fnITR> fi2 = m_bfcnMap.equal_range( obs2 );
1319  for (fnITR fitr2=fi2.first; fitr2!=fi2.second; ++fitr2) {
1320  const SG::DataProxy* prx2 = fitr2->second;
1321 
1322  if (prx1 == prx2) {
1323  ATH_MSG_DEBUG("Callback function " << c2.name()
1324  << " cannot be registered since it has already been registered "
1325  << "against " << m_names[prx1]);
1326  } else {
1327  proxyset.insert(prx1); // don't care if it gets done many times
1328  }
1329  }
1330  }
1331  } else {
1332  obs2 = new BFCN( fcn2 );
1333  m_cbidMap[c2] = obs2;
1334  m_fcnMap[obs2] = c2;
1335 
1336  // get all proxies that fcn1 is registered against
1337  std::pair<fnITR,fnITR> fi1 = m_bfcnMap.equal_range( obs1 );
1338  for(fnITR fitr1=fi1.first; fitr1!=fi1.second; ++fitr1) {
1339  const SG::DataProxy *prx1 = fitr1->second;
1340  proxyset.insert(prx1);
1341  }
1342  }
1343 
1344  if (proxyset.size() == 0) {
1345  ATH_MSG_DEBUG("Callback function " << c2.name()
1346  << " cannot be registered, since it has already been registered"
1347  << " against everything it can be.");
1348  return StatusCode::SUCCESS;
1349  }
1350 
1351  // attach pointer to map of CallBackIDs
1352  ObjMap::const_iterator oitr = m_objMap.find(c2.ptr());
1353  if ( oitr != m_objMap.end()) {
1354  oitr->second->insert(c2);
1355  } else {
1356  std::set<CallBackID> *cbs = new std::set<CallBackID>;
1357  cbs->insert( c2 );
1358  m_objMap[c2.ptr()] = cbs;
1359  }
1360 
1361  // Link fcn2 to all proxies known to fcn1
1363  std::list<std::string> klist;
1364  for (pitr=proxyset.begin(); pitr!=proxyset.end(); ++pitr) {
1365  const SG::DataProxy* prx = *pitr;
1366  m_proxyMap.insert(std::pair<const SG::DataProxy*,BFCN* >(prx,obs2));
1367  m_bfcnMap.insert(std::pair<BFCN*,const SG::DataProxy*>(obs2,prx));
1368 
1369  ATH_MSG_DEBUG("register by " << c2.name() << " bound to " << m_names[prx]);
1370  klist.push_back( prx->name() );
1371 
1372  }
1373 
1374  // note that the ordering of the parameters in addNode is the reverse
1375  // order of regFcn
1376  CBNode *cn = m_trigTree->findNode(obs2);
1377  if ( cn == nullptr) {
1378  m_trigTree->addNode(obs2,c2,obs1);
1379  } else {
1380  CBNode *cp = m_trigTree->findNode(obs1);
1381  if (cp == nullptr) {
1382  ATH_MSG_ERROR("regFcn: could not locate parent of " << cn->name()
1383  << ". This should never happen");
1384  return StatusCode::FAILURE;
1385  }
1386  m_trigTree->connectNode(cn,cp);
1387  }
1388 
1389 
1390  if (trigger) {
1391  if (m_first) {
1392  ATH_MSG_INFO("Still in initialize phase, not tiggering callback for "
1393  << c2.name() << " bound to " << *klist.begin());
1394  } else {
1395  return triggerCallback(obs2, *(klist.begin()) );
1396  }
1397  }
1398 
1399  return StatusCode::SUCCESS;
1400 
1401 }
1402 
1403 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1404 
1405 StatusCode
1406 IOVSvcTool::regFcn(const IAlgTool* ia,
1407  const CallBackID& c2, const IOVSvcCallBackFcn& fcn2,
1408  bool trigger) {
1409 
1410  ObjMap::const_iterator oitr = m_objMap.find( ia );
1411 
1412  if (oitr == m_objMap.end()) {
1413  // tool not registered at all
1414  ATH_MSG_ERROR("No callback registered with AlgTool " << ia->name());
1415  return StatusCode::FAILURE;
1416 
1417  } else {
1418  std::set<CallBackID> *sc = oitr->second;
1419 
1420  if (sc->size() == 1) {
1421  // this is ok - only one callback registered with this tool
1422  CallBackID cb = *(sc->begin());
1423 
1424  return regFcn(cb, c2, fcn2, trigger);
1425 
1426  } else {
1427  // there is more than one callback registered to this tool
1428  ATH_MSG_ERROR("More than one callback registered to AlgTool "
1429  << ia->name() << ". Found : " << sc->size());
1430  return StatusCode::FAILURE;
1431  }
1432  }
1433 
1434 }
1435 
1436 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1437 
1438 StatusCode
1440  std::set<std::string>& tools) {
1441 
1442  bool match = false;
1443  for (pmITR pitr=m_proxyMap.begin(); pitr != m_proxyMap.end(); ++pitr) {
1444  if (key == pitr->first->name()) {
1445  tools.insert( m_fcnMap[pitr->second].objName() );
1446  match = true;
1447  }
1448  }
1449 
1450  return ( (match) ? StatusCode::SUCCESS : StatusCode::FAILURE );
1451 }
1452 
1453 
1454 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1455 
1456 StatusCode
1458  // Set flag to reset all proxies
1459  m_resetAllCallbacks = true;
1460  return (StatusCode::SUCCESS);
1461 }
1462 
1463 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1464 
1465 void
1466 IOVSvcTool::scanStartSet(startSet &pSet, const std::string &type,
1467  std::set<SG::DataProxy*, SortDPptr> &proxiesToReset,
1468  const IOVTime& curTime) const {
1469 
1470  if (pSet.begin()==pSet.end()) return;
1471 
1472  if (msgLvl(MSG::DEBUG)) {
1473  msg() << MSG::DEBUG << "--> scan for resets: start set: " << type << endl;
1474  }
1475 
1476  startITR start_itr( pSet.begin() );
1477  while ( start_itr != pSet.end() ) {
1478 
1479  if (m_resetAllCallbacks || (*start_itr)->range()->start() > curTime) {
1480  if (msgLvl(MSG::DEBUG)) {
1481  msg() << "\t" << m_names.at((*start_itr)->proxy()) << ": "
1482  << (*start_itr)->range()->start()<<" <- removed"<<endl;
1483  }
1484  proxiesToReset.insert( (*start_itr)->proxy() );
1485 
1486  (*start_itr)->setRemovedStart( true );
1487  pSet.erase(start_itr++);
1488 
1489  } else {
1490  break;
1491  }
1492  }
1493 
1494  if (msgLvl(MSG::DEBUG)) {
1495  msg() << endmsg;
1496  }
1497 
1498 }
1499 
1500 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1501 
1502 void
1503 IOVSvcTool::scanStopSet(stopSet &pSet, const std::string &type,
1504  std::set<SG::DataProxy*, SortDPptr> &proxiesToReset,
1505  const IOVTime& curTime) const {
1506 
1507  if (pSet.begin()==pSet.end()) return;
1508  if (msgLvl(MSG::DEBUG)) {
1509  msg() << MSG::DEBUG << "--> scan for resets: stop set: " << type << endl;
1510  }
1511 
1512  stopITR stop_itr(pSet.begin());
1513  while ( stop_itr != pSet.end() ) {
1514 
1515  if (m_resetAllCallbacks || (*stop_itr)->range()->stop() <= curTime) {
1516  if (msgLvl(MSG::DEBUG)) {
1517  msg() << " " << m_names.at((*stop_itr)->proxy()) << ": "
1518  << (*stop_itr)->range()->stop()<< " -> removed"<<endl;
1519  }
1520  proxiesToReset.insert( (*stop_itr)->proxy() );
1521 
1522  (*stop_itr)->setRemovedStop( true );
1523  pSet.erase(stop_itr++);
1524 
1525  } else {
1526  break;
1527  }
1528  }
1529  if (msgLvl(MSG::DEBUG)) {
1530  msg() << endmsg;
1531  }
1532 
1533 }
1534 
1535 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1536 
1537 bool
1539 
1540  return ! ( m_proxies.find( proxy ) == m_proxies.end() );
1541 
1542 }
1543 
1544 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1545 
1546 bool
1547 IOVSvcTool::holdsProxy( const CLID& clid, const std::string& key ) const {
1548 
1549  DataProxy* proxy = p_cndSvc->proxy(clid,key);
1550 
1551  if (proxy == nullptr) {
1552  ATH_MSG_ERROR("holdsProxy: could not retrieve proxy "
1553  << fullProxyName(clid,key) << " from store");
1554  return false;
1555  }
1556 
1557  return ( holdsProxy(proxy) );
1558 
1559 }
1560 
1561 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1562 
1563 bool
1565 
1566  return ! (m_cbidMap.find(cb) == m_cbidMap.end());
1567 
1568 }
1569 
1570 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1571 
1572 bool
1573 IOVSvcTool::holdsAlgTool( const IAlgTool* ia ) const {
1574 
1575  ObjMap::const_iterator oitr = m_objMap.find( ia );
1576 
1577  return !(oitr == m_objMap.end());
1578 
1579 }
1580 
1581 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1582 
1583 void
1585 
1586  for (DataProxy* prx : m_proxies) {
1587  ATH_MSG_VERBOSE("clearing proxy payload for " << m_names[prx]);
1588 
1589  p_cndSvc->clearProxyPayload(prx);
1590 
1591  m_trigTree->cascadeTrigger(true, prx);
1592 
1593  }
1594 
1595 }
1596 
1597 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1598 
1599 std::string
1601 
1602  return fullProxyName(tad->clID(), tad->name());
1603 
1604 }
1605 
1606 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1607 
1608 std::string
1610  return fullProxyName(dp->clID(), dp->name());
1611 }
1612 
1613 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
1614 
1615 std::string
1616 IOVSvcTool::fullProxyName( const CLID& clid, const std::string& key ) const {
1617 
1618  std::string fullname, tname;
1619  if (p_CLIDSvc->getTypeNameOfID( clid, tname ).isFailure()) {
1620  fullname = "[";
1621  fullname += std::to_string(clid);
1622  fullname += '/';
1623  fullname += key;
1624  fullname += ']';
1625  } else {
1626  fullname = "[";
1627  fullname += tname;
1628  fullname += ':';
1629  fullname += std::to_string(clid);
1630  fullname += '/';
1631  fullname += key;
1632  fullname += ']';
1633  }
1634 
1635  return fullname;
1636 }
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:1573
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
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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:891
IOVSvcTool::resetAllProxies
virtual void resetAllProxies() override
Definition: IOVSvcTool.cxx:1584
IOVSvcTool::getTriggeredTools
virtual StatusCode getTriggeredTools(const std::string &key, std::set< std::string > &tools) override
Definition: IOVSvcTool.cxx:1439
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:1457
CBTree::connectNode
void connectNode(CBNode *node, CBNode *parent)
Definition: CBTree.cxx:144
skel.it
it
Definition: skel.GENtoEVGEN.py:423
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:1151
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:1503
IOVSvcTool::regFcn
virtual StatusCode regFcn(SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger=false) override
Definition: IOVSvcTool.cxx:1214
IOVSvcTool::handle
virtual void handle(const Incident &) override
Definition: IOVSvcTool.cxx:228
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
IIOVDbSvc::signalEndProxyPreload
virtual void signalEndProxyPreload()=0
Signal that callback has been fired.
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:931
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:593
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
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:92
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:1564
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:643
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
IIOVDbSvc::getKeyInfo
virtual bool getKeyInfo(const std::string &key, IIOVDbSvc::KeyInfo &info)=0
Return information about SG key return false if this key is not known to IOVDbSvc.
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:763
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CBNode::name
std::string name() const
Definition: CBNode.h:74
IOVSvcTool::holdsProxy
virtual bool holdsProxy(SG::DataProxy *proxy) const override
Definition: IOVSvcTool.cxx:1538
run
Definition: run.py:1
IIOVSvc
Abstract interface for IOVSvc. This is used (usually via StoreGateSvc regFcn and regHandle methods) t...
Definition: IIOVSvc.h:41
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:1600
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
fcn
void fcn(int &, double *, double &result, double par[], int)
this is where we write out chi2
Definition: Chi2LJets.cxx:183
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:224
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
IIOVDbSvc::signalBeginRun
virtual StatusCode signalBeginRun(const IOVTime &beginRunTime, const EventContext &ctx)=0
Set time for begin run.
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:871
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:195
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
compileRPVLLRates.c2
c2
Definition: compileRPVLLRates.py:361
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:1084
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:175
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:733
IOVSvcTool::scanStartSet
void scanStartSet(startSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const
Definition: IOVSvcTool.cxx:1466
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
python.consts.YELLOW
YELLOW
Definition: consts.py:3
python.consts.GREEN
GREEN
Definition: consts.py:3
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
a
TList * a
Definition: liststreamerinfos.cxx:10
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:788
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:534
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:790
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
CallBackID::name
std::string name() const
Definition: CallBackID.h:46
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:556
IOVSvcTool::preLoadProxies
StatusCode preLoadProxies()
Definition: IOVSvcTool.cxx:968
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
IOVSvcTool::PrintStartSet
void PrintStartSet() const
Definition: IOVSvcTool.cxx:1123
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:840
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
PhysDESDM_Quirks.trigger
trigger
Definition: PhysDESDM_Quirks.py:27
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:1178