This class provides a persistent form for the TransientAddress.
More...
#include <DataHeader.h>
|
| | DataHeaderElement (CLID clid, const std::string &name, const std::vector< CLID > &tClids, std::vector< std::string > &&alias, IOpaqueAddress *tadAddress, IOpaqueAddress *tokAddress, const std::string &pTag) |
| | Internal constructor.
|
This class provides a persistent form for the TransientAddress.
Definition at line 37 of file DataHeader.h.
◆ sgkey_t
◆ DataHeaderElement() [1/6]
| DataHeaderElement::DataHeaderElement |
( |
| ) |
|
◆ DataHeaderElement() [2/6]
◆ DataHeaderElement() [3/6]
| DataHeaderElement::DataHeaderElement |
( |
const SG::TransientAddress * | sgAddress, |
|
|
IOpaqueAddress * | tokAddress, |
|
|
const std::string & | pTag ) |
Constructor.
- Parameters
-
Definition at line 30 of file DataHeader.cxx.
35 std::vector<std::string>(sgAddress->
alias()),
36 sgAddress->address(),
37 tokAddress, pTag)
38{
39}
CLID clID() const
Retrieve string key:
const std::string & name() const
Get the primary (hashed) SG key.
bool transientID(CLID id) const
set transient CLID's
const TransientAliasSet & alias() const
set the clearAddress flag: IOA will not be deleted in proxy
◆ DataHeaderElement() [4/6]
| DataHeaderElement::DataHeaderElement |
( |
const SG::DataProxy * | proxy, |
|
|
IOpaqueAddress * | tokAddress, |
|
|
const std::string & | pTag ) |
Constructor.
- Parameters
-
Definition at line 41 of file DataHeader.cxx.
48 tokAddress, pTag)
49{
50}
◆ DataHeaderElement() [5/6]
| DataHeaderElement::DataHeaderElement |
( |
const CLID | classID, |
|
|
const std::string & | key, |
|
|
Token && | token ) |
◆ ~DataHeaderElement()
| DataHeaderElement::~DataHeaderElement |
( |
| ) |
|
|
virtual |
◆ DataHeaderElement() [6/6]
| DataHeaderElement::DataHeaderElement |
( |
CLID | clid, |
|
|
const std::string & | name, |
|
|
const std::vector< CLID > & | tClids, |
|
|
std::vector< std::string > && | alias, |
|
|
IOpaqueAddress * | tadAddress, |
|
|
IOpaqueAddress * | tokAddress, |
|
|
const std::string & | pTag ) |
|
private |
Internal constructor.
Definition at line 52 of file DataHeader.cxx.
64{
66 const auto ret = std::ranges::unique (
m_clids);
67 m_clids.erase (ret.begin(), ret.end());
69 TokenAddress* tokAddr = dynamic_cast<TokenAddress*>(tokAddress);
70 if (tokAddr != 0 && tokAddr->
getToken() != 0) {
72 } else {
73 tokAddr = dynamic_cast<TokenAddress*>(tadAddress);
74 if (tokAddr != 0 && tokAddr->
getToken() != 0) {
76 } else if (tokAddress != 0) {
77 m_token.fromString(*(tokAddress->par()));
78 } else if (tadAddress != 0) {
79 m_token.fromString(*(tadAddress->par()));
80 }
81 }
82}
const Token & setData(Token *pToken) const
Set all the data part of the token.
◆ addHash()
Add new entry to hash map.
Definition at line 134 of file DataHeader.cxx.
134 {
136 return;
137 }
139 for (std::set<CLID>::iterator iter = clids.begin(), last = clids.end(); iter != last; ++iter) {
141 }
142}
virtual sgkey_t stringToKey(const std::string &str, CLID clid)=0
Find the key for a string/CLID pair.
◆ dump()
| void DataHeaderElement::dump |
( |
std::ostream & | ostr | ) |
const |
Definition at line 172 of file DataHeader.cxx.
173{
174 using namespace std;
175 ostr <<
"SGKey: " <<
getKey() << endl;
178 ostr << " ||";
180 }
181 ostr << std::endl;
183 ostr << "Alias: ";
184 for(
const std::string&
a :
getAlias() ) ostr <<
" " <<
a;
185 ostr << endl;
186 }
187 ostr <<
"Token: " <<
m_token.toString() << endl;
189 ostr << "Hashes:";
190 for(
auto h :
m_hashes ) ostr <<
" " <<
h;
191 ostr << endl;
192 }
193}
◆ getAddress() [1/2]
◆ getAddress() [2/2]
| SG::TransientAddress * DataHeaderElement::getAddress |
( |
long | storageType, |
|
|
const std::string & | key ) const |
- Returns
- a pointer to the TransientAddress of the DataObject, with new transient key.
Definition at line 148 of file DataHeader.cxx.
148 {
150 TokenAddress* tokAdd =
new TokenAddress(storageType, primaryClID,
"",
m_key, 0, &
m_token);
151 SG::TransientAddress* sgAddress =
new SG::TransientAddress(primaryClID, key, tokAdd,
m_clids);
153
154
155
156
157
158
159
160
161
162
163
164
165 auto it = std::ranges::find_if (
m_clids, std::bind_front(std::less<int>{}, primaryClID));
167 }
169 return(sgAddress);
170}
uint32_t CLID
The Class ID type.
void setAlias(const std::string &key)
set alias'
void setSGKey(sgkey_t sgkey)
check if it is a transient ID (primary or symLinked):
◆ getAlias()
| const std::vector< std::string > & DataHeaderElement::getAlias |
( |
| ) |
const |
◆ getClassIDs()
| const std::set< CLID > DataHeaderElement::getClassIDs |
( |
| ) |
const |
- Returns
- a set of all ClassIDs (primary and symlinked).
Definition at line 111 of file DataHeader.cxx.
111 {
114 return(allClids);
115}
◆ getHashes()
- Returns
- the list of hash codes. In 1-1 correspondence with the CLID set.
Definition at line 130 of file DataHeader.cxx.
◆ getKey()
| const std::string & DataHeaderElement::getKey |
( |
| ) |
const |
◆ getPrimaryClassID()
| CLID DataHeaderElement::getPrimaryClassID |
( |
| ) |
const |
◆ getToken()
| const Token * DataHeaderElement::getToken |
( |
| ) |
const |
- Returns
- token by pointer (and give away ownership).
Definition at line 125 of file DataHeader.cxx.
◆ operator=()
Assignment Operator.
Definition at line 92 of file DataHeader.cxx.
92 {
93 if (this != &rhs) {
100 }
101 return(*this);
102}
◆ DataHeaderCnv_p6
◆ DataHeaderElementCnv_p3
◆ DataHeaderElementCnv_p4
◆ DataHeaderElementCnv_p5
◆ m_alias
| std::vector<std::string> DataHeaderElement::m_alias |
|
private |
vector of StoreGate alias string.
Definition at line 111 of file DataHeader.h.
◆ m_clids
| std::vector<CLID> DataHeaderElement::m_clids |
|
private |
vector of unsigned long to store ClassID's for symlinked container.
Definition at line 107 of file DataHeader.h.
◆ m_hashes
| std::vector<sgkey_t> DataHeaderElement::m_hashes |
|
private |
◆ m_key
| std::string DataHeaderElement::m_key |
|
private |
◆ m_pClid
| CLID DataHeaderElement::m_pClid |
|
private |
◆ m_token
| Token DataHeaderElement::m_token |
|
private |
The documentation for this class was generated from the following files: