@@ -55,8 +55,27 @@ class IrtCherenkovParticleIDConfig {
55
55
// boolean: true if any cheat mode is enabled
56
56
bool CheatModeEnabled () const { return cheatPhotonVertex || cheatTrueRadiator; }
57
57
58
- // print all parameters
59
- template <algorithms::LogLevel lvl = algorithms::LogLevel::kDebug >
60
- void Print (const eicrecon::IrtCherenkovParticleID* logger);
58
+ // stream all parameters
59
+ friend std::ostream& operator <<(std::ostream& os, const IrtCherenkovParticleIDConfig& cfg) {
60
+ os << fmt::format (" {:=^60}" , " IrtCherenkovParticleIDConfig Settings " ) << std::endl;
61
+ auto print_param = [&os](auto name, auto val) {
62
+ os << fmt::format (" {:>20} = {:<}" , name, val) << std::endl;
63
+ };
64
+ print_param (" numRIndexBins" , cfg.numRIndexBins );
65
+ // PrintCheats<lvl>(logger, true);
66
+ os << " pdgList:" << std::endl;
67
+ for (const auto & pdg : cfg.pdgList )
68
+ os << fmt::format (" {}" , pdg) << std::endl;
69
+ for (const auto & [name, rad] : cfg.radiators ) {
70
+ os << fmt::format (" {:-<60}" , fmt::format (" --- {} config " , name)) << std::endl;
71
+ print_param (" smearingMode" , rad.smearingMode );
72
+ print_param (" smearing" , rad.smearing );
73
+ print_param (" referenceRIndex" , rad.referenceRIndex );
74
+ print_param (" attenuation" , rad.attenuation );
75
+ }
76
+ os << fmt::format (" {:=^60}" , " " ) << std::endl;
77
+ return os;
78
+ };
61
79
};
80
+
62
81
} // namespace eicrecon
0 commit comments