ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
AthenaPOOL
AthenaPoolUtilities
AthenaPoolUtilities
AthenaAttributeSpecification.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHENAPOOLUTILITIES_ATHENAATTRIBUTESPECIFICATION_H
6
#define ATHENAPOOLUTILITIES_ATHENAATTRIBUTESPECIFICATION_H
7
8
#include <string>
9
#include <iostream>
10
#include <sstream>
11
#include <typeinfo>
12
13
#include "
AthenaPoolUtilities/AthenaAttributeType.h
"
14
16
//
17
// Class which acts like coral::AttributeSpecification
18
// BUT allows annotation like pool::CollectionDescription
19
// BUT which is encased in name,value pair interface
20
// which is not accessible through the constructor
21
//
23
24
class
AthenaAttributeSpecification
25
{
26
public
:
27
//
28
AthenaAttributeSpecification
(
const
std::string& n,
29
const
std::string& t,
30
const
std::string& g =
"UNKNOWN"
,
31
const
std::string& u =
"UNKNOWN"
) :
32
m_name
(n),
m_type
(t, u, g)
33
{}
34
AthenaAttributeSpecification
(
const
std::string& n,
35
const
AthenaAttributeType
& t) :
36
m_name
(n),
m_type
(t)
37
{}
38
39
const
std::string&
name
()
const
{
return
m_name
;}
40
std::string
typeName
()
const
{
return
m_type
.typeName();}
41
std::string
unit
()
const
{
return
m_type
.unit();}
42
std::string
group
()
const
{
return
m_type
.group();}
43
const
AthenaAttributeType
&
attributeType
()
const
{
return
m_type
;}
44
46
bool
operator==
(
const
AthenaAttributeSpecification
& rhs )
const
;
47
49
bool
operator!=
(
const
AthenaAttributeSpecification
& rhs )
const
;
50
51
private
:
52
std::string
m_name
;
53
AthenaAttributeType
m_type
;
54
};
55
56
57
inline
bool
58
AthenaAttributeSpecification::operator==
(
const
AthenaAttributeSpecification
& rhs )
const
59
{
60
return
( this->
m_name
== rhs.
m_name
&&
61
this->m_type == rhs.
m_type
);
62
}
63
64
inline
bool
65
AthenaAttributeSpecification::operator!=
(
const
AthenaAttributeSpecification
& rhs )
const
66
{
67
return
( this->
m_name
!= rhs.
m_name
||
68
this->m_type != rhs.
m_type
);
69
}
70
71
#endif
AthenaAttributeType.h
AthenaAttributeSpecification
Definition
AthenaAttributeSpecification.h:25
AthenaAttributeSpecification::operator==
bool operator==(const AthenaAttributeSpecification &rhs) const
Equal operator.
Definition
AthenaAttributeSpecification.h:58
AthenaAttributeSpecification::group
std::string group() const
Definition
AthenaAttributeSpecification.h:42
AthenaAttributeSpecification::AthenaAttributeSpecification
AthenaAttributeSpecification(const std::string &n, const std::string &t, const std::string &g="UNKNOWN", const std::string &u="UNKNOWN")
Definition
AthenaAttributeSpecification.h:28
AthenaAttributeSpecification::operator!=
bool operator!=(const AthenaAttributeSpecification &rhs) const
Comparison operator.
Definition
AthenaAttributeSpecification.h:65
AthenaAttributeSpecification::unit
std::string unit() const
Definition
AthenaAttributeSpecification.h:41
AthenaAttributeSpecification::m_name
std::string m_name
Definition
AthenaAttributeSpecification.h:52
AthenaAttributeSpecification::m_type
AthenaAttributeType m_type
Definition
AthenaAttributeSpecification.h:53
AthenaAttributeSpecification::typeName
std::string typeName() const
Definition
AthenaAttributeSpecification.h:40
AthenaAttributeSpecification::name
const std::string & name() const
Definition
AthenaAttributeSpecification.h:39
AthenaAttributeSpecification::AthenaAttributeSpecification
AthenaAttributeSpecification(const std::string &n, const AthenaAttributeType &t)
Definition
AthenaAttributeSpecification.h:34
AthenaAttributeSpecification::attributeType
const AthenaAttributeType & attributeType() const
Definition
AthenaAttributeSpecification.h:43
AthenaAttributeType
Definition
AthenaAttributeType.h:31
Generated on
for ATLAS Offline Software by
1.17.0