1 #ifndef SiPixel_GeometryInterface_h 2 #define SiPixel_GeometryInterface_h 36 typedef std::vector<std::pair<Column, Value>>
Values;
57 for (Column
const&
col : names) {
66 assert(col != 0 || !
"Extracting invalid column.");
68 assert(
ID(
extractors.size()) >
id || !
"extractors vector too small!");
72 <<
"Undefined column used: " <<
unintern(
id)
73 <<
". Check your spelling.\n";
76 if (
val != UNDEFINED) {
77 return std::make_pair(Column{
id},
val);
80 return std::make_pair(col, UNDEFINED);
101 auto it =
ids.find(
id);
102 if (it ==
ids.end()) {
114 if (
e.second ==
id)
return e.first;
142 std::vector<std::function<Value(InterestingQuantities const& iq)>>
extractors;
155 Value
min = UNDEFINED, Value
max = UNDEFINED, Value binwidth = 1) {
158 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
static const HistoName names[]
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)
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)