|
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 () |
|
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 |
|
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 585 of file IOVSvcTool.cxx.
588 if (
proxy ==
nullptr) {
590 return StatusCode::FAILURE;
598 <<
" not registered: " <<
proxy->name());
599 return StatusCode::SUCCESS;
606 return StatusCode::SUCCESS;
◆ fullProxyName() [1/3]
std::string IOVSvcTool::fullProxyName |
( |
const CLID & |
clid, |
|
|
const std::string & |
key |
|
) |
| const |
|
private |
Definition at line 1607 of file IOVSvcTool.cxx.
1609 std::string fullname, tname;
1610 if (
p_CLIDSvc->getTypeNameOfID( clid, tname ).isFailure()) {
◆ fullProxyName() [2/3]
◆ fullProxyName() [3/3]
◆ getRange()
Definition at line 863 of file IOVSvcTool.cxx.
868 std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
869 std::map<const DataProxy*,IOVEntry*>::const_iterator itr(
m_entries.find(
dp));
871 return StatusCode::FAILURE;
874 iov = *(itr->second->range());
876 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 883 of file IOVSvcTool.cxx.
888 if (curTime.isValid()) {
892 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 1430 of file IOVSvcTool.cxx.
1435 if (
key == pitr->first->name()) {
1441 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(1000000000L*(
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());
473 if ((*
ff)(
i,resetKeys[
ff]).isFailure()) {
474 auditorSvc()->after(
"Callback",
m_fcnMap.at(
ff).name());
476 << std::endl <<
"Skipping all subsequent callbacks.");
481 auditorSvc()->after(
"Callback",
m_fcnMap.at(
ff).name());
485 if (
perr !=
nullptr)
break;
509 if ( pitr !=
m_entries.end() && pitr->second->range()->isInRange(curTime) ) {
513 if (!prx->updateAddress()) {
521 IOpaqueAddress *ioa = prx->address();
525 if (iova !=
nullptr) {
536 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 755 of file IOVSvcTool.cxx.
760 <<
" alread in preLoad set. Not inserting");
761 return StatusCode::SUCCESS;
767 <<
" alread in partPreLoad set. Not inserting");
768 return StatusCode::SUCCESS;
775 return StatusCode::SUCCESS;
◆ preLoadProxies()
StatusCode IOVSvcTool::preLoadProxies |
( |
| ) |
|
|
private |
Trigger Callback functions
Definition at line 960 of file IOVSvcTool.cxx.
966 SmartIF<IIOVDbSvc> iovDB{service(
"IOVDbSvc",
false)};
968 std::map<BFCN*, std::list<std::string> > resetKeys;
970 Gaudi::Guards::AuditorGuard auditor(
m_names[
dp], auditorSvc(),
"preLoadProxy");
973 msg().setColor(MSG::CYAN);
974 msg() <<
"loading proxy for CLID: " <<
dp->clID()
978 if (
dp->provider() ==
nullptr) {
980 <<
". It is probably not a conditions object" << endl;
981 msg() <<
"Proxy Map: ";
984 scr = StatusCode::FAILURE;
995 if (!
dp->updateAddress())
996 sc = StatusCode::FAILURE;
1005 iovDB->getKeyInfo(
dp->name(), kinfo) && kinfo.
extensible ) {
1010 <<
dp->clID() <<
"/"
1011 <<
dp->name() <<
")");
1012 if(
dp->accessData() !=
nullptr ) {
1013 sc = StatusCode::SUCCESS;
1015 sc = StatusCode::FAILURE;
1016 ATH_MSG_ERROR(
"preLoading proxies: accessData() failed for " <<
1017 dp->clID() <<
"/" <<
dp->name() <<
")");
1022 if (
sc.isFailure()) scr=
sc;
1027 for (pitr=
pi.first; pitr!=
pi.second; ++pitr) {
1028 BFCN *
f = pitr->second;
1029 std::string
key =
dp->name();
1030 resetKeys[
f].push_back(
key);
1034 if (cn !=
nullptr) {
1040 if (scr.isFailure()) {
1041 ATH_MSG_ERROR(
"Problems preLoading proxies. No callbacks triggered.");
1047 CBTree::nodeSet::const_iterator itt, itt_s, itt_e;
1049 for (itt = itt_s; itt != itt_e; ++itt) {
1052 if (
node->trigger()) {
1056 if ((*
ff)(
i,resetKeys[
ff]).isFailure()) {
1059 return StatusCode::FAILURE;
◆ preLoadTAD()
add to a set of TADs that will be registered at start of first event
Definition at line 725 of file IOVSvcTool.cxx.
730 << tad_in->
clID() <<
"/" << tad_in->
name()
731 <<
") alread in preLoad set. Not inserting");
732 return StatusCode::SUCCESS;
738 << tad_in->
clID() <<
"/" << tad_in->
name()
739 <<
") alread in partPreLoad set. Not inserting");
740 return StatusCode::SUCCESS;
746 return StatusCode::SUCCESS;
◆ PrintProxyMap() [1/2]
void IOVSvcTool::PrintProxyMap |
( |
| ) |
const |
|
private |
Definition at line 1169 of file IOVSvcTool.cxx.
1171 msg() <<
"------------------------------ IOVSvc Proxy Map "
1172 <<
"------------------------------" << endl;
1177 msg() <<
"----------------------------------------------------------"
1178 <<
"---------------------" << endl;
◆ PrintProxyMap() [2/2]
Definition at line 1184 of file IOVSvcTool.cxx.
1186 msg() <<
" " <<
dp <<
" " <<
dp->clID() <<
" "
1189 if (
pi.first ==
pi.second) {
1190 msg() <<
" -> no callback associated" << endl;
1192 for (
auto pitr=
pi.first; pitr!=
pi.second; ++pitr) {
1193 BFCN* fcn = pitr->second;
1194 map<BFCN*,CallBackID>::const_iterator fitr =
m_fcnMap.find(fcn);
1196 msg() <<
" -> " << fcn <<
" " << cbid.
name() << endl;
◆ PrintStartSet()
void IOVSvcTool::PrintStartSet |
( |
| ) |
const |
|
private |
Definition at line 1114 of file IOVSvcTool.cxx.
1116 std::string objname;
1119 msg() << endl <<
"ClockTime start set: " << endl;
1121 objname =
m_names.at( (*start_itr)->proxy() );
1122 msg() <<
" " << objname <<
" (" << (*start_itr)->proxy() <<
") "
1123 << (*start_itr)->range()->start() << endl;
1129 msg() <<
"Run/Event start set: " << endl;
1131 objname =
m_names.at( (*start_itr)->proxy() );
1132 msg() <<
" " << objname <<
" (" << (*start_itr)->proxy() <<
") "
1133 << (*start_itr)->range()->start() << endl;
◆ PrintStopSet()
void IOVSvcTool::PrintStopSet |
( |
| ) |
const |
|
private |
Definition at line 1142 of file IOVSvcTool.cxx.
1144 std::string objname;
1147 msg() << endl <<
"ClockTime stop set: " << endl;
1149 objname =
m_names.at((*stop_itr)->proxy());
1150 msg() <<
" " << objname <<
" (" << (*stop_itr)->proxy() <<
") "
1151 << (*stop_itr)->range()->stop() << endl;
1157 msg() <<
"Run/Event stop set: " << endl;
1159 objname =
m_names.at((*stop_itr)->proxy());
1160 msg() <<
" " << objname <<
" (" << (*stop_itr)->proxy() <<
") "
1161 << (*stop_itr)->range()->stop() << endl;
◆ regFcn() [1/3]
Definition at line 1294 of file IOVSvcTool.cxx.
1301 std::set<const SG::DataProxy*> proxyset;
1305 std::pair<fnITR,fnITR> fi1 =
m_bfcnMap.equal_range( obs1 );
1306 for (
fnITR fitr1= fi1.first; fitr1!=fi1.second; ++fitr1) {
1309 std::pair<fnITR,fnITR> fi2 =
m_bfcnMap.equal_range( obs2 );
1310 for (
fnITR fitr2=fi2.first; fitr2!=fi2.second; ++fitr2) {
1315 <<
" cannot be registered since it has already been registered "
1316 <<
"against " <<
m_names[prx1]);
1318 proxyset.insert(prx1);
1323 obs2 =
new BFCN( fcn2 );
1328 std::pair<fnITR,fnITR> fi1 =
m_bfcnMap.equal_range( obs1 );
1329 for(
fnITR fitr1=fi1.first; fitr1!=fi1.second; ++fitr1) {
1331 proxyset.insert(prx1);
1335 if (proxyset.size() == 0) {
1337 <<
" cannot be registered, since it has already been registered"
1338 <<
" against everything it can be.");
1339 return StatusCode::SUCCESS;
1343 ObjMap::const_iterator oitr =
m_objMap.find(
c2.ptr());
1345 oitr->second->insert(
c2);
1347 std::set<CallBackID> *cbs =
new std::set<CallBackID>;
1354 std::list<std::string> klist;
1355 for (pitr=proxyset.begin(); pitr!=proxyset.end(); ++pitr) {
1357 m_proxyMap.insert(std::pair<const SG::DataProxy*,BFCN* >(prx,obs2));
1358 m_bfcnMap.insert(std::pair<BFCN*,const SG::DataProxy*>(obs2,prx));
1361 klist.push_back( prx->
name() );
1368 if ( cn ==
nullptr) {
1372 if (
cp ==
nullptr) {
1374 <<
". This should never happen");
1375 return StatusCode::FAILURE;
1383 ATH_MSG_INFO(
"Still in initialize phase, not tiggering callback for "
1384 <<
c2.name() <<
" bound to " << *klist.begin());
1390 return StatusCode::SUCCESS;
◆ regFcn() [2/3]
Definition at line 1397 of file IOVSvcTool.cxx.
1401 ObjMap::const_iterator oitr =
m_objMap.find( ia );
1405 ATH_MSG_ERROR(
"No callback registered with AlgTool " << ia->name());
1406 return StatusCode::FAILURE;
1409 std::set<CallBackID> *
sc = oitr->second;
1411 if (
sc->size() == 1) {
1415 return regFcn(cb,
c2, fcn2, trigger);
1419 ATH_MSG_ERROR(
"More than one callback registered to AlgTool "
1420 << ia->name() <<
". Found : " <<
sc->size());
1421 return StatusCode::FAILURE;
◆ regFcn() [3/3]
Definition at line 1205 of file IOVSvcTool.cxx.
1210 std::string tname,fullname;
1212 if (
sc.isFailure()) {
1214 return StatusCode::FAILURE;
1216 fullname = tname +
"[" +
dp->name() +
"]";
1221 <<
" with DataHandle " << fullname
1222 <<
" -> Need to bind DataHandle first");
1223 return StatusCode::FAILURE;
1230 std::pair<pmITR,pmITR> fitr =
m_proxyMap.equal_range(
dp );
1231 for (
pmITR p=fitr.first;
p!=fitr.second; ++
p) {
1234 <<
" already registered against " << fullname);
1235 return StatusCode::FAILURE;
1244 obs =
new BFCN(fcn);
1251 m_proxyMap.insert(std::pair<const SG::DataProxy*,BFCN* >(
dp,obs));
1252 m_bfcnMap.insert(std::pair<BFCN*, const SG::DataProxy*> (obs,
dp));
1255 ObjMap::const_iterator oitr =
m_objMap.find(
c.ptr());
1257 oitr->second->insert(
c);
1259 std::set<CallBackID> *cbs =
new std::set<CallBackID>;
1266 if ( cn ==
nullptr) {
1273 ATH_MSG_ERROR(
"Cannot find callback node for parent DataProxy "
1277 ATH_MSG_DEBUG(
"register by " <<
c.name() <<
" bound to " << fullname);
1281 ATH_MSG_INFO(
"Still in initialize phase, not tiggering callback for "
1282 <<
c.name() <<
" bound to " << fullname);
1288 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 548 of file IOVSvcTool.cxx.
551 if (
proxy ==
nullptr) {
553 return StatusCode::FAILURE;
560 <<
" already registered: " <<
proxy->name());
561 return StatusCode::SUCCESS;
564 std::string tname, fullname;
567 fullname = tname +
"[" +
key +
"]";
574 return StatusCode::SUCCESS;
◆ reinitialize()
StatusCode IOVSvcTool::reinitialize |
( |
| ) |
|
|
overridevirtual |
◆ replaceProxy()
replace a registered DataProxy with a new version
Definition at line 635 of file IOVSvcTool.cxx.
637 std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
638 assert(
nullptr != pOld);
639 assert(
nullptr != pNew);
649 return StatusCode::SUCCESS;
668 setRange_impl (pNew, *(
const_cast<IOVRange*
>(ent->second->range())));
675 StatusCode::SUCCESS :
676 StatusCode::FAILURE );
◆ resetAllProxies()
void IOVSvcTool::resetAllProxies |
( |
| ) |
|
|
overridevirtual |
◆ scanStartSet()
Definition at line 1457 of file IOVSvcTool.cxx.
1461 if (pSet.begin()==pSet.end())
return;
1467 startITR start_itr( pSet.begin() );
1468 while ( start_itr != pSet.end() ) {
1472 msg() <<
"\t" <<
m_names.at((*start_itr)->proxy()) <<
": "
1473 << (*start_itr)->range()->start()<<
" <- removed"<<endl;
1475 proxiesToReset.insert( (*start_itr)->proxy() );
1477 (*start_itr)->setRemovedStart(
true );
1478 pSet.erase(start_itr++);
◆ scanStopSet()
Definition at line 1494 of file IOVSvcTool.cxx.
1498 if (pSet.begin()==pSet.end())
return;
1503 stopITR stop_itr(pSet.begin());
1504 while ( stop_itr != pSet.end() ) {
1508 msg() <<
" " <<
m_names.at((*stop_itr)->proxy()) <<
": "
1509 << (*stop_itr)->range()->stop()<<
" -> removed"<<endl;
1511 proxiesToReset.insert( (*stop_itr)->proxy() );
1513 (*stop_itr)->setRemovedStop(
true );
1514 pSet.erase(stop_itr++);
◆ setRange()
Definition at line 832 of file IOVSvcTool.cxx.
837 <<
" in IOVrange:" << iovr);
839 if (!iovr.start().isValid() || !iovr.stop().isValid()) {
840 ATH_MSG_ERROR(
"IOVRange " << iovr <<
"is not valid. Start OK: "
841 << iovr.start().isValid() <<
" Stop OK: " << iovr.stop().isValid()
842 <<
" run/evt/time min/max "
846 return StatusCode::FAILURE;
851 if (
proxy ==
nullptr) {
853 return StatusCode::FAILURE;
856 std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
858 return StatusCode::SUCCESS;
◆ setRange_impl()
Definition at line 780 of file IOVSvcTool.cxx.
782 if (iovr.start().isTimestamp()) {
790 IOVRange *
range =
new IOVRange(iovr);
796 const IOVRange *irn = ent->
range();
◆ setRangeInDB()
Definition at line 923 of file IOVSvcTool.cxx.
927 if (!
range.start().isValid() || !
range.stop().isValid()) {
929 return StatusCode::FAILURE;
936 return StatusCode::FAILURE;
939 std::lock_guard<std::recursive_mutex> lock(m_handleMutex);
940 std::map<const DataProxy*,IOVEntry*>::const_iterator itr(
m_entries.find(
dp));
948 if (
idb !=
nullptr) {
952 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 1093 of file IOVSvcTool.cxx.
1098 std::map<const SG::DataProxy*, BFCN*>::const_iterator pitr =
1102 return StatusCode::FAILURE;
1105 BFCN* fcn = pitr->second;
◆ triggerCallback() [2/2]
Definition at line 1075 of file IOVSvcTool.cxx.
1080 std::list<std::string> klist;
1081 klist.push_back(
key);
1082 if ( (*fcn)(
I,klist).isFailure() ) {
1084 return StatusCode::FAILURE;
1087 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
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