test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
DQM
SiPixelPhase1Common
interface
SummationSpecification.h
Go to the documentation of this file.
1
#ifndef SiPixel_SummationSpecification
2
#define SiPixel_SummationSpecification
3
// -*- C++ -*-
4
//
5
// Package: SiPixelPhase1Common
6
// Class: SummationSpecification
7
//
8
// This class represents a sequence of steps that produce histograms by summing
9
// up other histograms. This can be considered a domain-specific language for
10
// DQM. This class has no intelligence, it just manages the "program". It is
11
// not encapsulated, the structure is exposed.
12
//
13
// Original Author: Marcel Schneider
14
15
#include <vector>
16
#include <string>
17
18
#include "
DQM/SiPixelPhase1Common/interface/GeometryInterface.h
"
19
20
struct
SummationStep
{
21
// For step1, all the necessary information should be in the type and columns
22
// to allow fill() to exectute it very quickly.
23
// For step2 stuff (after the first SAVE), we can also keep strings, since
24
// step2 will only be executed once by an executor.
25
enum
Type
{
NO_TYPE
= 0,
26
GROUPBY
= 1,
27
EXTEND_X
= 2,
28
EXTEND_Y
= 3,
29
COUNT
= 4,
30
REDUCE
= 5,
31
SAVE
= 6,
32
CUSTOM
= 7,
33
USE_X
= 8,
34
USE_Y
= 9,
35
USE_Z
= 10,
36
PROFILE
= 11
37
};
38
Type
type
=
NO_TYPE
;
39
// STAGE1 is DQM step1, STAGE2 step2. STAGE1_2 is somewhere in between, it runs
40
// in the analyze()-method (step1) but does a sort of harvesting (per-event).
41
// STAGE1_2 is for ndigis-like counters.
42
// FIRST is the first group-by, which is special.
43
enum
Stage
{
NO_STAGE
,
FIRST
,
STAGE1
,
STAGE2
};
44
Stage
stage
=
NO_STAGE
;
45
46
std::vector<GeometryInterface::Column>
columns
;
47
48
// more parameters. Not very elegant but good enough for step2.
49
std::string
arg
;
50
};
51
52
struct
SummationSpecification
{
53
std::vector<SummationStep>
steps
;
54
SummationSpecification
() {};
55
SummationSpecification
(
edm::ParameterSet
const
&,
GeometryInterface
&);
56
57
template
<
class
stream,
class
GI>
58
void
dump
(stream&
out
, GI& gi) {
59
for
(
auto
&
s
:
steps
) {
60
out <<
"Step: type "
<<
s
.type <<
" stage "
<<
s
.stage <<
" col "
;
61
for
(
auto
c
:
s
.columns) out << gi.pretty(
c
) <<
" "
;
62
out <<
" arg "
<<
s
.arg <<
"\n"
;
63
}
64
}
65
private
:
66
GeometryInterface::Column
parse_columns
(
std::string
name
,
GeometryInterface
&);
67
};
68
69
#endif
type
type
Definition:
HCALResponse.h:21
SummationSpecification::SummationSpecification
SummationSpecification()
Definition:
SummationSpecification.h:54
SummationStep::arg
std::string arg
Definition:
SummationSpecification.h:49
SummationStep::stage
Stage stage
Definition:
SummationSpecification.h:44
SummationStep::STAGE2
Definition:
SummationSpecification.h:43
SummationSpecification::dump
void dump(stream &out, GI &gi)
Definition:
SummationSpecification.h:58
SummationStep::columns
std::vector< GeometryInterface::Column > columns
Definition:
SummationSpecification.h:46
SummationSpecification
Definition:
SummationSpecification.h:52
SummationStep::USE_X
Definition:
SummationSpecification.h:33
SummationStep::STAGE1
Definition:
SummationSpecification.h:43
EnergyCorrector.c
tuple c
Definition:
EnergyCorrector.py:43
mergeVDriftHistosByStation.name
string name
Definition:
mergeVDriftHistosByStation.py:77
SummationSpecification::steps
std::vector< SummationStep > steps
Definition:
SummationSpecification.h:53
SummationStep::NO_STAGE
Definition:
SummationSpecification.h:43
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
SummationSpecification::parse_columns
GeometryInterface::Column parse_columns(std::string name, GeometryInterface &)
Definition:
SummationSpecification.cc:19
GeometryInterface
Definition:
GeometryInterface.h:27
GeometryInterface.h
SummationStep::Type
Type
Definition:
SummationSpecification.h:25
SummationStep::REDUCE
Definition:
SummationSpecification.h:30
SummationStep::EXTEND_X
Definition:
SummationSpecification.h:27
GeometryInterface::Column
std::array< ID, 2 > Column
Definition:
GeometryInterface.h:37
SummationStep::Stage
Stage
Definition:
SummationSpecification.h:43
SummationStep::SAVE
Definition:
SummationSpecification.h:31
SummationStep::FIRST
Definition:
SummationSpecification.h:43
GenerateHcalLaserBadRunList.out
tuple out
Definition:
GenerateHcalLaserBadRunList.py:91
SummationStep::USE_Z
Definition:
SummationSpecification.h:35
SummationStep::PROFILE
Definition:
SummationSpecification.h:36
SummationStep::USE_Y
Definition:
SummationSpecification.h:34
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
SummationStep::EXTEND_Y
Definition:
SummationSpecification.h:28
SummationStep
Definition:
SummationSpecification.h:20
SummationStep::COUNT
Definition:
SummationSpecification.h:29
edm::ParameterSet
Definition:
ParameterSet.h:36
SummationStep::GROUPBY
Definition:
SummationSpecification.h:26
SummationStep::NO_TYPE
Definition:
SummationSpecification.h:25
SummationStep::CUSTOM
Definition:
SummationSpecification.h:32
Generated for CMSSW Reference Manual by
1.8.5