 |
ATLAS Offline Software
|
#include <IOVSvcTool.h>
|
| IOVSvcTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | reinitialize () override |
|
virtual void | handle (const Incident &) override |
|
virtual void | setStoreName (const std::string &storeName) override |
|
virtual const std::string & | getStoreName () const override |
|
virtual StatusCode | regFcn (SG::DataProxy *dp, const CallBackID &c, const IOVSvcCallBackFcn &fcn, bool trigger=false) override |
|
virtual StatusCode | regFcn (const CallBackID &c1, const CallBackID &c2, const IOVSvcCallBackFcn &fcn2, bool trigger=false) override |
|
virtual StatusCode | regFcn (const IAlgTool *ia, const CallBackID &c2, const IOVSvcCallBackFcn &fcn2, bool trigger=false) override |
|
virtual StatusCode | setRange (const CLID &clid, const std::string &key, IOVRange &) override |
|
virtual StatusCode | getRange (const CLID &clid, const std::string &key, IOVRange &iov) const override |
|
virtual StatusCode | regProxy (SG::DataProxy *proxy, const std::string &key) override |
| Register a DataProxy with the service. More...
|
|
virtual StatusCode | regProxy (const CLID &clid, const std::string &key) override |
| Register a DataProxy with the service. More...
|
|
virtual StatusCode | deregProxy (SG::DataProxy *proxy) override |
| Deregister a DataProxy with the service. More...
|
|
virtual StatusCode | deregProxy (const CLID &clid, const std::string &key) override |
| Deregister a DataProxy with the service. More...
|
|
virtual StatusCode | replaceProxy (SG::DataProxy *pOld, SG::DataProxy *pNew) override |
| replace a registered DataProxy with a new version More...
|
|
virtual StatusCode | getRangeFromDB (const CLID &clid, const std::string &key, IOVRange &range, std::string &tag, std::unique_ptr< IOpaqueAddress > &ioa, const IOVTime &curTime) const override |
|
virtual StatusCode | getRangeFromDB (const CLID &clid, const std::string &key, const IOVTime &time, IOVRange &range, std::string &tag, std::unique_ptr< IOpaqueAddress > &ioa) const override |
|
virtual StatusCode | setRangeInDB (const CLID &clid, const std::string &key, const IOVRange &range, const std::string &tag) override |
|
virtual StatusCode | preLoadTAD (const SG::TransientAddress *) override |
| add to a set of TADs that will be registered at start of first event More...
|
|
virtual StatusCode | preLoadDataTAD (const SG::TransientAddress *) override |
| add to a set of TADs that who's data will be preLoaded More...
|
|
virtual StatusCode | getTriggeredTools (const std::string &key, std::set< std::string > &tools) override |
|
virtual bool | holdsProxy (SG::DataProxy *proxy) const override |
|
virtual bool | holdsProxy (const CLID &clid, const std::string &key) const override |
|
virtual bool | holdsCallback (const CallBackID &) const override |
|
virtual bool | holdsAlgTool (const IAlgTool *ia) const override |
|
virtual void | resetAllProxies () override |
|
virtual void | ignoreProxy (const CLID &clid, const std::string &key) override |
|
virtual void | ignoreProxy (SG::DataProxy *proxy) override |
|
virtual | ~IOVSvcTool () |
|
|
StatusCode | preLoadProxies (const EventContext &ctx) |
|
StatusCode | preLoadData () |
|
StatusCode | triggerCallback (IOVSvcCallBackFcn *, const std::string &key) |
|
StatusCode | triggerCallback (const SG::DataProxy *, const std::string &key) |
|
std::string | fullProxyName (const SG::TransientAddress *) const |
|
std::string | fullProxyName (const SG::DataProxy *) const |
|
std::string | fullProxyName (const CLID &, const std::string &) const |
|
void | setRange_impl (SG::DataProxy *proxy, IOVRange &iovr) |
|
TADkey_t | TADkey (const SG::DataProxy &p) |
|
TADkey_t | TADkey (const SG::TransientAddress &t) |
|
void | scanStartSet (startSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const |
|
void | scanStopSet (stopSet &pSet, const std::string &type, std::set< SG::DataProxy *, SortDPptr > &proxiesToReset, const IOVTime &curTime) const |
|
void | PrintStartSet () const |
|
void | PrintStopSet () const |
|
void | PrintProxyMap () const |
|
void | PrintProxyMap (const SG::DataProxy *) const |
|
|
std::string | m_storeName |
|
ServiceHandle< StoreGateSvc > | p_cndSvc |
|
ServiceHandle< IIncidentSvc > | p_incSvc |
|
ServiceHandle< IProxyProviderSvc > | p_PPSvc |
|
ServiceHandle< IClassIDSvc > | p_CLIDSvc |
|
ServiceHandle< IToolSvc > | p_toolSvc |
|
std::map< const SG::DataProxy *, std::string > | m_names |
|
std::recursive_mutex m_handleMutex | ATLAS_THREAD_SAFE |
|
std::set< SG::DataProxy *, SortDPptr > | m_proxies |
|
std::multimap< const SG::DataProxy *, BFCN * > | m_proxyMap |
|
std::multimap< BFCN *, const SG::DataProxy * > | m_bfcnMap |
|
std::set< SG::DataProxy * > | m_ignoredProxies |
|
std::set< std::pair< CLID, std::string > > | m_ignoredProxyNames |
|
std::map< BFCN *, CallBackID > | m_fcnMap |
|
std::map< CallBackID, BFCN * > | m_cbidMap |
|
ObjMap | m_objMap |
|
std::map< const SG::DataProxy *, IOVEntry * > | m_entries |
|
startSet * | p_startSet {nullptr} |
|
stopSet * | p_stopSet {nullptr} |
|
startSet | m_startSet_Clock |
|
startSet | m_startSet_RE |
|
stopSet | m_stopSet_Clock |
|
stopSet | m_stopSet_RE |
|
CBTree * | m_trigTree {nullptr} |
|
std::set< const SG::TransientAddress *, SortTADptr > | m_preLoad |
|
std::set< TADkey_t > | m_partPreLoad |
|
std::atomic< bool > | m_first {true} |
|
bool | m_checkOnce {false} |
|
bool | m_triggered {false} |
|
bool | m_firstEventOfRun {false} |
|
bool | m_resetAllCallbacks {false} |
|
std::string | m_checkTrigger |
|
Gaudi::Property< bool > | m_preLoadRanges {this, "preLoadRanges", false} |
|
Gaudi::Property< bool > | m_preLoadData {this, "preLoadData", false} |
|
Gaudi::Property< bool > | m_partialPreLoadData {this, "partialPreLoadData", true} |
|
Gaudi::Property< bool > | m_preLoadExtensibleFolders {this, "preLoadExtensibleFolders", true} |
|
Gaudi::Property< bool > | m_sortKeys {this, "sortKeys", true} |
|
Gaudi::Property< bool > | m_forceReset {this, "forceResetAtBeginRun", false} |
|
Gaudi::Property< std::string > | m_updateInterval {this, "updateInterval", "Event"} |
|
Definition at line 70 of file IOVSvcTool.h.
◆ BFCN
◆ fnITR
◆ ObjMap
◆ pmITR
◆ startITR
◆ startSet
◆ stopITR
◆ stopSet
◆ TADkey_t
◆ IOVSvcTool()
IOVSvcTool::IOVSvcTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~IOVSvcTool()
IOVSvcTool::~IOVSvcTool |
( |
| ) |
|
|
virtual |
Definition at line 118 of file IOVSvcTool.cxx.
130 delete ( oitr->second );
140 std::set< const TransientAddress*, SortTADptr >::const_iterator titr;
◆ deregProxy() [1/2]
StatusCode IOVSvcTool::deregProxy |
( |
const CLID & |
clid, |
|
|
const std::string & |
key |
|
) |
| |
|
overridevirtual |
◆ deregProxy() [2/2]
Deregister a DataProxy with the service.
Definition at line 584 of file IOVSvcTool.cxx.
587 if (
proxy ==
nullptr) {
589 return StatusCode::FAILURE;
597 <<
" not registered: " <<
proxy->name());
598 return StatusCode::SUCCESS;
605 return StatusCode::SUCCESS;
◆ fullProxyName() [1/3]
std::string IOVSvcTool::fullProxyName |
( |
const CLID & |
clid, |
|
|
const std::string & |
key |
|
) |
| const |
|
private |
Definition at line 1608 of file IOVSvcTool.cxx.
1610 std::string fullname, tname;
1611 if (
p_CLIDSvc->getTypeNameOfID( clid, tname ).isFailure()) {
◆ fullProxyName() [2/3]
◆ fullProxyName() [3/3]
◆ getRange()
Definition at line 862 of file IOVSvcTool.cxx.
867 std::lock_guard<std::recursive_mutex>
lock(m_handleMutex);
868 std::map<const DataProxy*,IOVEntry*>::const_iterator itr(
m_entries.find(
dp));
870 return StatusCode::FAILURE;
873 iov = *(itr->second->range());
875 return StatusCode::SUCCESS;
◆ getRangeFromDB() [1/2]
StatusCode IOVSvcTool::getRangeFromDB |
( |
const CLID & |
clid, |
|
|
const std::string & |
key, |
|
|
const IOVTime & |
time, |
|
|
IOVRange & |
range, |
|
|
std::string & |
tag, |
|
|
std::unique_ptr< IOpaqueAddress > & |
ioa |
|
) |
| const |
|
overridevirtual |
◆ getRangeFromDB() [2/2]
StatusCode IOVSvcTool::getRangeFromDB |
( |
const CLID & |
clid, |
|
|
const std::string & |
key, |
|
|
IOVRange & |
range, |
|
|
std::string & |
tag, |
|
|
std::unique_ptr< IOpaqueAddress > & |
ioa, |
|
|
const IOVTime & |
curTime |
|
) |
| const |
|
overridevirtual |
Definition at line 882 of file IOVSvcTool.cxx.
887 if (curTime.isValid()) {
891 return StatusCode::FAILURE;
◆ getStoreName()
virtual const std::string& IOVSvcTool::getStoreName |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ getTriggeredTools()
StatusCode IOVSvcTool::getTriggeredTools |
( |
const std::string & |
key, |
|
|
std::set< std::string > & |
tools |
|
) |
| |
|
overridevirtual |
Definition at line 1431 of file IOVSvcTool.cxx.
1436 if (
key == pitr->first->name()) {
1442 return ( (
match) ? StatusCode::SUCCESS : StatusCode::FAILURE );
◆ handle()
void IOVSvcTool::handle |
( |
const Incident & |
inc | ) |
|
|
overridevirtual |
Trigger Callback functions
Clear trigger tree
On reinitialize, one sets a flag to force reset of all callbacks. After executing the callbacks, reset flag and return - no proxies reset and don't need to read in new ranges
Read in the next set of IOVRanges
Definition at line 220 of file IOVSvcTool.cxx.
230 else if (!initial_first) {
231 if ( inc.type() !=
m_checkTrigger && inc.type() != IncidentType::BeginRun ) {
236 std::lock_guard<std::recursive_mutex>
lock(m_handleMutex);
243 if ( inc.type() !=
m_checkTrigger && inc.type() != IncidentType::BeginRun ) {
252 if (
proxy ==
nullptr) {
266 const bool first = initial_first;
269 if(Gaudi::Concurrency::ConcurrencyFlags::numProcs()==0) {
270 if (inc.type() == IncidentType::BeginRun) {
282 set< DataProxy*, SortDPptr > proxiesToReset;
283 if ( inc.type() ==
m_checkTrigger || inc.type() == IncidentType::BeginRun ) {
285 const EventContext& context = inc.context();
289 const EventIDBase& eventID = context.eventID();
290 uint32_t event = eventID.lumi_block();
297 curTime.setTimestamp(1000000000
L*(
uint64_t)eventID.time_stamp() + eventID.time_stamp_ns_offset());
301 msg() << inc.type() <<
": [R/LB] = " << curTime <<
endmsg;
304 if (inc.type() == IncidentType::BeginRun) {
306 SmartIF<IIOVDbSvc> iovDB{service(
"IOVDbSvc",
false)};
311 if (StatusCode::SUCCESS != iovDB->signalBeginRun(curTime,
324 std::set< const TransientAddress*, SortTADptr >::const_iterator titr;
328 if (StatusCode::SUCCESS !=
sc) {
348 throw( std::runtime_error(
"IOVSvcTool::preLoadProxies") );
352 SmartIF<IIOVDbSvc> iovDB{service(
"IOVDbSvc",
false)};
354 iovDB->signalEndProxyPreload();
355 ATH_MSG_DEBUG(
"Signaled end proxy preload to IOVDbSvc " << curTime);
373 std::map<BFCN*, std::list<std::string> > resetKeys;
380 if (inc.type() == IncidentType::BeginRun &&
m_forceReset && !s_firstRun) {
382 ATH_MSG_DEBUG(
"Resetting all proxies on BeginRun incident for store \""
386 std::set< const SG::DataProxy* >::const_iterator pit;
403 auto itr = proxiesToReset.find(
p);
404 if (itr != proxiesToReset.end()) {
405 proxiesToReset.erase( itr );
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());
417 throw GaudiException(
"Cannot update Conditions via callback functions in MT after the first event",
name(),StatusCode::FAILURE);
441 Gaudi::Guards::AuditorGuard auditor(
m_names.at(prx), auditorSvc(),
"preLoadProxy");
442 if (prx->accessData() ==
nullptr) {
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) {
451 std::string
key = prx->name();
452 resetKeys[
f].push_back(
key);
465 CBTree::nodeSet::const_iterator itt, itt_s, itt_e;
467 for (itt = itt_s; itt != itt_e; ++itt) {
470 if (
node->trigger()) {
472 auditorSvc()->before(
"Callback",
m_fcnMap.at(
ff).name(),inc.context());
473 if ((*
ff)(
i,resetKeys[
ff]).isFailure()) {
474 auditorSvc()->after(
"Callback",
m_fcnMap.at(
ff).name(),inc.context());
476 << std::endl <<
"Skipping all subsequent callbacks.");
481 auditorSvc()->after(
"Callback",
m_fcnMap.at(
ff).name(),inc.context());
484 if (
perr !=
nullptr)
break;
508 if ( pitr !=
m_entries.end() && pitr->second->range()->isInRange(curTime) ) {
512 if (!prx->updateAddress()) {
520 IOpaqueAddress *ioa = prx->address();
524 if (iova !=
nullptr) {
535 if ( inc.type() == IncidentType::BeginRun) {
◆ holdsAlgTool()
bool IOVSvcTool::holdsAlgTool |
( |
const IAlgTool * |
ia | ) |
const |
|
overridevirtual |
◆ holdsCallback()
◆ holdsProxy() [1/2]
bool IOVSvcTool::holdsProxy |
( |
const CLID & |
clid, |
|
|
const std::string & |
key |
|
) |
| const |
|
overridevirtual |
◆ holdsProxy() [2/2]
◆ ignoreProxy() [1/2]
virtual void IOVSvcTool::ignoreProxy |
( |
const CLID & |
clid, |
|
|
const std::string & |
key |
|
) |
| |
|
inlineoverridevirtual |
◆ ignoreProxy() [2/2]
◆ initialize()
StatusCode IOVSvcTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 153 of file IOVSvcTool.cxx.
155 SmartIF<IProperty> iovSvcProp{service(
"IOVSvc")};
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") ) );
174 p_incSvc->addListener(
this,
"BeginRun", pri,
true);
177 msg() <<
"IOVRanges will be checked only ";
178 msg().setColor(MSG::CYAN);
181 msg() <<
" at the start of the job" <<
endmsg;
182 }
else if (updi ==
"RUN") {
184 p_incSvc->addListener(
this,
"BeginRun", pri,
true);
187 msg() <<
"IOVRanges will be checked at every ";
188 msg().setColor(MSG::CYAN);
190 }
else if (updi ==
"EVENT") {
192 p_incSvc->addListener(
this,
"BeginEvent", pri,
true);
193 p_incSvc->addListener(
this,
"BeginRun", pri,
true);
196 msg() <<
"IOVRanges will be checked at every ";
197 msg().setColor(MSG::CYAN);
201 <<
"\"event\" \"run\" or \"job\"");
202 return StatusCode::FAILURE;
208 msg() <<
"IOV Data will be preloaded at the same interval" <<
endmsg;
213 return StatusCode::SUCCESS;
◆ preLoadData()
StatusCode IOVSvcTool::preLoadData |
( |
| ) |
|
|
private |
◆ preLoadDataTAD()
add to a set of TADs that who's data will be preLoaded
Definition at line 754 of file IOVSvcTool.cxx.
759 <<
" alread in preLoad set. Not inserting");
760 return StatusCode::SUCCESS;
766 <<
" alread in partPreLoad set. Not inserting");
767 return StatusCode::SUCCESS;
774 return StatusCode::SUCCESS;
◆ preLoadProxies()
StatusCode IOVSvcTool::preLoadProxies |
( |
const EventContext & |
ctx | ) |
|
|
private |
Trigger Callback functions
Definition at line 959 of file IOVSvcTool.cxx.
965 SmartIF<IIOVDbSvc> iovDB{service(
"IOVDbSvc",
false)};
967 std::map<BFCN*, std::list<std::string> > resetKeys;
969 Gaudi::Guards::AuditorGuard auditor(
m_names[
dp], auditorSvc(),
"preLoadProxy");
972 msg().setColor(MSG::CYAN);
973 msg() <<
"loading proxy for CLID: " <<
dp->clID()
977 if (
dp->provider() ==
nullptr) {
979 <<
". It is probably not a conditions object" << endl;
980 msg() <<
"Proxy Map: ";
983 scr = StatusCode::FAILURE;
994 if (!
dp->updateAddress())
995 sc = StatusCode::FAILURE;
1004 iovDB->getKeyInfo(
dp->name(), kinfo) && kinfo.
extensible ) {
1009 <<
dp->clID() <<
"/"
1010 <<
dp->name() <<
")");
1011 if(
dp->accessData() !=
nullptr ) {
1012 sc = StatusCode::SUCCESS;
1014 sc = StatusCode::FAILURE;
1015 ATH_MSG_ERROR(
"preLoading proxies: accessData() failed for " <<
1016 dp->clID() <<
"/" <<
dp->name() <<
")");
1021 if (
sc.isFailure()) scr=
sc;
1026 for (pitr=
pi.first; pitr!=
pi.second; ++pitr) {
1027 BFCN *
f = pitr->second;
1028 std::string
key =
dp->name();
1029 resetKeys[
f].push_back(
key);
1033 if (cn !=
nullptr) {
1039 if (scr.isFailure()) {
1040 ATH_MSG_ERROR(
"Problems preLoading proxies. No callbacks triggered.");
1046 CBTree::nodeSet::const_iterator itt, itt_s, itt_e;
1048 for (itt = itt_s; itt != itt_e; ++itt) {
1051 if (
node->trigger()) {
1055 if ((*
ff)(
i,resetKeys[
ff]).isFailure()) {
1058 return StatusCode::FAILURE;
◆ preLoadTAD()
add to a set of TADs that will be registered at start of first event
Definition at line 724 of file IOVSvcTool.cxx.
729 << tad_in->
clID() <<
"/" << tad_in->
name()
730 <<
") alread in preLoad set. Not inserting");
731 return StatusCode::SUCCESS;
737 << tad_in->
clID() <<
"/" << tad_in->
name()
738 <<
") alread in partPreLoad set. Not inserting");
739 return StatusCode::SUCCESS;
745 return StatusCode::SUCCESS;
◆ PrintProxyMap() [1/2]
void IOVSvcTool::PrintProxyMap |
( |
| ) |
const |
|
private |
Definition at line 1168 of file IOVSvcTool.cxx.
1170 msg() <<
"------------------------------ IOVSvc Proxy Map "
1171 <<
"------------------------------" << endl;
1176 msg() <<
"----------------------------------------------------------"
1177 <<
"---------------------" << endl;
◆ PrintProxyMap() [2/2]
Definition at line 1183 of file IOVSvcTool.cxx.
1185 msg() <<
" " <<
dp <<
" " <<
dp->clID() <<
" "
1188 if (
pi.first ==
pi.second) {
1189 msg() <<
" -> no callback associated" << endl;
1191 for (
auto pitr=
pi.first; pitr!=
pi.second; ++pitr) {
1192 BFCN* fcn = pitr->second;
1193 map<BFCN*,CallBackID>::const_iterator fitr =
m_fcnMap.find(fcn);
1196 msg() <<
" -> " << fcn <<
" " << cbid.
name() << endl;
◆ PrintStartSet()
void IOVSvcTool::PrintStartSet |
( |
| ) |
const |
|
private |
Definition at line 1113 of file IOVSvcTool.cxx.
1115 std::string objname;
1118 msg() << endl <<
"ClockTime start set: " << endl;
1120 objname =
m_names.at( (*start_itr)->proxy() );
1121 msg() <<
" " << objname <<
" (" << (*start_itr)->proxy() <<
") "
1122 << (*start_itr)->range()->start() << endl;
1128 msg() <<
"Run/Event start set: " << endl;
1130 objname =
m_names.at( (*start_itr)->proxy() );
1131 msg() <<
" " << objname <<
" (" << (*start_itr)->proxy() <<
") "
1132 << (*start_itr)->range()->start() << endl;
◆ PrintStopSet()
void IOVSvcTool::PrintStopSet |
( |
| ) |
const |
|
private |
Definition at line 1141 of file IOVSvcTool.cxx.
1143 std::string objname;
1146 msg() << endl <<
"ClockTime stop set: " << endl;
1148 objname =
m_names.at((*stop_itr)->proxy());
1149 msg() <<
" " << objname <<
" (" << (*stop_itr)->proxy() <<
") "
1150 << (*stop_itr)->range()->stop() << endl;
1156 msg() <<
"Run/Event stop set: " << endl;
1158 objname =
m_names.at((*stop_itr)->proxy());
1159 msg() <<
" " << objname <<
" (" << (*stop_itr)->proxy() <<
") "
1160 << (*stop_itr)->range()->stop() << endl;
◆ regFcn() [1/3]
Definition at line 1295 of file IOVSvcTool.cxx.
1302 std::set<const SG::DataProxy*> proxyset;
1306 std::pair<fnITR,fnITR> fi1 =
m_bfcnMap.equal_range( obs1 );
1307 for (
fnITR fitr1= fi1.first; fitr1!=fi1.second; ++fitr1) {
1310 std::pair<fnITR,fnITR> fi2 =
m_bfcnMap.equal_range( obs2 );
1311 for (
fnITR fitr2=fi2.first; fitr2!=fi2.second; ++fitr2) {
1316 <<
" cannot be registered since it has already been registered "
1317 <<
"against " <<
m_names[prx1]);
1319 proxyset.insert(prx1);
1324 obs2 =
new BFCN( fcn2 );
1329 std::pair<fnITR,fnITR> fi1 =
m_bfcnMap.equal_range( obs1 );
1330 for(
fnITR fitr1=fi1.first; fitr1!=fi1.second; ++fitr1) {
1332 proxyset.insert(prx1);
1336 if (proxyset.size() == 0) {
1338 <<
" cannot be registered, since it has already been registered"
1339 <<
" against everything it can be.");
1340 return StatusCode::SUCCESS;
1344 ObjMap::const_iterator oitr =
m_objMap.find(
c2.ptr());
1346 oitr->second->insert(
c2);
1348 std::set<CallBackID> *cbs =
new std::set<CallBackID>;
1355 std::list<std::string> klist;
1356 for (pitr=proxyset.begin(); pitr!=proxyset.end(); ++pitr) {
1358 m_proxyMap.insert(std::pair<const SG::DataProxy*,BFCN* >(prx,obs2));
1359 m_bfcnMap.insert(std::pair<BFCN*,const SG::DataProxy*>(obs2,prx));
1362 klist.push_back( prx->
name() );
1369 if ( cn ==
nullptr) {
1373 if (
cp ==
nullptr) {
1375 <<
". This should never happen");
1376 return StatusCode::FAILURE;
1384 ATH_MSG_INFO(
"Still in initialize phase, not tiggering callback for "
1385 <<
c2.name() <<
" bound to " << *klist.begin());
1391 return StatusCode::SUCCESS;
◆ regFcn() [2/3]
Definition at line 1398 of file IOVSvcTool.cxx.
1402 ObjMap::const_iterator oitr =
m_objMap.find( ia );
1406 ATH_MSG_ERROR(
"No callback registered with AlgTool " << ia->name());
1407 return StatusCode::FAILURE;
1410 std::set<CallBackID> *
sc = oitr->second;
1412 if (
sc->size() == 1) {
1416 return regFcn(cb,
c2, fcn2, trigger);
1420 ATH_MSG_ERROR(
"More than one callback registered to AlgTool "
1421 << ia->name() <<
". Found : " <<
sc->size());
1422 return StatusCode::FAILURE;
◆ regFcn() [3/3]
Definition at line 1206 of file IOVSvcTool.cxx.
1211 std::string tname,fullname;
1213 if (
sc.isFailure()) {
1215 return StatusCode::FAILURE;
1217 fullname = tname +
"[" +
dp->name() +
"]";
1222 <<
" with DataHandle " << fullname
1223 <<
" -> Need to bind DataHandle first");
1224 return StatusCode::FAILURE;
1231 std::pair<pmITR,pmITR> fitr =
m_proxyMap.equal_range(
dp );
1232 for (
pmITR p=fitr.first;
p!=fitr.second; ++
p) {
1235 <<
" already registered against " << fullname);
1236 return StatusCode::FAILURE;
1245 obs =
new BFCN(fcn);
1252 m_proxyMap.insert(std::pair<const SG::DataProxy*,BFCN* >(
dp,obs));
1253 m_bfcnMap.insert(std::pair<BFCN*, const SG::DataProxy*> (obs,
dp));
1256 ObjMap::const_iterator oitr =
m_objMap.find(
c.ptr());
1258 oitr->second->insert(
c);
1260 std::set<CallBackID> *cbs =
new std::set<CallBackID>;
1267 if ( cn ==
nullptr) {
1274 ATH_MSG_ERROR(
"Cannot find callback node for parent DataProxy "
1278 ATH_MSG_DEBUG(
"register by " <<
c.name() <<
" bound to " << fullname);
1282 ATH_MSG_INFO(
"Still in initialize phase, not tiggering callback for "
1283 <<
c.name() <<
" bound to " << fullname);
1289 return StatusCode::SUCCESS;
◆ regProxy() [1/2]
StatusCode IOVSvcTool::regProxy |
( |
const CLID & |
clid, |
|
|
const std::string & |
key |
|
) |
| |
|
overridevirtual |
◆ regProxy() [2/2]
Register a DataProxy with the service.
Definition at line 547 of file IOVSvcTool.cxx.
550 if (
proxy ==
nullptr) {
552 return StatusCode::FAILURE;
559 <<
" already registered: " <<
proxy->name());
560 return StatusCode::SUCCESS;
563 std::string tname, fullname;
566 fullname = tname +
"[" +
key +
"]";
573 return StatusCode::SUCCESS;
◆ reinitialize()
StatusCode IOVSvcTool::reinitialize |
( |
| ) |
|
|
overridevirtual |
◆ replaceProxy()
replace a registered DataProxy with a new version
Definition at line 634 of file IOVSvcTool.cxx.
636 std::lock_guard<std::recursive_mutex>
lock(m_handleMutex);
637 assert(
nullptr != pOld);
638 assert(
nullptr != pNew);
648 return StatusCode::SUCCESS;
667 setRange_impl (pNew, *(
const_cast<IOVRange*
>(ent->second->range())));
674 StatusCode::SUCCESS :
675 StatusCode::FAILURE );
◆ resetAllProxies()
void IOVSvcTool::resetAllProxies |
( |
| ) |
|
|
overridevirtual |
◆ scanStartSet()
Definition at line 1458 of file IOVSvcTool.cxx.
1462 if (pSet.begin()==pSet.end())
return;
1468 startITR start_itr( pSet.begin() );
1469 while ( start_itr != pSet.end() ) {
1473 msg() <<
"\t" <<
m_names.at((*start_itr)->proxy()) <<
": "
1474 << (*start_itr)->range()->start()<<
" <- removed"<<endl;
1476 proxiesToReset.insert( (*start_itr)->proxy() );
1478 (*start_itr)->setRemovedStart(
true );
1479 pSet.erase(start_itr++);
◆ scanStopSet()
Definition at line 1495 of file IOVSvcTool.cxx.
1499 if (pSet.begin()==pSet.end())
return;
1504 stopITR stop_itr(pSet.begin());
1505 while ( stop_itr != pSet.end() ) {
1509 msg() <<
" " <<
m_names.at((*stop_itr)->proxy()) <<
": "
1510 << (*stop_itr)->range()->stop()<<
" -> removed"<<endl;
1512 proxiesToReset.insert( (*stop_itr)->proxy() );
1514 (*stop_itr)->setRemovedStop(
true );
1515 pSet.erase(stop_itr++);
◆ setRange()
Definition at line 831 of file IOVSvcTool.cxx.
836 <<
" in IOVrange:" << iovr);
838 if (!iovr.start().isValid() || !iovr.stop().isValid()) {
839 ATH_MSG_ERROR(
"IOVRange " << iovr <<
"is not valid. Start OK: "
840 << iovr.start().isValid() <<
" Stop OK: " << iovr.stop().isValid()
841 <<
" run/evt/time min/max "
845 return StatusCode::FAILURE;
850 if (
proxy ==
nullptr) {
852 return StatusCode::FAILURE;
855 std::lock_guard<std::recursive_mutex>
lock(m_handleMutex);
857 return StatusCode::SUCCESS;
◆ setRange_impl()
Definition at line 779 of file IOVSvcTool.cxx.
781 if (iovr.start().isTimestamp()) {
789 IOVRange *
range =
new IOVRange(iovr);
795 const IOVRange *irn = ent->
range();
◆ setRangeInDB()
Definition at line 922 of file IOVSvcTool.cxx.
926 if (!
range.start().isValid() || !
range.stop().isValid()) {
928 return StatusCode::FAILURE;
935 return StatusCode::FAILURE;
938 std::lock_guard<std::recursive_mutex>
lock(m_handleMutex);
939 std::map<const DataProxy*,IOVEntry*>::const_iterator itr(
m_entries.find(
dp));
947 if (
idb !=
nullptr) {
951 return StatusCode::FAILURE;
◆ setStoreName()
virtual void IOVSvcTool::setStoreName |
( |
const std::string & |
storeName | ) |
|
|
inlineoverridevirtual |
◆ TADkey() [1/2]
◆ TADkey() [2/2]
◆ triggerCallback() [1/2]
Definition at line 1092 of file IOVSvcTool.cxx.
1097 std::map<const SG::DataProxy*, BFCN*>::const_iterator pitr =
1101 return StatusCode::FAILURE;
1104 BFCN* fcn = pitr->second;
◆ triggerCallback() [2/2]
Definition at line 1074 of file IOVSvcTool.cxx.
1079 std::list<std::string> klist;
1080 klist.push_back(
key);
1081 if ( (*fcn)(
I,klist).isFailure() ) {
1083 return StatusCode::FAILURE;
1086 return StatusCode::SUCCESS;
◆ ATLAS_THREAD_SAFE
std::recursive_mutex m_handleMutex IOVSvcTool::ATLAS_THREAD_SAFE |
|
mutableprivate |
◆ m_bfcnMap
◆ m_cbidMap
◆ m_checkOnce
bool IOVSvcTool::m_checkOnce {false} |
|
private |
◆ m_checkTrigger
std::string IOVSvcTool::m_checkTrigger |
|
private |
◆ m_entries
◆ m_fcnMap
◆ m_first
std::atomic<bool> IOVSvcTool::m_first {true} |
|
private |
◆ m_firstEventOfRun
bool IOVSvcTool::m_firstEventOfRun {false} |
|
private |
◆ m_forceReset
Gaudi::Property<bool> IOVSvcTool::m_forceReset {this, "forceResetAtBeginRun", false} |
|
private |
◆ m_ignoredProxies
◆ m_ignoredProxyNames
std::set< std::pair<CLID, std::string> > IOVSvcTool::m_ignoredProxyNames |
|
private |
◆ m_names
◆ m_objMap
◆ m_partialPreLoadData
Gaudi::Property<bool> IOVSvcTool::m_partialPreLoadData {this, "partialPreLoadData", true} |
|
private |
◆ m_partPreLoad
std::set< TADkey_t > IOVSvcTool::m_partPreLoad |
|
private |
◆ m_preLoad
◆ m_preLoadData
Gaudi::Property<bool> IOVSvcTool::m_preLoadData {this, "preLoadData", false} |
|
private |
◆ m_preLoadExtensibleFolders
Gaudi::Property<bool> IOVSvcTool::m_preLoadExtensibleFolders {this, "preLoadExtensibleFolders", true} |
|
private |
◆ m_preLoadRanges
Gaudi::Property<bool> IOVSvcTool::m_preLoadRanges {this, "preLoadRanges", false} |
|
private |
◆ m_proxies
◆ m_proxyMap
◆ m_resetAllCallbacks
bool IOVSvcTool::m_resetAllCallbacks {false} |
|
private |
◆ m_sortKeys
Gaudi::Property<bool> IOVSvcTool::m_sortKeys {this, "sortKeys", true} |
|
private |
◆ m_startSet_Clock
◆ m_startSet_RE
◆ m_stopSet_Clock
stopSet IOVSvcTool::m_stopSet_Clock |
|
private |
◆ m_stopSet_RE
◆ m_storeName
std::string IOVSvcTool::m_storeName |
|
private |
◆ m_triggered
bool IOVSvcTool::m_triggered {false} |
|
private |
◆ m_trigTree
CBTree* IOVSvcTool::m_trigTree {nullptr} |
|
private |
◆ m_updateInterval
Gaudi::Property<std::string> IOVSvcTool::m_updateInterval {this, "updateInterval", "Event"} |
|
private |
◆ p_CLIDSvc
◆ p_cndSvc
◆ p_incSvc
◆ p_PPSvc
◆ p_startSet
startSet* IOVSvcTool::p_startSet {nullptr} |
|
private |
◆ p_stopSet
stopSet* IOVSvcTool::p_stopSet {nullptr} |
|
private |
◆ p_toolSvc
The documentation for this class was generated from the following files:
CBNode * addNode(const std::string &name, CBNode *parent)
bool delNode(const SG::DataProxy *prx)
JetConstituentVector::iterator iterator
static constexpr uint32_t MAXRUN
def perr(error, exc=None, exit=False)
void setStopITR(stopITR itr)
void connectNode(CBNode *node, CBNode *parent)
startITR getStartITR() const
void cascadeTrigger(const bool b, CBNode *start)
Abstract interface to IOVDbSvc to access IOVRange and tag information.
#define ATH_MSG_VERBOSE(x)
void clearTrigger() const
CBNode * findNode(const std::string &name)
static constexpr uint32_t MINRUN
const std::string & name() const
Get the primary (hashed) SG key.
const IOVRange * range() const
void setStartITR(startITR itr)
POOL::TEvent event(POOL::TEvent::kClassAccess)
CBNode * replaceProxy(const SG::DataProxy *pOld, const SG::DataProxy *pNew)
virtual IOVRange range() const
Retrieve IOVRange.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool removedStart() const
CLID clID() const
Retrieve string key:
interface for IOA providers
static constexpr uint64_t MAXTIMESTAMP
CLID clID() const
Retrieve clid.
static constexpr uint32_t MAXEVENT
std::string to_string(const DetectorType &type)
virtual const name_type & name() const override final
Retrieve data object key == string.
static constexpr uint32_t MINEVENT
const std::string & name() const
const std::string & name() const
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
Filled by IIOVDbSvc::getKeyInfo.
static constexpr uint64_t MINTIMESTAMP
stopITR getStopITR() const
bool match(std::string s1, std::string s2)
match the individual directories of two strings