Instead of storing parameters as std::vector it is often safer to enforce fixed lengths with std::array, but JParameterManager does not support this, e.g.
[ 48%] Building CXX object src/detectors/BEMC/CMakeFiles/BEMC_plugin.dir/BEMC.cc.o
In file included from /opt/software/linux-debian12-x86_64_v2/gcc-12.2.0/jana2-2.1.0-nkgakrg5xi5wdmmfuoimbqa2jxhvwkws/include/JANA/JApplication.h:25,
from /opt/software/linux-debian12-x86_64_v2/gcc-12.2.0/jana2-2.1.0-nkgakrg5xi5wdmmfuoimbqa2jxhvwkws/include/JANA/JFactoryT.h:11,
from /opt/software/linux-debian12-x86_64_v2/gcc-12.2.0/jana2-2.1.0-nkgakrg5xi5wdmmfuoimbqa2jxhvwkws/include/JANA/JFactorySet.h:12,
from /home/wdconinc/git/EICrecon/src/extensions/jana/JChainFactoryGeneratorT.h:10,
from /home/wdconinc/git/EICrecon/src/detectors/BEMC/BEMC.cc:6:
/opt/software/linux-debian12-x86_64_v2/gcc-12.2.0/jana2-2.1.0-nkgakrg5xi5wdmmfuoimbqa2jxhvwkws/include/JANA/Services/JParameterManager.h: In instantiation of ‘static std::string JParameterManager::Stringify(const T&) [with T = std::array<double, 3>; std::string = std::__cxx11::basic_string<char>]’:
/opt/software/linux-debian12-x86_64_v2/gcc-12.2.0/jana2-2.1.0-nkgakrg5xi5wdmmfuoimbqa2jxhvwkws/include/JANA/Services/JParameterManager.h:232:40: required from ‘JParameter* JParameterManager::SetDefaultParameter(std::string, T&, std::string) [with T = std::array<double, 3>; std::string = std::__cxx11::basic_string<char>]’
/opt/software/linux-debian12-x86_64_v2/gcc-12.2.0/jana2-2.1.0-nkgakrg5xi5wdmmfuoimbqa2jxhvwkws/include/JANA/JApplication.h:176:41: required from ‘JParameter* JApplication::SetDefaultParameter(std::string, T&, std::string) [with T = std::array<double, 3>; std::string = std::__cxx11::basic_string<char>]’
/home/wdconinc/git/EICrecon/src/factories/calorimetry/CalorimeterHitDigi_factoryT.h:54:33: required from ‘void eicrecon::CalorimeterHitDigi_factoryT<T>::Init() [with T = {}]’
/home/wdconinc/git/EICrecon/src/factories/calorimetry/CalorimeterHitDigi_factoryT.h:36:10: required from here
/opt/software/linux-debian12-x86_64_v2/gcc-12.2.0/jana2-2.1.0-nkgakrg5xi5wdmmfuoimbqa2jxhvwkws/include/JANA/Services/JParameterManager.h:377:8: error: no match for ‘operator<<’ (operand types are ‘std::stringstream’ {aka ‘std::__cxx11::basic_stringstream<char>’} and ‘const std::array<double, 3>’)
377 | ss << value;
| ~~~^~~~~~~~
Instead of storing parameters as
std::vector
it is often safer to enforce fixed lengths withstd::array
, but JParameterManager does not support this, e.g.