ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
AddressRemappingSvc Class Reference

This class provides the interface to the LCG POOL persistency software. More...

#include <AddressRemappingSvc.h>

Inheritance diagram for AddressRemappingSvc:
Collaboration diagram for AddressRemappingSvc:

Public Member Functions

 AddressRemappingSvc (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Service Constructor. More...
 
virtual ~AddressRemappingSvc ()
 Destructor. More...
 
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE () override
 Required of all Gaudi services: More...
 
virtual StatusCode finalize () override
 Required of all Gaudi services: More...
 
virtual StatusCode preLoadAddresses (StoreID::type storeID, IAddressProvider::tadList &tads) override
 Get all addresses from provider. More...
 
virtual StatusCode loadAddresses (StoreID::type storeID, IAddressProvider::tadList &tads) override
 Implementation of the loadAddresses function without any functionality. More...
 
virtual StatusCode updateAddress (StoreID::type, SG::TransientAddress *pTad, const EventContext &ctx) override
 Update a transient address. More...
 
virtual const IInputRename::InputRenameRCU_t * inputRenameMap () const override
 Retrieve a pointer to the input rename map. More...
 

Private Types

using InputRenameMap_t = Athena::InputRenameMap_t
 Map of sgkey->sgkey for input renames. More...
 
using InputRenameRCU_t = Athena::IInputRename::InputRenameRCU_t
 

Private Member Functions

CLID getClid (const std::string &type) const
 
StatusCode preLoadAddressesConst (StoreID::type storeID, IAddressProvider::tadList &tads) const
 
StatusCode updateAddressConst (StoreID::type, SG::TransientAddress *pTad, const EventContext &ctx) const
 
StatusCode loadAddressesConst (IAddressProvider::tadList &tads) const
 
void addInputRenames (const InputRenameMap_t &toadd) const
 Merge in additional input rename mappings. More...
 
StatusCode initInputRenames ATLAS_NOT_THREAD_SAFE ()
 Set up input rename mappings during initialization. More...
 
StatusCode renameTads (IAddressProvider::tadList &tads) const
 Scan TAD list and carry out any requested renamings. More...
 
void initDeletes ()
 
bool isDeleted (const SG::TransientAddress &tad) const
 

Private Attributes

ServiceHandle< IClassIDSvc > m_clidSvc
 
ServiceHandle< IProxyDictm_proxyDict
 
ServiceHandle< Athena::IRCUSvcm_RCUSvc
 
ServiceHandle< IAlgResourcePool > m_algResourcePool
 
StringArrayProperty m_overwriteMaps {this,"TypeKeyOverwriteMaps",{},"","OrderedSet<std::string>"}
 TypeKeyOverwriteMaps, map for type::key overwrites. More...
 
std::vector< SG::TransientAddressm_oldTads
 
std::vector< SG::TransientAddressm_newTads
 
CxxUtils::CachedValue< std::vector< SG::TransientAddress > > m_oldTadsCleaned
 
CxxUtils::CachedValue< std::vector< SG::TransientAddress > > m_newTadsCleaned
 
Gaudi::Property< std::vector< std::string > > m_typeKeyRenameMaps
 Property: list of requested input renames. More...
 
std::unique_ptr< InputRenameRCU_tm_inputRenames
 
Gaudi::Property< bool > m_skipBadRemappings
 
std::mutex m_deletesMutex
 
std::atomic< bool > m_haveDeletes =false
 
std::unordered_multimap< std::string, CLIDm_deletes
 

Detailed Description

This class provides the interface to the LCG POOL persistency software.

Definition at line 39 of file AddressRemappingSvc.h.

Member Typedef Documentation

◆ InputRenameMap_t

Map of sgkey->sgkey for input renames.

This object is exported via inputRenameMap and is synchronized via RCU.

Definition at line 112 of file AddressRemappingSvc.h.

◆ InputRenameRCU_t

Definition at line 113 of file AddressRemappingSvc.h.

Constructor & Destructor Documentation

◆ AddressRemappingSvc()

AddressRemappingSvc::AddressRemappingSvc ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Standard Service Constructor.

Definition at line 35 of file AddressRemappingSvc.cxx.

35  :
36  base_class(name, pSvcLocator),
37  m_clidSvc("ClassIDSvc", name),
38  m_RCUSvc("Athena::RCUSvc", name),
39  m_oldTads(),
40  m_newTads()
41 {}

◆ ~AddressRemappingSvc()

AddressRemappingSvc::~AddressRemappingSvc ( )
virtual

Destructor.

Definition at line 44 of file AddressRemappingSvc.cxx.

44  {
45 }

Member Function Documentation

◆ addInputRenames()

void AddressRemappingSvc::addInputRenames ( const InputRenameMap_t toadd) const
private

Merge in additional input rename mappings.

Parameters
toaddMappings to add.

Additional sgkey->sgkey input rename mappings are merged into the rename map, using RCU synchronization.

Definition at line 113 of file AddressRemappingSvc.cxx.

114 {
115  if (toadd.empty()) return;
116  // Ok, managed via RCU.
118  Athena::RCUUpdate<InputRenameMap_t> u (inputRenames);
119  auto newmap = std::make_unique<InputRenameMap_t> (*u);
120  for (const auto& p : toadd)
121  newmap->insert (p);
122  u.update (std::move (newmap));
123 }

◆ ATLAS_NOT_THREAD_SAFE() [1/2]

StatusCode initInputRenames AddressRemappingSvc::ATLAS_NOT_THREAD_SAFE ( )
private

Set up input rename mappings during initialization.

◆ ATLAS_NOT_THREAD_SAFE() [2/2]

virtual StatusCode initialize AddressRemappingSvc::ATLAS_NOT_THREAD_SAFE ( )
overridevirtual

Required of all Gaudi services:

◆ finalize()

StatusCode AddressRemappingSvc::finalize ( )
overridevirtual

Required of all Gaudi services:

Definition at line 173 of file AddressRemappingSvc.cxx.

174 {
175  ATH_CHECK( m_clidSvc.release() );
176  ATH_CHECK( m_proxyDict.release() );
177  ATH_CHECK( m_RCUSvc.release() );
178  ATH_CHECK( m_algResourcePool.release() );
180  return(StatusCode::SUCCESS);
181 }

◆ getClid()

CLID AddressRemappingSvc::getClid ( const std::string &  type) const
private

Definition at line 480 of file AddressRemappingSvc.cxx.

480  {
481  CLID clid(atoi(type.c_str())); // Is type a CLID?
482  if (clid == 0) { // or not
483  if (!m_clidSvc->getIDOfTypeName(type, clid).isSuccess()) {
484  return(0);
485  }
486  }
487  return(clid);
488 }

◆ initDeletes()

void AddressRemappingSvc::initDeletes ( )
private

Definition at line 498 of file AddressRemappingSvc.cxx.

499 {
500  if (m_haveDeletes) return;
501 
502  std::list<IAlgorithm*> algs = m_algResourcePool->getFlatAlgList();
503 
504  std::scoped_lock lock (m_deletesMutex);
505  if (m_haveDeletes) return;
506  m_haveDeletes = true;
507 
508  for (IAlgorithm* ialg : algs) {
509  if (Gaudi::Algorithm* alg = dynamic_cast<Gaudi::Algorithm*> (ialg)) {
510  // Need to ignore SGInputLoader; it'll have output deps
511  // on everything being read.
512  if (alg->name() == "SGInputLoader") continue;
513 
514  // Also ignore ViewDataVerifier algs, since they have no real output
515  if (alg->type() == "AthViews::ViewDataVerifier" ) continue;
516 
517  for (const DataObjID& dobj : alg->outputDataObjs()) {
518  static const std::string pref = "StoreGateSvc+";
519  if (dobj.key().rfind(pref, 0) != std::string::npos) {
520  std::string key = dobj.key().substr (pref.size());
521  m_deletes.emplace (key, dobj.clid());
522 
523  // If this looks like an xAOD type, then also make an entry
524  // for an aux store. Don't want to try to rely on BaseInfo here,
525  // as we may not have loaded the proper libraries yet.
526  // Second line of the test is to handle the tests in DataModelTest.
527  if (dobj.fullKey().find ("xAOD") != std::string::npos ||
528  dobj.fullKey().find ("cinfo") != std::string::npos)
529  {
530  m_deletes.emplace (key + "Aux.",
532  }
533  }
534  }
535  } else {
536  ATH_MSG_WARNING(ialg->name() << " doesn't seem to be an Algorithm" );
537  }
538 
539  }
540 }

◆ inputRenameMap()

const AddressRemappingSvc::InputRenameRCU_t * AddressRemappingSvc::inputRenameMap ( ) const
overridevirtual

Retrieve a pointer to the input rename map.

May return null if no renaming is to be done.

Definition at line 491 of file AddressRemappingSvc.cxx.

492 {
493  if (m_typeKeyRenameMaps.empty())
494  return nullptr;
495  return m_inputRenames.get();
496 }

◆ isDeleted()

bool AddressRemappingSvc::isDeleted ( const SG::TransientAddress tad) const
private

Definition at line 542 of file AddressRemappingSvc.cxx.

543 {
544  std::string key = tad.name();
545  std::scoped_lock lock (m_deletesMutex);
546  for (const auto& p : boost::make_iterator_range (m_deletes.equal_range (key))) {
547  CLID clid = p.second;
548  if (tad.transientID (clid)) {
549  return true;
550  }
551  }
552  return false;
553 }

◆ loadAddresses()

StatusCode AddressRemappingSvc::loadAddresses ( StoreID::type  storeID,
IAddressProvider::tadList tads 
)
overridevirtual

Implementation of the loadAddresses function without any functionality.

Definition at line 229 of file AddressRemappingSvc.cxx.

231 {
232  if (storeID == StoreID::EVENT_STORE) {
233  initDeletes();
234  ATH_CHECK( renameTads (tads) );
235  }
236  return loadAddressesConst (tads);
237 }

◆ loadAddressesConst()

StatusCode AddressRemappingSvc::loadAddressesConst ( IAddressProvider::tadList tads) const
private

Definition at line 239 of file AddressRemappingSvc.cxx.

240 {
241  if(!m_skipBadRemappings) return(StatusCode::SUCCESS);
243  return StatusCode::SUCCESS;
244  }
245 
246  std::vector<SG::TransientAddress> oldTadsCleaned = m_oldTads;
247  std::vector<SG::TransientAddress> newTadsCleaned = m_newTads;
248 
249  //do same as in preLoadAddresses, except check each tad will have a valid proxy to remap to
250  StatusCode status = m_proxyDict.retrieve();
251  if (!status.isSuccess()) {
252  ATH_MSG_ERROR("Unable to get the IProxyDict");
253  return(status);
254  }
255  for (std::vector<SG::TransientAddress>::iterator oldIter = oldTadsCleaned.begin(),
256  newIter = newTadsCleaned.begin(), oldIterEnd = oldTadsCleaned.end();
257  oldIter != oldIterEnd; ++oldIter, ++newIter)
258  {
259  CLID goodCLID = newIter->clID(); //newIter are the things we are remapping to
260  SG::TransientAddress::TransientClidSet clidvec(oldIter->transientID());
261  std::set<CLID> clidToKeep (clidvec.begin(), clidvec.end());
262  //try dataproxy, if it fails, try data proxy of next type
263  SG::DataProxy* dataProxy(m_proxyDict->proxy(goodCLID,newIter->name()/*the name of the address in the input file*/));
264  if(dataProxy==0) {
265  //remove goodCLID from the clidToKeep
266  clidToKeep.erase(goodCLID);
267  //try base types
268  const SG::BaseInfoBase* bi = SG::BaseInfoBase::find (newIter->clID());
269  if (bi) {
270  for (CLID goodCLID : bi->get_bases()) {
271  dataProxy = m_proxyDict->proxy(goodCLID, newIter->name());
272  if(dataProxy) break;
273  clidToKeep.erase(goodCLID); //was a bad CLID, so get rid of it
274  }
275  }
276  if(dataProxy) {
277  ATH_MSG_DEBUG("Remapping " << oldIter->clID() << "#" << oldIter->name() << " to base-class CLID: " << goodCLID << "#" << newIter->name());
278  //modify newIter to have these restricted clid instead
279  *newIter = SG::TransientAddress(goodCLID, newIter->name());
280  }
281  }
282  if(dataProxy==0) {
283  ATH_MSG_INFO("Skipping remapping of " << oldIter->clID() << "#" << oldIter->name() << " because no suitable remapping found");
284  continue;
285  }
286  SG::TransientAddress* tadd = new SG::TransientAddress(goodCLID,oldIter->name(),oldIter->address());
287  tadd->setAlias(oldIter->alias());//match the aliases
288  //also match the transientIDs, but only for the ok CLID
289  for(auto tIter = clidToKeep.begin(); tIter != clidToKeep.end(); ++tIter) {
290  if(goodCLID == *tIter) continue; //already added in constructor
291  tadd->setTransientID(goodCLID);
292  }
293  //replace oldIter tad with this new tadd if we have changed the primary CLID
294  if(oldIter->clID()!=tadd->clID()) {
295  *oldIter = *tadd; //relies on assignment operator
296  }
297  tads.push_back(tadd);
298  m_proxyDict->stringToKey(oldIter->name(), oldIter->clID());
299  m_proxyDict->stringToKey(newIter->name(), newIter->clID());
300  }
301 
302 
303  //only do this once, not every event .. FIXME: Should I be rechecking every new file? For now, we assume will not chain together different sample types
304  m_oldTadsCleaned.set (std::move (oldTadsCleaned));
305  m_newTadsCleaned.set (std::move (newTadsCleaned));
306 
307  return StatusCode::SUCCESS;
308 
309 }

◆ preLoadAddresses()

StatusCode AddressRemappingSvc::preLoadAddresses ( StoreID::type  storeID,
IAddressProvider::tadList tads 
)
overridevirtual

Get all addresses from provider.

Called before begin event.

Parameters
storeID[IN] store ID, this function only preloads detector store addresses.
tads[OUT] list of the transient addresses which were preloaded.

Definition at line 183 of file AddressRemappingSvc.cxx.

185 {
186  return preLoadAddressesConst (storeID, tads);
187 }

◆ preLoadAddressesConst()

StatusCode AddressRemappingSvc::preLoadAddressesConst ( StoreID::type  storeID,
IAddressProvider::tadList tads 
) const
private

Definition at line 188 of file AddressRemappingSvc.cxx.

190 {
191  if (storeID == StoreID::EVENT_STORE) {
192  ATH_CHECK( renameTads (tads) );
193  }
194 
195  const std::vector<SG::TransientAddress>* oldTads = nullptr;
196  const std::vector<SG::TransientAddress>* newTads = nullptr;
197 
198  if (m_skipBadRemappings) {
199  // We need to have the cleaned lists built in loadAddresses.
200  // If that hasn't already been done, return now.
202  return StatusCode::SUCCESS;
203  }
204  oldTads = m_oldTadsCleaned.ptr();
205  newTads = m_newTadsCleaned.ptr();
206  }
207  else {
208  // No cleaning needed.
209  oldTads = &m_oldTads;
210  newTads = &m_newTads;
211  }
212 
213  StatusCode status = m_proxyDict.retrieve();
214  if (!status.isSuccess()) {
215  ATH_MSG_ERROR("Unable to get the IProxyDict");
216  return(status);
217  }
218  for (std::vector<SG::TransientAddress>::const_iterator oldIter = oldTads->begin(),
219  newIter = newTads->begin(), oldIterEnd = oldTads->end();
220  oldIter != oldIterEnd; ++oldIter, ++newIter) {
221  SG::TransientAddress* tadd = new SG::TransientAddress(*oldIter);
222  tads.push_back(tadd);
223  m_proxyDict->stringToKey(oldIter->name(), oldIter->clID());
224  m_proxyDict->stringToKey(newIter->name(), newIter->clID());
225  }
226  return(StatusCode::SUCCESS);
227 }

