ATLAS Offline Software
Loading...
Searching...
No Matches
PD Class Reference
Collaboration diagram for PD:

Public Member Functions

 PD ()
 PD (const string &a, const string &b)
void add (const string &a, const char *b)
void add (const string &a, const string &b)
void add (const string &a, const PD &p)
template<typename T>
void add (const string &a, const T t)
 operator const string () const
string dump () const

Private Attributes

map< string, vector< string > > m_dat

Detailed Description

Definition at line 44 of file AthenaSummarySvc.cxx.

Constructor & Destructor Documentation

◆ PD() [1/2]

PD::PD ( )
inline

Definition at line 46 of file AthenaSummarySvc.cxx.

46{};

◆ PD() [2/2]

PD::PD ( const string & a,
const string & b )
inline

Definition at line 47 of file AthenaSummarySvc.cxx.

47{ add(a,b); }
static Double_t a
void add(const string &a, const char *b)

Member Function Documentation

◆ add() [1/4]

void PD::add ( const string & a,
const char * b )
inline

Definition at line 49 of file AthenaSummarySvc.cxx.

49 {
50 add(a,(string)b);
51 }

◆ add() [2/4]

void PD::add ( const string & a,
const PD & p )
inline

Definition at line 55 of file AthenaSummarySvc.cxx.

55 {
56 m_dat[a].push_back( p.dump() );
57 }
map< string, vector< string > > m_dat

◆ add() [3/4]

void PD::add ( const string & a,
const string & b )
inline

Definition at line 52 of file AthenaSummarySvc.cxx.

52 {
53 m_dat[a].push_back( b );
54 }

◆ add() [4/4]

template<typename T>
void PD::add ( const string & a,
const T t )
inline

Definition at line 59 of file AthenaSummarySvc.cxx.

59 {
60 m_dat[a].push_back(std::format("\001{}", t));
61 }

◆ dump()

string PD::dump ( ) const
inline

Definition at line 68 of file AthenaSummarySvc.cxx.

68 {
69 string x("{");
70 map<string,vector<string> >::const_iterator itr;
71 unsigned int iv;
72 for (itr=m_dat.begin(); itr != m_dat.end(); ++itr) {
73 if (x.length() > 1) { x+= ','; }
74 x += "\"" + itr->first + "\":";
75 vector<string> v = itr->second;
76 if (v.size() > 1) { x += '['; }
77 for (iv = 0; iv < v.size(); ++iv) {
78 if (iv > 0) { x += ','; }
79 if (v[iv][0] == '{') {
80 x += v[iv];
81 } else if (v[iv].compare(0,1, II)==0) {
82 x.append( v[iv], 1,v[iv].length());
83 } else {
84 x += "\"" + v[iv] + "\"";
85 }
86 }
87 if (v.size() > 1) { x += ']'; }
88 }
89 x += '}';
90 return x;
91 }
const char *const II("\001")
double length(const pvec &v)
#define x
std::pair< int, int > compare(const AmgSymMatrix(N) &m1, const AmgSymMatrix(N) &m2, double precision=1e-9, bool relative=false)
compare two matrices, returns the indices of the first element that fails the condition,...

◆ operator const string()

PD::operator const string ( ) const
inline

Definition at line 63 of file AthenaSummarySvc.cxx.

64 {
65 return dump();
66 }
string dump() const

Member Data Documentation

◆ m_dat

map<string, vector<string> > PD::m_dat
private

Definition at line 96 of file AthenaSummarySvc.cxx.


The documentation for this class was generated from the following file: