LDMX Software
SimpleCSVTableProvider.h
1
7#ifndef CONDITIONS_SIMPLECSVTABLEPROVIDER_H_
8#define CONDITIONS_SIMPLECSVTABLEPROVIDER_H_
9
11
12namespace conditions {
13
61 public:
62 SimpleCSVTableProvider(const std::string& name, const std::string& tagname,
63 const framework::config::Parameters& parameters,
65
67
68 virtual std::pair<const framework::ConditionsObject*,
70 getCondition(const ldmx::EventHeader& context);
71
72 private:
73 enum { OBJ_unknown, OBJ_int, OBJ_double } objectType_;
74 std::vector<std::string> columns_;
75 std::string entriesURL_;
76 std::string conditions_baseURL_;
77
78 void entriesFromPython(std::vector<framework::config::Parameters>&);
79 void entriesFromCSV();
80
81 struct Entry {
83 std::string url_;
84 std::vector<int> ivalues_; // values for python-set common
85 // (channel-independent) parameters
86 std::vector<double> dvalues_; // values for python-set common
87 // (channel-independent) parameters
88 };
89
90 std::vector<Entry> entries_;
91
95 std::string expandEnv(const std::string& s) const;
96};
97
98} // namespace conditions
99#endif
Base class for provider of conditions information like pedestals, gains, electronics maps,...
std::string expandEnv(const std::string &s) const
Utility for expanding environment variables.
virtual std::pair< const framework::ConditionsObject *, framework::ConditionsIOV > getCondition(const ldmx::EventHeader &context)
Pure virtual getCondition function.
Class which defines the run/event/type range for which a given condition is valid,...
Base class for all providers of conditions objects.
const Process & process() const
Get the process handle.
Base class for all conditions objects, very simple.
Class which represents the process under execution.
Definition Process.h:36
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:27
Provides header information an event such as event number and timestamp.
Definition EventHeader.h:44