1 import FWCore.ParameterSet.Config
as cms
2 from copy
import deepcopy
10 NO_TYPE = cms.int32(0)
11 GROUPBY = cms.int32(1)
12 EXTEND_X = cms.int32(2)
13 EXTEND_Y = cms.int32(3)
21 PROFILE = cms.int32(11)
23 NO_STAGE = cms.int32(0)
29 if hasattr(maybecms,
"value"):
30 return maybecms.value()
36 return "/".
join(parts[0:len(parts)-1])
39 DefaultConf = cms.PSet(enabled = cms.bool(
True))
59 super(Specification, self).
__init__()
69 t.spec = deepcopy(self.
spec, memo)
79 raise Exception(
"First grouping must be SUM")
81 cnames.remove(
"Event");
90 cname = self._activeColumns.difference(cnames)
92 raise Exception(
"EXTEND must drop exactly one column.")
94 if mode ==
"EXTEND_X":
95 self._x.type = EXTEND_X
96 self._x.columns = cms.vstring(cname)
97 elif mode ==
"EXTEND_Y":
98 self._y.type = EXTEND_Y
99 self._y.columns = cms.vstring(cname)
101 raise Exception(
"Only EXTEND_X or EXTEND_Y allowed here, not " + mode)
106 if s.stage == FIRST
and c
in s.columns:
109 self._activeColumns.remove(c)
111 self._lastColumns.remove(c)
117 if self._activeColumns.issubset(cname):
118 raise Exception(
"Harvesting GROUPBY must drop some columns")
119 if mode ==
"EXTEND_X":
124 raise Exception(
"Currently only EXTEND_X and SUM supported in harvesting, not " + mode)
130 self.spec.append(cms.PSet(
133 columns = cms.vstring(cname),
134 arg = cms.string(mode)
137 if newstate == STAGE1
and self.
_state == FIRST:
140 type = USE_X, stage = STAGE1,
141 columns = cms.vstring(),
144 self.spec.append(self.
_x)
146 type = USE_Y, stage = STAGE1,
147 columns = cms.vstring(),
150 self.spec.append(self.
_y)
152 type = USE_Z, stage = STAGE1,
153 columns = cms.vstring(),
156 self.spec.append(self.
_z)
165 raise Exception(
"First statement must be groupBy.")
166 self.
spec[0].type = COUNT
173 self.spec.append(cms.PSet(
174 type = PROFILE, stage = STAGE1,
175 columns = cms.vstring(), arg = cms.string(
"")
180 raise Exception(
"Harvesting allows only reduce(MEAN) at the moment, not " + sort)
182 self.spec.append(cms.PSet(
185 columns = cms.vstring(),
186 arg = cms.string(sort)
192 raise Exception(
"First statement must be groupBy.")
197 if self._x.type == USE_X: self._x.arg = cms.string(str(n)); n = n+1
198 if self._y.type == USE_Y: self._y.arg = cms.string(str(n)); n = n+1
199 if self._z.type == USE_Z: self._z.arg = cms.string(str(n)); n = n+1
215 raise Exception(
"Custom processing exists only in Harvesting.")
216 self.spec.append(cms.PSet(
219 columns = cms.vstring(),
220 arg = cms.string(arg)
228 for i
in range(len(columns)-1, 0, -1):
static std::string join(char **cmd)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run