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 43 of file AthenaSummarySvc.cxx.

Constructor & Destructor Documentation

◆ PD() [1/2]

PD::PD ( )
inline

Definition at line 45 of file AthenaSummarySvc.cxx.

45{};

◆ PD() [2/2]

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

Definition at line 46 of file AthenaSummarySvc.cxx.

46{ 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 48 of file AthenaSummarySvc.cxx.

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

◆ add() [2/4]

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

Definition at line 54 of file AthenaSummarySvc.cxx.

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

◆ add() [3/4]

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

Definition at line 51 of file AthenaSummarySvc.cxx.

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

◆ add() [4/4]

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

Definition at line 58 of file AthenaSummarySvc.cxx.

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

◆ dump()

string PD::dump ( ) const
inline

Definition at line 67 of file AthenaSummarySvc.cxx.

67 {
68 string x("{");
69 map<string,vector<string> >::const_iterator itr;
70 unsigned int iv;
71 for (itr=m_dat.begin(); itr != m_dat.end(); ++itr) {
72 if (x.length() > 1) { x+= ','; }
73 x += "\"" + itr->first + "\":";
74 vector<string> v = itr->second;
75 if (v.size() > 1) { x += '['; }
76 for (iv = 0; iv < v.size(); ++iv) {
77 if (iv > 0) { x += ','; }
78 if (v[iv][0] == '{') {
79 x += v[iv];
80 } else if (v[iv].compare(0,1, II)==0) {
81 x.append( v[iv], 1,v[iv].length());
82 } else {
83 x += "\"" + v[iv] + "\"";
84 }
85 }
86 if (v.size() > 1) { x += ']'; }
87 }
88 x += '}';
89 return x;
90 }
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 62 of file AthenaSummarySvc.cxx.

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

Member Data Documentation

◆ m_dat

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

Definition at line 95 of file AthenaSummarySvc.cxx.


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