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

#include <DataDumperHelpers.h>

Collaboration diagram for FPTracker::LineFormater:

Public Member Functions

 LineFormater (int numPerLine)
 
template<class T >
void operator() (T t)
 
std::string toString () const
 

Private Attributes

int m_numPerLine
 
int m_maxPerLine
 
std::ostringstream m_ost
 

Detailed Description

Definition at line 12 of file DataDumperHelpers.h.

Constructor & Destructor Documentation

◆ LineFormater()

FPTracker::LineFormater::LineFormater ( int  numPerLine)
inline

Definition at line 14 of file DataDumperHelpers.h.

14 : m_numPerLine(0), m_maxPerLine(numPerLine) {}

Member Function Documentation

◆ operator()()

template<class T >
void FPTracker::LineFormater::operator() ( t)
inline

Definition at line 16 of file DataDumperHelpers.h.

16  {
17  if (m_numPerLine == m_maxPerLine){
18  m_numPerLine = 0;
19  m_ost<<'\n';
20  }
21  m_ost<<t<<" ";
22  ++m_numPerLine;
23  }

◆ toString()

std::string FPTracker::LineFormater::toString ( ) const
inline

Definition at line 24 of file DataDumperHelpers.h.

24 {return m_ost.str();}

Member Data Documentation

◆ m_maxPerLine

int FPTracker::LineFormater::m_maxPerLine
private

Definition at line 27 of file DataDumperHelpers.h.

◆ m_numPerLine

int FPTracker::LineFormater::m_numPerLine
private

Definition at line 26 of file DataDumperHelpers.h.

◆ m_ost

std::ostringstream FPTracker::LineFormater::m_ost
private

Definition at line 28 of file DataDumperHelpers.h.


The documentation for this class was generated from the following file:
FPTracker::LineFormater::m_numPerLine
int m_numPerLine
Definition: DataDumperHelpers.h:26
FPTracker::LineFormater::m_maxPerLine
int m_maxPerLine
Definition: DataDumperHelpers.h:27
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
FPTracker::LineFormater::m_ost
std::ostringstream m_ost
Definition: DataDumperHelpers.h:28