diff --git a/include/podio/GenericParameters.h b/include/podio/GenericParameters.h index d3f2f394f..55119a2e8 100644 --- a/include/podio/GenericParameters.h +++ b/include/podio/GenericParameters.h @@ -112,7 +112,7 @@ class GenericParameters { _stringMap.clear(); } - void print(std::ostream& os = std::cout, bool flush = true); + void print(std::ostream& os = std::cout, bool flush = true) const; /// Check if no parameter is stored (i.e. if all internal maps are empty) bool empty() const { diff --git a/src/GenericParameters.cc b/src/GenericParameters.cc index 5fba1bc6a..f787cc931 100644 --- a/src/GenericParameters.cc +++ b/src/GenericParameters.cc @@ -58,7 +58,7 @@ void printMap(const MapType& map, std::ostream& os) { os.flags(osflags); } -void GenericParameters::print(std::ostream& os, bool flush) { +void GenericParameters::print(std::ostream& os, bool flush) const { os << "int parameters\n\n"; printMap(getMap(), os); os << "\nfloat parameters\n";