1 #ifndef SiPixel_GeometryInterface_h
2 #define SiPixel_GeometryInterface_h
44 std::vector<std::pair<Column, Value>>
values;
48 || (a[0] == b[0] && a[1] == 0)
49 || (a[0] == b[1] && a[1] == 0)
50 || (b[0] == a[0] && b[1] == 0)
51 || (b[0] == a[1] && b[1] == 0);
61 values.push_back(make_pair(c, v));
63 void put(std::pair<Column, Value>
v) {
put(v.first, v.second); };
64 std::pair<Column, Value>
get(
Column c)
const {
111 assert(col[0] != 0 || !
"Extracting invalid column.");
118 <<
"Undefined column used: " <<
unintern(
id)
119 <<
". Check your spelling.\n";
123 return std::make_pair(
Column{{id, 0}},
val);
147 auto it =
ids.find(
id);
148 if (it ==
ids.end()) {
160 if (
e.second ==
id)
return e.first;
190 std::vector<std::function<Value(InterestingQuantities const& iq)>>
extractors;
std::map< ID, Value > max_value
void put(std::pair< Column, Value > v)
std::map< std::string, ID > ids
static const HistoName names[]
GeometryInterface(const edm::ParameterSet &conf)
void addExtractor(ID id, std::function< Value(InterestingQuantities const &iq)> func, Value min=UNDEFINED, Value max=UNDEFINED)
std::string pretty(Column col)
bool operator<(Values const &other) const
std::string unintern(ID id)
std::vector< std::pair< Column, Value > > values
U second(std::pair< T, U > const &p)
void loadFromTopology(edm::EventSetup const &iSetup, const edm::ParameterSet &iConfig)
Value operator[](Column c)
void load(edm::EventSetup const &iSetup)
void extractColumns(std::vector< Column > const &names, InterestingQuantities const &iq, Values &out)
helper::RootFunctionHelper< F, args >::root_function function(F &f)
const edm::ParameterSet iConfig
std::vector< InterestingQuantities > all_modules
static const Value UNDEFINED
std::array< ID, 2 > Column
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)
static bool columnMatch(Column const &a, Column const &b)
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 put(Column c, Value v)