1#ifndef PFLIB_DETECTORCONFIGURATION_H
2#define PFLIB_DETECTORCONFIGURATION_H
10#include "pflib/Exception.h"
32 virtual void import(YAML::Node val) = 0;
47 template<
typename DerivedType>
49 library_[name] = &maker<DerivedType>;
53 auto lib_it{library_.find(full_name)};
54 if (lib_it == library_.end()) {
55 PFEXCEPTION_RAISE(
"BadFormat",
"Unrecognized setting "+full_name);
57 return lib_it->second();
60 void operator=(
Factory const&) =
delete;
62 template <
typename DerivedType>
64 return std::make_unique<DerivedType>();
87 void import(YAML::Node conf);
object for parsing a detector configuration file and (potentially) executing it
Definition: DetectorConfiguration.h:76
DetectorConfiguration(const std::string &config)
Parse the input file loading into us.
Definition: DetectorConfiguration.cxx:143
void apply()
apply the configuration to the detector, we need access to all the wishbones, so make sure no other i...
Definition: DetectorConfiguration.cxx:205
void stream(std::ostream &s) const
Print out the detector configuration for debugging purposes.
Definition: DetectorConfiguration.cxx:211
The object that can construct new polarfire settings given the name of the setting.
Definition: DetectorConfiguration.h:41
Object that can change a setting on a polarfire target.
Definition: DetectorConfiguration.h:27
virtual void execute(PolarfireTarget *pft)=0
apply the setting to the passed polarfire target
virtual void stream(std::ostream &s)=0
print the setting
Polarfire Interaction Library.
Definition: Backend.h:8
Definition: DetectorConfiguration.h:77
Interface to a single polarfire.
Definition: PolarfireTarget.h:33