◆ renameTads()

StatusCode AddressRemappingSvc::renameTads ( IAddressProvider::tadList tads) const
private

Scan TAD list and carry out any requested renamings.

Parameters
tadslist of TADs from previous providers.

Definition at line 364 of file AddressRemappingSvc.cxx.

365 {
366  // Fetch the current rename map using RCU.
368 
369  // We can exit early if there's nothing to do.
370  // FIXME: m_deletes will almost never be empty, but many times it will have
371  // no overlap with the input file. Should try to speed up by
372  // noticing/caching that somehow.
373  {
374  std::scoped_lock lock (m_deletesMutex);
375  if (r->empty() && m_deletes.empty()) return StatusCode::SUCCESS;
376  }
377 
378  // We may discover additional remappings due to autosymlinking.
379  // Accumulate them here.
380  InputRenameMap_t newmap;
381 
382  // Loop over all TADs.
385  while (pos != end) {
386  SG::TransientAddress*& tad = *pos;
387 
388  // Has the object described by this TAD been renamed?
389  // FIXME: Handle renaming aliases.
390  CLID tad_clid = tad->clID();
391  SG::sgkey_t sgkey = m_proxyDict->stringToKey (tad->name(), tad_clid);
392  auto it = r->find (sgkey);
393  if (it != r->end()) {
394  const std::string& name_renamed = it->second.m_key;
395 
396  // We're doing a renaming. Make a new TAD with the new name.
397  auto tad_new = std::make_unique<SG::TransientAddress>
398  (tad_clid, name_renamed,
399  tad->address(), tad->clearAddress());
400  for (CLID clid : tad->transientID()) {
401  if (clid == tad_clid) continue;
402  tad_new->setTransientID (clid);
403  SG::sgkey_t from_key = m_proxyDict->stringToKey (tad->name(), clid);
404  if (r->find(from_key) == r->end()) {
405  SG::sgkey_t to_key = m_proxyDict->stringToKey (name_renamed, clid);
406  newmap[from_key] = Athena::InputRenameEntry { to_key, name_renamed };
407  }
408  }
409 
410  size_t namelen = tad->name().size();
411  for (const std::string& a : tad->alias()) {
412  std::string a_renamed = a;
413 
414  SG::sgkey_t from_key = m_proxyDict->stringToKey (a_renamed, tad_clid);
415  auto it_a = r->find (from_key);
416  if (it_a != r->end()) {
417  a_renamed = it_a->second.m_key;
418  }
419 
420  if (strncmp (a_renamed.c_str(), tad->name().c_str(), namelen) == 0 &&
421  a_renamed[namelen] == '.')
422  {
423  a_renamed = name_renamed + a_renamed.substr (namelen, std::string::npos);
424  }
425 
426  tad_new->setAlias (a_renamed);
427  }
428  tad_new->setProvider (tad->provider(), tad->storeID());
429 
430  // Replace the old TAD in the list with the new one.
431  delete tad;
432  tad = tad_new.release();
433 
434  ++pos;
435  }
436 
437  else if (isDeleted (*tad)) {
438  // Rename the existing TAD to end in _DELETED.
439  // Drop symlinks in the process.
440  auto tad_new = std::make_unique<SG::TransientAddress>
441  (tad->clID(), tad->name() + "_DELETED",
442  tad->address(), tad->clearAddress());
443  tad_new->setProvider (tad->provider(), tad->storeID());
444  // Preserve alias information, also renaming them to end in _DELETED.
445  for (const std::string& a : tad->alias()) {
446  tad_new->setAlias (a + "_DELETED");
447  }
448  // Replace the old TAD in the list with the new one.
449  delete tad;
450  tad = tad_new.release();
451 
452  ++pos;
453  }
454 
455  else {
456  // Check for renaming of an alias; eg., for renaming a dynamic vbl.
458  for (const std::string& a : aset) {
459  SG::sgkey_t from_key = m_proxyDict->stringToKey (a, tad_clid);
460  auto it_a = r->find (from_key);
461  if (it_a != r->end()) {
462  const std::string& s = it_a->second.m_key;
463  tad->removeAlias (a);
464  tad->setAlias (s);
465  }
466  }
467 
468  ++pos;
469  }
470  }
471 
472  // Publish additional remappings.
473  addInputRenames (newmap);
474 
475  return StatusCode::SUCCESS;
476 }

