Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-29 07:06:07

0001 //
0002 // Created by xmei on 9/8/22.
0003 //
0004 
0005 #pragma once
0006 
0007 #include <iostream>
0008 #include <iomanip>
0009 #include <JANA/Utils/JTablePrinter.h>
0010 
0011 void printFactoryTable(JComponentSummary const& cs) {
0012     JTablePrinter factory_table;
0013     factory_table.AddColumn("Plugin");
0014     factory_table.AddColumn("Object name");
0015     factory_table.AddColumn("Tag");
0016     for (const auto& factory : cs.factories) {
0017         factory_table | factory.plugin_name | factory.object_name | factory.factory_tag;
0018     }
0019 
0020     std::ostringstream ss;
0021     factory_table.Render(ss);
0022     std::cout << ss.str() << std::endl;
0023 }
0024 
0025 void printPluginNames(std::vector<std::string> const& plugin_names) {
0026     JTablePrinter plugin_table;
0027     plugin_table.AddColumn("Plugin name");
0028     for (const auto& plugin_name : plugin_names) {
0029         plugin_table | plugin_name;
0030     }
0031 
0032     std::ostringstream ss;
0033     plugin_table.Render(ss);
0034     std::cout << ss.str() << std::endl;
0035 }
0036 
0037 void printJANAHeaderIMG() {
0038     std::cout << "     ____      _     ___      ___       _               \n"
0039                  "     `MM'     dM.    `MM\\     `M'      dM.              \n"
0040                  "      MM     ,MMb     MMM\\     M      ,MMb              \n"
0041                  "      MM     d'YM.    M\\MM\\    M      d'YM.      ____   \n"
0042                  "      MM    ,P `Mb    M \\MM\\   M     ,P `Mb     6MMMMb  \n"
0043                  "      MM    d'  YM.   M  \\MM\\  M     d'  YM.   MM'  `Mb \n"
0044                  "      MM   ,P   `Mb   M   \\MM\\ M    ,P   `Mb        ,MM \n"
0045                  "      MM   d'    YM.  M    \\MM\\M    d'    YM.      ,MM' \n"
0046                  "(8)   MM  ,MMMMMMMMb  M     \\MMM   ,MMMMMMMMb    ,M'    \n"
0047                  "((   ,M9  d'      YM. M      \\MM   d'      YM. ,M'      \n"
0048                  " YMMMM9 _dM_     _dMM_M_      \\M _dM_     _dMM_MMMMMMMM " << std::endl << std::endl;
0049 }