1 #ifndef SiPixel_GeometryInterface_h 2 #define SiPixel_GeometryInterface_h 36 typedef std::vector<std::pair<Column, Value>>
Values;
56 for (Column
const&
col : names) {
65 assert(col != 0 || !
"Extracting invalid column.");
67 assert(
ID(
extractors.size()) >
id || !
"extractors vector too small!");
70 edm::LogError(
"GeometryInterface") <<
"Undefined column used: " <<
unintern(
id) <<
". Check your spelling.\n";
73 if (
val != UNDEFINED) {
74 return std::make_pair(Column{
id},
val);
77 return std::make_pair(col, UNDEFINED);
95 auto it =
ids.find(
id);
96 if (it ==
ids.end()) {
130 std::vector<std::function<Value(InterestingQuantities const& iq)>>
extractors;
143 Value
min = UNDEFINED,
144 Value
max = UNDEFINED,
145 Value binwidth = 1) {
148 bin_width[
id] = binwidth;
std::map< ID, Value > max_value
std::map< std::pair< Column, Value >, std::string > format_value
std::map< std::string, ID > ids
GeometryInterface(const edm::ParameterSet &conf)
std::string pretty(Column col)
void addExtractor(ID id, std::function< Value(InterestingQuantities const &iq)> func, Value min=UNDEFINED, Value max=UNDEFINED, Value binwidth=1)
std::string formatValue(Column, Value)
const std::string names[nVars_]
std::string unintern(ID id)
void loadFromTopology(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
void load(edm::EventSetup const &iSetup)
void extractColumns(std::vector< Column > const &names, InterestingQuantities const &iq, Values &out)
const edm::ParameterSet iConfig
std::vector< InterestingQuantities > all_modules
std::map< ID, Value > bin_width
static const Value UNDEFINED
std::vector< std::pair< Column, Value > > Values
Value extract(ID id, DetId did, edm::Event *ev=0, int16_t col=0, int16_t row=0)
void loadFEDCabling(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
std::pair< Column, Value > extract(Column const &col, InterestingQuantities const &iq)
void loadModuleLevel(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
std::vector< std::function< Value(InterestingQuantities const &iq)> > extractors
std::vector< InterestingQuantities > const & allModules()
const edm::Event * sourceEvent
std::map< ID, Value > min_value
ID intern(std::string const &id)
void loadTimebased(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
void loadFromSiPixelCoordinates(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)