ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaPOOL
AthenaPoolUtilities
AthenaPoolUtilities
TPCnvTokenList_p1.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef TPCnvTokenList_p1_h
6
#define TPCnvTokenList_p1_h
7
8
#include <vector>
9
#include <string>
10
#include <sstream>
11
#include <stdexcept>
12
15
23
24
class
TPCnvToken_p1
{
25
public
:
30
explicit
31
TPCnvToken_p1
(
unsigned
short
cnvID=0,
const
std::string&
token
=
""
)
32
:
m_converterID
(cnvID),
m_token
(
token
) {}
33
35
unsigned
short
converterID
()
const
{
return
m_converterID
; }
36
38
const
std::string&
token
()
const
{
return
m_token
; }
39
40
protected
:
41
unsigned
short
m_converterID
;
42
std::string
m_token
;
43
};
44
45
46
53
54
class
TPCnvTokenList_p1
55
:
public
std::vector<TPCnvToken_p1>
56
{
57
public
:
62
void
addToken
(
unsigned
short
cnvID,
const
std::string& token) {
63
push_back(
TPCnvToken_p1
(cnvID, token) );
64
}
65
70
const
std::string&
findToken
(
unsigned
short
id
) {
71
for
( const_iterator it = begin(); it != end(); ++it ) {
72
if
( it->converterID() ==
id
)
73
return
it->token();
74
}
75
std::ostringstream
error
;
76
error
<<
"TPCnvTokenList_p1::findToken(): could not find a token for converter ID="
<<
id
<< std::ends;
77
throw
std::runtime_error(
error
.str() );
78
}
79
};
80
81
82
83
#endif
TPCnvTokenList_p1
vector of TPCnvToken_p1 Each top-level persistent object that has extentions needs a data member of t...
Definition
TPCnvTokenList_p1.h:56
TPCnvTokenList_p1::findToken
const std::string & findToken(unsigned short id)
Retrieves token of the extending object given the converter ID.
Definition
TPCnvTokenList_p1.h:70
TPCnvTokenList_p1::addToken
void addToken(unsigned short cnvID, const std::string &token)
Stores a new reference to an extending object.
Definition
TPCnvTokenList_p1.h:62
TPCnvToken_p1
This class servers as a persistent pointer to maintain reference between the principal top-level obje...
Definition
TPCnvTokenList_p1.h:24
TPCnvToken_p1::token
const std::string & token() const
Returns token.
Definition
TPCnvTokenList_p1.h:38
TPCnvToken_p1::m_token
std::string m_token
token to the extending object
Definition
TPCnvTokenList_p1.h:42
TPCnvToken_p1::m_converterID
unsigned short m_converterID
ID of the top-level TP converter.
Definition
TPCnvTokenList_p1.h:41
TPCnvToken_p1::converterID
unsigned short converterID() const
Returns the topl level TP converter ID.
Definition
TPCnvTokenList_p1.h:35
TPCnvToken_p1::TPCnvToken_p1
TPCnvToken_p1(unsigned short cnvID=0, const std::string &token="")
Constructor.
Definition
TPCnvTokenList_p1.h:31
error
Definition
IImpactPoint3dEstimator.h:72
Generated on
for ATLAS Offline Software by
1.17.0