ATLAS Offline Software
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
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
 

Static Private Attributes

static ostringstream m_ofs ATLAS_THREAD_SAFE
 

Detailed Description

Definition at line 48 of file AthenaSummarySvc.cxx.

Constructor & Destructor Documentation

◆ PD() [1/2]

PD::PD ( )
inline

Definition at line 50 of file AthenaSummarySvc.cxx.

50 {};

◆ PD() [2/2]

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

Definition at line 51 of file AthenaSummarySvc.cxx.

51 { add(a,b); }

Member Function Documentation

◆ add() [1/4]

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

Definition at line 53 of file AthenaSummarySvc.cxx.

53  {
54  add(a,(string)b);
55  }

◆ add() [2/4]

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

Definition at line 59 of file AthenaSummarySvc.cxx.

59  {
60  m_dat[a].push_back( p.dump() );
61  }

◆ add() [3/4]

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

Definition at line 56 of file AthenaSummarySvc.cxx.

56  {
57  m_dat[a].push_back( b );
58  }

◆ add() [4/4]

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

Definition at line 63 of file AthenaSummarySvc.cxx.

63  {
64  ostringstream ofs;
65  m_ofs.clear();
66  m_ofs.str("");
67 
68  m_ofs << II << t;
69 
70  m_dat[a].push_back( m_ofs.str() );
71  }

◆ dump()

string PD::dump ( ) const
inline

Definition at line 78 of file AthenaSummarySvc.cxx.

78  {
79  string x("{");
80  map<string,vector<string> >::const_iterator itr;
81  unsigned int iv;
82  for (itr=m_dat.begin(); itr != m_dat.end(); ++itr) {
83  if (x.length() > 1) { x+= ','; }
84  x += "\"" + itr->first + "\":";
85  vector<string> v = itr->second;
86  if (v.size() > 1) { x += '['; }
87  for (iv = 0; iv < v.size(); ++iv) {
88  if (iv > 0) { x += ','; }
89  if (v[iv][0] == '{') {
90  x += v[iv];
91  } else if (v[iv].compare(0,1, II)==0) {
92  x.append( v[iv], 1,v[iv].length());
93  } else {
94  x += "\"" + v[iv] + "\"";
95  }
96  }
97  if (v.size() > 1) { x += ']'; }
98  }
99  x += '}';
100  return x;
101  }

◆ operator const string()

PD::operator const string ( ) const
inline

Definition at line 73 of file AthenaSummarySvc.cxx.

74  {
75  return dump();
76  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

ostringstream m_ofs PD::ATLAS_THREAD_SAFE
staticprivate

Definition at line 107 of file AthenaSummarySvc.cxx.

◆ m_dat

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

Definition at line 106 of file AthenaSummarySvc.cxx.


The documentation for this class was generated from the following file:
Amg::compare
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,...
Definition: EventPrimitivesHelpers.h:109
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
x
#define x
PD::dump
string dump() const
Definition: AthenaSummarySvc.cxx:78
PD::m_dat
map< string, vector< string > > m_dat
Definition: AthenaSummarySvc.cxx:106
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
python.PyAthena.v
v
Definition: PyAthena.py:157
a
TList * a
Definition: liststreamerinfos.cxx:10
PD::add
void add(const string &a, const char *b)
Definition: AthenaSummarySvc.cxx:53
II
const char *const II("\001")
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26