◆ updateAddress()

StatusCode AddressRemappingSvc::updateAddress ( StoreID::type  storeID,
SG::TransientAddress pTad,
const EventContext &  ctx 
)
overridevirtual

Update a transient address.

Do mapping from one address to another

Parameters
tad[IN] transient address to be updated.

Definition at line 311 of file AddressRemappingSvc.cxx.

314 {
315  return updateAddressConst (storeID, tad, ctx);
316 }

◆ updateAddressConst()

StatusCode AddressRemappingSvc::updateAddressConst ( StoreID::type  ,
SG::TransientAddress pTad,
const EventContext &  ctx 
) const
private

Definition at line 317 of file AddressRemappingSvc.cxx.

320 {
321  const std::vector<SG::TransientAddress>* oldTads = nullptr;
322  const std::vector<SG::TransientAddress>* newTads = nullptr;
323 
325  oldTads = m_oldTadsCleaned.ptr();
326  newTads = m_newTadsCleaned.ptr();
327  }
328  else {
329  // No cleaning needed.
330  oldTads = &m_oldTads;
331  newTads = &m_newTads;
332  }
333 
334  for (std::vector<SG::TransientAddress>::const_iterator oldIter = oldTads->begin(),
335  newIter = newTads->begin(), oldIterEnd = oldTads->end();
336  oldIter != oldIterEnd; ++oldIter, ++newIter) {
337  if (oldIter->transientID(tad->clID()) &&
338  (oldIter->name() == tad->name() || oldIter->hasAlias (tad->name())))
339  {
340  ATH_MSG_DEBUG("Overwrite for: " << tad->clID() << "#" << tad->name() << " -> " << newIter->clID() << "#" << newIter->name());
341  SG::DataProxy* dataProxy(m_proxyDict->proxy(newIter->clID(), newIter->name()));
342  if (dataProxy == 0) {
343  ATH_MSG_WARNING("Cannot get proxy for: " << newIter->clID() << "#" << newIter->name());
344  return(StatusCode::FAILURE);
345  }
346  GenericAddress* newGadd = 0;
347  if (dataProxy->isValidAddress()) newGadd = dynamic_cast<GenericAddress*>(dataProxy->address());
348  if (newGadd == 0) {
349  ATH_MSG_WARNING("Cannot get GenericAddress for: " << newIter->clID() << "#" << newIter->name());
350  return(StatusCode::FAILURE);
351  }
352  GenericAddress* oldGadd = new GenericAddress(newGadd->svcType(), tad->clID(), *newGadd->par(), tad->name(), *newGadd->ipar());
353  tad->setAddress(oldGadd);
354  return(StatusCode::SUCCESS);
355  }
356  }
357  return(StatusCode::FAILURE);
358 }

