ROOT
ROOT project
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
PrinterCSV< V > Class Template Reference

Class to write on .csv the result. More...

#include <writer_def.hpp>

Inheritance diagram for PrinterCSV< V >:
Inheritance graph
Collaboration diagram for PrinterCSV< V >:
Collaboration graph

Public Member Functions

 PrinterCSV (const std::string &fname, char sep, bool ow_mode)
 Constructor of the PrinterCSV class.
 
void write_values (const V &value) override
 Writes a given result into the .csv file with the sotred separator.
 
void write_values (const Eigen::Vector2d &value)
 
- Public Member Functions inherited from PrinterFile< V >
 PrinterFile (const std::string &fname, bool ow_mode)
 The constructor for PrinterFile class.
 
- Public Member Functions inherited from PrinterBase< V >
 PrinterBase ()=default
 Default constructor for the PrinterBase class.
 
virtual ~PrinterBase ()=default
 Virtual destructor for the PrinterBase class.
 

Private Attributes

char separator
 Separator for the .csv output file, given at construction time.
 

Additional Inherited Members

- Protected Attributes inherited from PrinterFile< V >
std::string filename
 The name of output file, without the extension.
 
bool append
 
std::ofstream file
 The actual file, saved in order not to access it at each printing iteration.
 

Detailed Description

template<typename V>
class PrinterCSV< V >

Class to write on .csv the result.

Constructor & Destructor Documentation

◆ PrinterCSV()

template<typename V >
PrinterCSV< V >::PrinterCSV ( const std::string &  fname,
char  sep,
bool  ow_mode 
)

Constructor of the PrinterCSV class.

Parameters
fnameThe file to write on
sepThe separator to use
ow_modeOption to overwrite or append the file

Member Function Documentation

◆ write_values() [1/2]

void PrinterCSV< Eigen::Vector2d >::write_values ( const Eigen::Vector2d &  value)

◆ write_values() [2/2]

template<typename V >
void PrinterCSV< V >::write_values ( const V &  value)
overridevirtual

Writes a given result into the .csv file with the sotred separator.

Parameters
valueThe value to write

Implements PrinterBase< V >.

Member Data Documentation

◆ separator

template<typename V >
char PrinterCSV< V >::separator
private

Separator for the .csv output file, given at construction time.


The documentation for this class was generated from the following files: