ATLAS Offline Software
registerKeys.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
11 #include "registerKeys.h"
13 #include "StoreGate/StoreGateSvc.h"
14 
15 //namespace EventSelectorAthenaPoolUtil {
16 
23  const std::vector<DataHeaderElement::sgkey_t>& hashes = dhe.getHashes();
24  if (!hashes.empty()) {
25  // May be empty if we're reading an old file.
26  const std::set<CLID> clids = dhe.getClassIDs();
27  size_t i = 0;
28  for (std::set<CLID>::const_iterator it = clids.begin(); it != clids.end(); ++it, ++i) {
29  store->registerKey(hashes[i], dhe.getKey(), *it);
30  }
31  }
32 }
33 
40  for (std::vector<DataHeaderElement>::const_iterator dhe_i = dh.begin(); dhe_i != dh.end(); ++dhe_i) {
41  registerKeys(*dhe_i, store);
42  }
43 }
44 //} // namespace EventSelectorAthenaPoolUtil
python.root_lsr_rank.hashes
hashes
Definition: root_lsr_rank.py:34
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:71
registerKeys.h
Helper functions for registering hash keys with the SG service.
skel.it
it
Definition: skel.GENtoEVGEN.py:396
PyPoolBrowser.dh
dh
Definition: PyPoolBrowser.py:102
DataHeaderElement::getKey
const std::string & getKey() const
Definition: DataHeader.cxx:127
EventSelectorAthenaPoolUtil::registerKeys
void registerKeys(const DataHeaderElement &dhe, StoreGateSvc *store)
Register all hash keys for one DH Element.
Definition: registerKeys.cxx:22
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
DataHeaderElement
This class provides a persistent form for the TransientAddress.
Definition: DataHeader.h:36
DataHeader
This class provides the layout for summary information stored for data written to POOL.
Definition: DataHeader.h:124
lumiFormat.i
int i
Definition: lumiFormat.py:85
DataHeader.h
This file contains the class definition for the DataHeader and DataHeaderElement classes.
StoreGateSvc::registerKey
virtual void registerKey(sgkey_t key, const std::string &str, CLID clidid) override final
Remember an additional mapping from key to string/CLID.
Definition: StoreGateSvc.cxx:404
DataHeaderElement::getHashes
const std::vector< sgkey_t > & getHashes() const
Definition: DataHeader.cxx:144
DataHeaderElement::getClassIDs
const std::set< CLID > getClassIDs() const
Definition: DataHeader.cxx:121
StoreGateSvc.h