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

Constructor & Destructor Documentation

◆ PD() [1/2]

PD::PD ( )
inline

Definition at line 48 of file AthenaSummarySvc.cxx.

48 {};

◆ PD() [2/2]

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

Definition at line 49 of file AthenaSummarySvc.cxx.

49 { add(a,b); }

Member Function Documentation

◆ add() [1/4]

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

Definition at line 51 of file AthenaSummarySvc.cxx.

51  {
52  add(a,(string)b);
53  }

◆ add() [2/4]

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

Definition at line 57 of file AthenaSummarySvc.cxx.

57  {
58  m_dat[a].push_back( p.dump() );
59  }

◆ add() [3/4]

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

Definition at line 54 of file AthenaSummarySvc.cxx.

54  {
55  m_dat[a].push_back( b );
56  }

◆ add() [4/4]

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

Definition at line 61 of file AthenaSummarySvc.cxx.

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

◆ dump()

string PD::dump ( ) const
inline

Definition at line 76 of file AthenaSummarySvc.cxx.

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

◆ operator const string()

PD::operator const string ( ) const
inline

Definition at line 71 of file AthenaSummarySvc.cxx.

72  {
73  return dump();
74  }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

ostringstream m_ofs PD::ATLAS_THREAD_SAFE
staticprivate

Definition at line 105 of file AthenaSummarySvc.cxx.

◆ m_dat

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

Definition at line 104 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:76
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
PD::m_dat
map< string, vector< string > > m_dat
Definition: AthenaSummarySvc.cxx:104
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
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:51
II
const char *const II("\001")
length
double length(const pvec &v)
Definition: FPGATrackSimLLPDoubletHoughTransformTool.cxx:26