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 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); }

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  }

◆ 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 
)
inline

Definition at line 58 of file AthenaSummarySvc.cxx.

58  {
59  ostringstream ofs;
60  m_ofs.clear();
61  m_ofs.str("");
62 
63  m_ofs << II << t;
64 
65  m_dat[a].push_back( m_ofs.str() );
66  }

◆ dump()

string PD::dump ( ) const
inline

Definition at line 73 of file AthenaSummarySvc.cxx.

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

◆ operator const string()

PD::operator const string ( ) const
inline

Definition at line 68 of file AthenaSummarySvc.cxx.

69  {
70  return dump();
71  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

ostringstream m_ofs PD::ATLAS_THREAD_SAFE
staticprivate

Definition at line 102 of file AthenaSummarySvc.cxx.

◆ m_dat

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

Definition at line 101 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
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
x
#define x
PD::dump
string dump() const
Definition: AthenaSummarySvc.cxx:73
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
PD::m_dat
map< string, vector< string > > m_dat
Definition: AthenaSummarySvc.cxx:101
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:76
python.PyAthena.v
v
Definition: PyAthena.py:154
a
TList * a
Definition: liststreamerinfos.cxx:10
PD::add
void add(const string &a, const char *b)
Definition: AthenaSummarySvc.cxx:48
II
const char *const II("\001")
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26