File indexing completed on 2024-09-11 04:32:38
0001 #ifndef SiPixel_SummationSpecification
0002 #define SiPixel_SummationSpecification
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include <vector>
0016 #include <string>
0017
0018 #include "DQM/SiPixelPhase1Common/interface/GeometryInterface.h"
0019
0020 struct SummationStep {
0021
0022
0023
0024
0025 enum Type {
0026 NO_TYPE = 0,
0027 GROUPBY = 1,
0028 EXTEND_X = 2,
0029 EXTEND_Y = 3,
0030 COUNT = 4,
0031 REDUCE = 5,
0032 SAVE = 6,
0033 USE_X = 8,
0034 USE_Y = 9,
0035 USE_Z = 10,
0036 PROFILE = 11
0037 };
0038 Type type = NO_TYPE;
0039
0040
0041
0042
0043 enum Stage { NO_STAGE, FIRST, STAGE1, STAGE2 };
0044 Stage stage = NO_STAGE;
0045
0046 int nbins{-1};
0047 int xmin{0};
0048 int xmax{0};
0049
0050 std::vector<GeometryInterface::Column> columns;
0051
0052
0053 std::string arg;
0054 };
0055
0056 struct SummationSpecification {
0057 std::vector<SummationStep> steps;
0058 SummationSpecification() {}
0059 SummationSpecification(edm::ParameterSet const&, GeometryInterface&);
0060
0061 template <class stream, class GI>
0062 void dump(stream& out, GI& gi) {
0063 for (auto& s : steps) {
0064 out << "Step: type " << s.type << " stage " << s.stage << " col ";
0065 for (auto c : s.columns)
0066 out << gi.pretty(c) << " ";
0067 out << " arg " << s.arg << "\n";
0068 }
0069 }
0070
0071 private:
0072 GeometryInterface::Column parse_columns(std::string name, GeometryInterface&);
0073 };
0074
0075 #endif