All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
helper_gadget.cxx
Go to the documentation of this file.
2 //table printers
3 std::vector<int> single_photon::Printer_header( std::vector< std::string> headings){
4 
5  std::vector<int> spacers;
6  for( size_t index = 0; index < headings.size(); index++){
7  std::cout<<headings[index];
8  spacers.push_back( headings[index].size());
9  }
10  std::cout<<std::endl;
11  return spacers;
12 }
13 
14 void single_photon::Printer_content( std::vector< std::string > nums, std::vector<int> spacers){
15 
16  if(nums.size() != spacers.size()) {
17  std::cout<<"CANNOT PRINT!"<<std::endl;
18  return;
19  }
20 
21  for( size_t index = 0; index < nums.size(); index++){
22  std::cout<<std::setw(spacers[index])<<nums[index];
23  }
24  std::cout<<std::endl;
25 }
std::size_t size(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:561
std::vector< int > Printer_header(std::vector< std::string > headings)
void Printer_content(std::vector< std::string > nums, std::vector< int > spacers)
BEGIN_PROLOG could also be cout