ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
JiveXML::DataType Class Reference

Templated class to convert any object that is streamable in a ostringstream in a string. More...

#include <DataType.h>

Collaboration diagram for JiveXML::DataType:

Public Member Functions

template<class T >
 DataType (T t)
 Templated constructor – this is resolved at compile time so the constructor must be implemented in the header. More...
 
 DataType ()
 Empty constructor. More...
 
std::string toString () const
 Return the string. More...
 

Private Attributes

std::string m_thing
 

Detailed Description

Templated class to convert any object that is streamable in a ostringstream in a string.

Author
Peter Sherwood
Sebastian Boeser

Definition at line 21 of file DataType.h.

Constructor & Destructor Documentation

◆ DataType() [1/2]

template<class T >
JiveXML::DataType::DataType ( t)
inline

Templated constructor – this is resolved at compile time so the constructor must be implemented in the header.

Generate a stringstream object

Generically stream the type object into it

Only retain the string object

Convert some exception values

Definition at line 32 of file DataType.h.

32  {
34  std::ostringstream ost;
36  ost << t;
38  m_thing = ost.str() ;
40  if ((m_thing=="inf")||
41  (m_thing=="nan")){
42  m_thing = "0";
43  }
44  }

◆ DataType() [2/2]

JiveXML::DataType::DataType ( )

Empty constructor.

Empty/Default constructor.

Definition at line 12 of file DataType.cxx.

12  {
13  }

Member Function Documentation

◆ toString()

std::string JiveXML::DataType::toString ( ) const

Return the string.

Definition at line 18 of file DataType.cxx.

18  {
19  return m_thing;
20  }

Member Data Documentation

◆ m_thing

std::string JiveXML::DataType::m_thing
private

Definition at line 24 of file DataType.h.


The documentation for this class was generated from the following files:
python.trigbs_prescaleL1.ost
ost
Definition: trigbs_prescaleL1.py:104
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
JiveXML::DataType::m_thing
std::string m_thing
Definition: DataType.h:24