Bug Fixes

Segment Parameter in Application get() Algorithms

The Application::get_parameter() and BaseApplication::get_info() algorithms need to know the segment containing the application object to calculate right path between application and partition object. This is important, when applications are shared between several segments having different process environment. In particular this is important for template applications, when they are used in big partitions, having multiple rdb servers, configured via process environment variables.

The API changes are shown below:

void daq::core::Application::get_parameters(const daq::core::Tag ** tag,
                                      const daq::core::Computer ** app_host,
                                      std::map<std::string, std::string>& environment,
                                      std::vector<std::string>& program_names,
                                      std::vector<std::string>& search_paths,
                                      std::vector<std::string>& paths_to_shared_libraries,
                                      ::Configuration& db,
                                      const daq::core::Partition& partition,
                                      const daq::core::Computer * host,
                                      const daq::core::Segment * parent,  //   <= NEW PARAMETER
                                      int verbose_level) const;

void daq::core::BaseApplication::get_info(const daq::core::Tag ** tag,
                                      std::map<std::string, std::string>& environment,
                                      std::vector<std::string>& program_names,
                                      std::vector<std::string>& search_paths,
                                      std::vector<std::string>& paths_to_shared_libraries,
                                      ::Configuration& db,
                                      const daq::core::Partition& partition,
                                      const daq::core::Computer& host,
                                      const daq::core::Segment * parent,
  //   <= NEW PARAMETER
                                      int verbose_level) const;
 

When the parent parameter is set to 0, everything should work as before. The parameter can be defined or not defined for normal applications (i.e. for those applications, which are not shared between segments). But it has to be set to right value for a template application.
Other Fixes

Performance Improvements of get_partition() algorithm

The algorithm daq::core::get_partition() remembers the partition names for which it was already called. If it is called more then once for a partition, it forces rlevel parameter to be set to 0 to avoid several pre-loadings of the objects referencing the partition object. Such pre-loading is done for performance improvements (see Release Notes of config and dal packages from tdaq-01-06-00 release). It can be quite time and resource consuming for big databases and cannot be properly handled by the config package.

To reset above counting call get_partition() algorithm with empty partition name. To debug set ERS debug level to 3 or higher.

By default, the daq::core::get_partition() algorithm reads only objects of the Tag, Component, BaseApplication, Computer, SW_Package, SW_Object, BinaryFile and Parameter classes and classes derived from them (objects of such classes are used by most DAL algorithms). To pre-load objects of another classes, the user should either to  provide non-empty rclasses parameter for the get_partition() algorithm, or to define them via environment variable DAL_GET_PARTITION_REF_CLASS_NAMES. To avoid any pre-loading it is enough to set the algorithm's rlevel parameter to 0.