ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
LineFormatter Class Reference

#include <LineFormatter.h>

Collaboration diagram for LineFormatter:

Public Member Functions

 LineFormatter (std::size_t perline)
 
template<typename T >
std::string operator() (const std::vector< T > &v)
 

Private Attributes

std::size_t m_perline
 

Detailed Description

Definition at line 14 of file LineFormatter.h.

Constructor & Destructor Documentation

◆ LineFormatter()

LineFormatter::LineFormatter ( std::size_t  perline)
inline

Definition at line 16 of file LineFormatter.h.

16  :m_perline(perline){
17  }

Member Function Documentation

◆ operator()()

template<typename T >
std::string LineFormatter::operator() ( const std::vector< T > &  v)
inline

Definition at line 19 of file LineFormatter.h.

19  {
20  std::size_t count{0};
21  std::size_t linecount{0};
22  std::ostringstream oss{"", std::ios::ate};
23  oss << linecount << '|' << " ";
24  for (const auto& e : v){
25  if (count == m_perline){
26  count = 0;
27  linecount += m_perline;
28  oss << '\n'<<linecount<< '|' << " ";
29  }
30  oss << e << " ";
31  ++count;
32  }
33  // if(count != 0){oss << '\n';}
34  return oss.str();
35  }

Member Data Documentation

◆ m_perline

std::size_t LineFormatter::m_perline
private

Definition at line 38 of file LineFormatter.h.


The documentation for this class was generated from the following file:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
python.PyAthena.v
v
Definition: PyAthena.py:154
LineFormatter::m_perline
std::size_t m_perline
Definition: LineFormatter.h:38