Member Data Documentation

◆ m_algResourcePool

ServiceHandle<IAlgResourcePool> AddressRemappingSvc::m_algResourcePool
private
Initial value:
{this,"AlgResourcePool","AlgResourcePool",
"Algorithm resource pool service."}

Definition at line 85 of file AddressRemappingSvc.h.

◆ m_clidSvc

ServiceHandle<IClassIDSvc> AddressRemappingSvc::m_clidSvc
private

Definition at line 81 of file AddressRemappingSvc.h.

◆ m_deletes

std::unordered_multimap<std::string, CLID> AddressRemappingSvc::m_deletes
private

Definition at line 122 of file AddressRemappingSvc.h.

◆ m_deletesMutex

std::mutex AddressRemappingSvc::m_deletesMutex
mutableprivate

Definition at line 120 of file AddressRemappingSvc.h.

◆ m_haveDeletes

std::atomic<bool> AddressRemappingSvc::m_haveDeletes =false
private

Definition at line 121 of file AddressRemappingSvc.h.

◆ m_inputRenames

std::unique_ptr<InputRenameRCU_t> AddressRemappingSvc::m_inputRenames
private

Definition at line 114 of file AddressRemappingSvc.h.

◆ m_newTads

std::vector<SG::TransientAddress> AddressRemappingSvc::m_newTads
private

