2#include <FairDetParIo.h>
9#include <range/v3/algorithm/fill.hpp>
16 ParSet::ParSet(std::string_view name, std::string_view title, std::string_view context,
bool own)
17 : FairParSet(name.data(), title.data(), context.data(), own)
20 ranges::fill(span(versions), -1);
25 R3BLOG(debug, fmt::format(
"Try to init parameter {}", GetName()));
26 if (
auto* detParIo = inputFile->getDetParIo(
"FairGenericParIo"); detParIo !=
nullptr)
28 R3BLOG(debug, fmt::format(
"Found DetParIo {}. Try to init with this.", detParIo->GetName()));
29 auto res = detParIo->init(
this);
32 R3BLOG(error, fmt::format(
"Parameter {} init failed.", detParIo->GetName()));
37 R3BLOG(error, fmt::format(
"Failed to init parameter {} because no FairDetParIo object is found!", GetName()));
44 if (
auto* detParIo = outputFile->getDetParIo(
"FairGenericParIo"); detParIo !=
nullptr)
46 R3BLOG(info, fmt::format(
"writing parameter {} to root file.", GetName()));
47 return detParIo->write(
this);
50 fmt::format(
"Failed to write parameter {} because no FairDetParIo object is found!", GetName()));
#define R3BLOG(severity, x)
ClassImp(R3B::Neuland::Cal2HitPar)
auto write(FairParIo *outputFile) -> int override
auto init(FairParIo *inputFile) -> bool override
ParSet(std::string_view name="parSet", std::string_view title="Neuland parameter", std::string_view context="TestDefaultContext", bool own=true)
Simulation of NeuLAND Bar/Paddle.