27 #include <boost/property_tree/json_parser.hpp> 28 #include <boost/property_tree/ptree.hpp> 30 namespace pt = boost::property_tree;
56 : filename_(iConfig.getParameter<
edm::FileInPath>(
"calibrationFile").
fullPath()) {
58 findingRecord<PPSTimingCalibrationLUTRcd>();
79 pt::ptree mother_node;
86 key.sector = node.second.get<
int>(
"sector");
87 key.station = node.second.get<
int>(
"station");
88 key.plane = node.second.get<
int>(
"plane");
89 key.channel = node.second.get<
int>(
"channel");
90 std::vector<double>
values;
92 values.emplace_back(std::stod(
sample.second.data(),
nullptr));
96 return std::make_unique<PPSTimingCalibrationLUT>(binMap);
103 descriptions.
add(
"ppsTimingCalibrationLUTESSource",
desc);
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
ESProducts< std::remove_reference_t< TArgs >... > products(TArgs &&... args)
edm::ESProducts< std::unique_ptr< PPSTimingCalibrationLUT > > produce(const PPSTimingCalibrationLUTRcd &)
static const IOVSyncValue & endOfTime()
const std::string filename_
std::pair< Time_t, Time_t > ValidityInterval
Container::value_type value_type
static const IOVSyncValue & beginOfTime()
key
prepare the HTCondor submission files and eventually submit them
std::map< Key, std::vector< double > > BinMap
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Helper structure for indexing calibration data.
PPSTimingCalibrationLUTESSource(const edm::ParameterSet &)
static void fillDescriptions(edm::ConfigurationDescriptions &)
std::unique_ptr< PPSTimingCalibrationLUT > parsePPSDiamondLUTJsonFile() const
Extract calibration data from JSON file (PPS horizontal diamond)