@@ -37,7 +37,7 @@ class Parameters
3737 Parameters (std::array<std::string, nPar> parNames, std::string name) : mName {name}, mPar {}, mParNames {parNames} {};
3838
3939 // / Default destructor
40- virtual ~Parameters () = default ; // Ensure proper cleanup in derived classes
40+ ~Parameters () = default ;
4141
4242 // / Setter for the parameter at position iparam
4343 // / \param iparam index in the array of the parameters
@@ -183,27 +183,10 @@ class ParameterCollection : public TNamed
183183 // / @param value parameter to add to the stored information
184184 // / @param pass key to look for in the stored information e.g. pass
185185 // / @return true if found and configured false if not fully configured
186- bool addParameter (const std::string& pass, const std::string& parName, float value)
187- {
188- const bool alreadyPresent = hasKey (pass);
189- if (alreadyPresent) {
190- LOG (debug) << " Changing parametrization corresponding to key " << pass << " from size " << mParameters [pass].size () << " to " << parName;
191- } else {
192- mParameters [pass] = std::unordered_map<std::string, paramvar_t >{};
193- LOG (debug) << " Adding new parametrization corresponding to key " << pass << " : " << parName;
194- }
195- mParameters [pass][parName] = value;
196- return true ;
197- }
186+ bool addParameter (const std::string& pass, const std::string& parName, float value);
198187
199188 // / @return the size of the container i.e. the number of stored keys (or passes)
200- int getSize (const std::string& pass) const
201- {
202- if (!hasKey (pass)) {
203- return -1 ;
204- }
205- return mParameters .at (pass).size ();
206- }
189+ int getSize (const std::string& pass) const ;
207190
208191 // / @brief Function to push the parameters from the sub container into the collection and store it under a given key
209192 // / @tparam ParType type of the parameter container
@@ -231,26 +214,10 @@ class ParameterCollection : public TNamed
231214
232215 // / @brief printing function for the content of the pass
233216 // / @param pass pass to print
234- void print (const std::string& pass) const
235- {
236- const auto & size = getSize (pass);
237- if (size < 0 ) {
238- LOG (info) << " empty pass: " << pass;
239- return ;
240- }
241- LOG (info) << " Pass \" " << pass << " \" with size " << size;
242- for (const auto & [par, value] : mParameters .at (pass)) {
243- LOG (info) << " par name = " << par << " , value = " << value;
244- }
245- }
217+ void print (const std::string& pass) const ;
246218
247219 // / @brief printing function for the full content of the container
248- void print () const
249- {
250- for (const auto & [pass, pars] : mParameters ) {
251- print (pass);
252- }
253- }
220+ void print () const ;
254221
255222 // / @brief Getter of the full map of parameters stored in the container
256223 // / @return returns the full map of parameters
0 commit comments