LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
fhicl::PrinterFor< T > Class Template Reference

#include "Printer.h"

Inheritance diagram for fhicl::PrinterFor< T >:
fhicl::Printer

Public Member Functions

void print_as_atom (fhicl::ParameterSet const &pset, std::string const &key) const
 
void print_as_sequence (fhicl::ParameterSet const &pset, std::string const &key) const
 

Private Member Functions

void do_atomic_print (fhicl::ParameterSet const &pset, std::string const &key) const
 
void do_sequence_print (fhicl::ParameterSet const &pset, std::string const &key) const
 

Detailed Description

template<typename T>
class fhicl::PrinterFor< T >

Definition at line 39 of file Printer.h.

Member Function Documentation

template<typename T >
void fhicl::PrinterFor< T >::do_atomic_print ( fhicl::ParameterSet const &  pset,
std::string const &  key 
) const
inlineprivatevirtual

Implements fhicl::Printer.

Definition at line 41 of file Printer.h.

References fhicl::ParameterSet::get().

43  {
44  std::cout << pset.get<T>(key) << '\n';
45  }
template<typename T >
void fhicl::PrinterFor< T >::do_sequence_print ( fhicl::ParameterSet const &  pset,
std::string const &  key 
) const
inlineprivatevirtual

Implements fhicl::Printer.

Definition at line 48 of file Printer.h.

References fhicl::ParameterSet::get().

50  {
51  auto const entries = pset.get<std::vector<T>>(key);
52  for (auto const& entry : entries) {
53  std::cout << entry << '\n';
54  }
55  }
void fhicl::Printer::print_as_atom ( fhicl::ParameterSet const &  pset,
std::string const &  key 
) const
inlineinherited

Definition at line 20 of file Printer.h.

References fhicl::Printer::do_atomic_print().

21  {
22  do_atomic_print(pset, key);
23  }
virtual void do_atomic_print(fhicl::ParameterSet const &pset, std::string const &key) const =0
void fhicl::Printer::print_as_sequence ( fhicl::ParameterSet const &  pset,
std::string const &  key 
) const
inlineinherited

Definition at line 25 of file Printer.h.

References fhicl::Printer::do_atomic_print(), and fhicl::Printer::do_sequence_print().

27  {
28  do_sequence_print(pset, key);
29  }
virtual void do_sequence_print(fhicl::ParameterSet const &pset, std::string const &key) const =0

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