Definition at line 91 of file AddressRemappingSvc.h.

◆ m_newTadsCleaned

CxxUtils::CachedValue<std::vector<SG::TransientAddress> > AddressRemappingSvc::m_newTadsCleaned
private

Definition at line 98 of file AddressRemappingSvc.h.

◆ m_oldTads

std::vector<SG::TransientAddress> AddressRemappingSvc::m_oldTads
private

Definition at line 90 of file AddressRemappingSvc.h.

◆ m_oldTadsCleaned

CxxUtils::CachedValue<std::vector<SG::TransientAddress> > AddressRemappingSvc::m_oldTadsCleaned
private

Definition at line 97 of file AddressRemappingSvc.h.

◆ m_overwriteMaps

StringArrayProperty AddressRemappingSvc::m_overwriteMaps {this,"TypeKeyOverwriteMaps",{},"","OrderedSet<std::string>"}
private

TypeKeyOverwriteMaps, map for type::key overwrites.

Definition at line 89 of file AddressRemappingSvc.h.

◆ m_proxyDict

ServiceHandle<IProxyDict> AddressRemappingSvc::m_proxyDict
private
Initial value:
{this,"ProxyDict","StoreGateSvc",
"the IProxyDict we want to apply the remapping to (by default the event store)"}

Definition at line 82 of file AddressRemappingSvc.h.

◆ m_RCUSvc

ServiceHandle<Athena::IRCUSvc> AddressRemappingSvc::m_RCUSvc
private

Definition at line 84 of file AddressRemappingSvc.h.

◆ m_skipBadRemappings

Gaudi::Property<bool> AddressRemappingSvc::m_skipBadRemappings
private
Initial value:
{this,"SkipBadRemappings",false,
"If true, will delay the remapping setup until the first load, and will check against the given file"}

Definition at line 116 of file AddressRemappingSvc.h.

◆ m_typeKeyRenameMaps

Gaudi::Property<std::vector<std::string> > AddressRemappingSvc::m_typeKeyRenameMaps
private
Initial value:
{this,"TypeKeyRenameMaps",{},
"List of renamings to apply to input objects. This is distinct from the "
"mappings given by TypeKeyOverwriteMaps in that objects listed under "
"TypeKeyOverwriteMaps are accessible by both the old and new names; "
"while for TypeKeyRenameMaps, only the new names are visible (so the old names "
"may be rewritten). Overwriting may also change the visible type of an object, "
"while renaming may not. Format of list elements is OLDNAME#TYPE->NEWNAME.","OrderedSet<std::string>"}

Property: list of requested input renames.

Definition at line 101 of file AddressRemappingSvc.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
python.PyAthenaComps.algs
algs
Definition: PyAthenaComps.py:41
beamspotman.r
def r
Definition: beamspotman.py:674
common.sgkey
def sgkey(tool)
Definition: common.py:1027
AddressRemappingSvc::isDeleted
bool isDeleted(const SG::TransientAddress &tad) const
Definition: AddressRemappingSvc.cxx:542
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
AddressRemappingSvc::m_skipBadRemappings
Gaudi::Property< bool > m_skipBadRemappings
Definition: AddressRemappingSvc.h:116
CxxUtils::CachedValue::ptr
const T * ptr() const
Return a pointer to the cached value.
Athena::RCUUpdate
Helper to update data in a RCUObject.
Definition: RCUObject.h:138
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SG::TransientAddress::storeID
StoreID::type storeID() const
Definition: TransientAddress.h:334
AddressRemappingSvc::addInputRenames
void addInputRenames(const InputRenameMap_t &toadd) const
Merge in additional input rename mappings.
Definition: AddressRemappingSvc.cxx:113
CxxUtils::CachedValue::isValid
bool isValid() const
Test to see if the value is valid.
AddressRemappingSvc::m_inputRenames
std::unique_ptr< InputRenameRCU_t > m_inputRenames
Definition: AddressRemappingSvc.h:114
SG::TransientAddress::setAlias
void setAlias(const std::string &key)
set alias'
Definition: TransientAddress.h:260
skel.it
it
Definition: skel.GENtoEVGEN.py:407
AddressRemappingSvc::m_oldTads
std::vector< SG::TransientAddress > m_oldTads
Definition: AddressRemappingSvc.h:90
AddressRemappingSvc::m_oldTadsCleaned
CxxUtils::CachedValue< std::vector< SG::TransientAddress > > m_oldTadsCleaned
Definition: AddressRemappingSvc.h:97
SG::TransientAddress
Definition: TransientAddress.h:32
SG::TransientAddress::TransientClidSet
std::vector< CLID > TransientClidSet
Strictly a set, but there shouldn't be more than a handful of entries, so store it as a sorted vector...
Definition: TransientAddress.h:38
python.RatesEmulationExample.lock
lock
Definition: RatesEmulationExample.py:148
SG::TransientAddress::removeAlias
bool removeAlias(const std::string &key)
remove alias from proxy
Definition: TransientAddress.h:283
AddressRemappingSvc::m_haveDeletes
std::atomic< bool > m_haveDeletes
Definition: AddressRemappingSvc.h:121
TestSUSYToolsAlg.pref
pref
Definition: TestSUSYToolsAlg.py:80
SG::BaseInfoBase::get_bases
const std::vector< CLID > & get_bases() const
Return the class IDs of all known bases of T (that have class IDs).
Definition: BaseInfo.cxx:304
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
AddressRemappingSvc::initDeletes
void initDeletes()
Definition: AddressRemappingSvc.cxx:498
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
AddressRemappingSvc::m_clidSvc
ServiceHandle< IClassIDSvc > m_clidSvc
Definition: AddressRemappingSvc.h:81
SG::TransientAddress::name
const std::string & name() const
Get the primary (hashed) SG key.
Definition: TransientAddress.h:217
AddressRemappingSvc::m_newTadsCleaned
CxxUtils::CachedValue< std::vector< SG::TransientAddress > > m_newTadsCleaned
Definition: AddressRemappingSvc.h:98
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
Athena::InputRenameEntry
Type of the input rename map: sgkey_t -> sgkey_t.
Definition: InputRenameMap.h:28
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SG::TransientAddress::alias
const TransientAliasSet & alias() const
set the clearAddress flag: IOA will not be deleted in proxy
Definition: TransientAddress.h:301
AddressRemappingSvc::renameTads
StatusCode renameTads(IAddressProvider::tadList &tads) const
Scan TAD list and carry out any requested renamings.
Definition: AddressRemappingSvc.cxx:364
SG::TransientAddress::provider
IAddressProvider * provider()
Definition: TransientAddress.h:329
AddressRemappingSvc::m_algResourcePool
ServiceHandle< IAlgResourcePool > m_algResourcePool
Definition: AddressRemappingSvc.h:85
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
Athena::RCURead
Helper to read data from a RCUObject.
Definition: RCUObject.h:136
SG::TransientAddress::clID
CLID clID() const
Retrieve string key:
Definition: TransientAddress.h:210
ClassID_traits
Default, invalid implementation of ClassID_traits.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:37
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
AddressRemappingSvc::InputRenameMap_t
Athena::InputRenameMap_t InputRenameMap_t
Map of sgkey->sgkey for input renames.
Definition: AddressRemappingSvc.h:112
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
AddressRemappingSvc::m_RCUSvc
ServiceHandle< Athena::IRCUSvc > m_RCUSvc
Definition: AddressRemappingSvc.h:84
AddressRemappingSvc::m_deletes
std::unordered_multimap< std::string, CLID > m_deletes
Definition: AddressRemappingSvc.h:122
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
SG::BaseInfoBase::find
static const BaseInfoBase * find(CLID clid)
Find the BaseInfoBase instance for clid.
Definition: BaseInfo.cxx:570
RegSelToolConfig.alg
alg
Definition: RegSelToolConfig.py:332
SG::TransientAddress::setTransientID
void setTransientID(CLID id)
get transient CLID's
Definition: TransientAddress.cxx:164
SG::sgkey_t
uint32_t sgkey_t
Type used for hashed StoreGate key+CLID pairs.
Definition: CxxUtils/CxxUtils/sgkey_t.h:32
CxxUtils::CachedValue::set
void set(const T &val) const
Set the value, assuming it is currently invalid.
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
AddressRemappingSvc::preLoadAddressesConst
StatusCode preLoadAddressesConst(StoreID::type storeID, IAddressProvider::tadList &tads) const
Definition: AddressRemappingSvc.cxx:188
AddressRemappingSvc::m_proxyDict
ServiceHandle< IProxyDict > m_proxyDict
Definition: AddressRemappingSvc.h:82
a
TList * a
Definition: liststreamerinfos.cxx:10
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SG::BaseInfoBase
The non-template portion of the BaseInfo implementation.
Definition: Control/AthenaKernel/AthenaKernel/BaseInfo.h:451
AddressRemappingSvc::updateAddressConst
StatusCode updateAddressConst(StoreID::type, SG::TransientAddress *pTad, const EventContext &ctx) const
Definition: AddressRemappingSvc.cxx:317
AddressRemappingSvc::m_typeKeyRenameMaps
Gaudi::Property< std::vector< std::string > > m_typeKeyRenameMaps
Property: list of requested input renames.
Definition: AddressRemappingSvc.h:101
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
AddressRemappingSvc::loadAddressesConst
StatusCode loadAddressesConst(IAddressProvider::tadList &tads) const
Definition: AddressRemappingSvc.cxx:239
SG::TransientAddress::clearAddress
void clearAddress(const bool &flag)
Return the clearAddress flag.
Definition: TransientAddress.h:308
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
AddressRemappingSvc::InputRenameRCU_t
Athena::IInputRename::InputRenameRCU_t InputRenameRCU_t
Definition: AddressRemappingSvc.h:113
merge.status
status
Definition: merge.py:16
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
StoreID::EVENT_STORE
@ EVENT_STORE
Definition: StoreID.h:26
SG::TransientAddress::TransientAliasSet
std::vector< std::string > TransientAliasSet
Definition: TransientAddress.h:40
SG::DataProxy
Definition: DataProxy.h:45
SG::TransientAddress::transientID
bool transientID(CLID id) const
set transient CLID's
Definition: TransientAddress.h:245
AddressRemappingSvc::m_deletesMutex
std::mutex m_deletesMutex
Definition: AddressRemappingSvc.h:120
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
AddressRemappingSvc::m_newTads
std::vector< SG::TransientAddress > m_newTads
Definition: AddressRemappingSvc.h:91