-
…servation definition XML files
-
…o GOptimizer base class. Further implemented GObservations::errors()
-
The coding and design conventions (CDC) document was also updated.
-
Delete statements have been added to the remove() method(s) so that the elements are properly deleted before the pointers are erased.
-
Initially, there was a unlogic relation between GModels and GOptimizerPars, where GModels derives from GOptimizerPars, but both classes contained different types of objects. GModels is a model container, while GOptimizerPars is a parameter container. Now, GModels derives directly from GContainer and no longer from GOptimizerPars. The GModels::pars() method has been added to extract a flat array of model parameter pointers into a GOptimizerPars object. GOptimizerPars, which was abstract before, is now a real container class that also derives from GContainer.
-
Add GChatter argument to print() method. The print() method now takes an argument of type GChatter to control the chattiness of the output in a homogenous manner. Pass NORMAL chatter level in __str__ method. Add chatter argument to print() methods. Use GLog::chatter() method to control the chattiness of the log stream operator. Add chatter() methods and provide member access through const references. Add chatter() methods, provide member access through const references, and declare one liners as inline methods. The chatter() methods control the new m_chatter attribute that is used to control the chattiness of the object's print() methods. name() and version() methods return const references. logFileOpen() method now sets the chattiness from the applications's chatter parameter, and name() and version() methods now return a const reference.
-
…ness of observation identifiers for a given instrument. The contains() method has been added that checks whether an observation for a given instrument and a given identifier exists. The operator [] does not check the index range anymore (the operators are now declared inline). For index check, the at() methods have been added. Methods that were implemented in the header file are now declared inline. The set(), append(), insert() and extend() methods now verify that the observation that should be added has an identifier that does not yet exist for the same instrument in the container. In other words, observation identifiers need to be unique for a given instrument.
-
The GObservations::copy_members() copied the m_fct which it should not have done, as the m_fct::m_this member shall always point to GObservations, hence it should never be copied! Copying led in fact to a segmentation fault. The copy instruction has been removed which corrected the bug.
-
A special treatment was added for insertion of elements in empty objects. This was not possible before because any index was outside the valid range for an empty object. The number of elements is now set before appending a container to a container, so that self-extension does not lead to an endless loop. Before, if a container was self-extended, the size parameter grew with the extension, leading to a situation where the loop never ended.
-
To prevent code slicing and to conform to the GammaLib standard, the operator[] of a pointer container should return pointers and not reference. The interface has thus been changed. To allow also setting of elements, the set() method has been added.
-
GObservations now derives from the GContainer interface class. Methods have been implemented to manipulate observations, which can now be inserted and removed as needed. Two interface changes have been made: the observation is now passed as const in the append() method, and the reference returned by the models() method is declared const. A instance of GObservations::optimizer has now been added as member m_fct to the class, so each GObservations class has a permanent optimizer function instantiated. This allows direct access of optimizer function information, which has been implemented by the function() method.
-
All classes now derive from GBase. ostream and GLog friends are removed since they are now implement at the GBase level.