1 import FWCore.ParameterSet.Config
as cms
2 from copy
import deepcopy
11 NO_TYPE = cms.int32(0)
12 GROUPBY = cms.int32(1)
13 EXTEND_X = cms.int32(2)
14 EXTEND_Y = cms.int32(3)
21 PROFILE = cms.int32(11)
26 NO_STAGE = cms.int32(0)
33 if hasattr(maybecms,
"value"):
34 return maybecms.value()
40 return "/".
join(parts[0:len(parts)-1])
43 DefaultConf = cms.PSet(enabled = cms.bool(
True))
62 super(Specification, self).
__init__()
77 t.spec = deepcopy(self.
spec, memo)
93 raise Exception(
"First grouping must be SUM")
95 cnames.remove(
"Event");
104 cname = self._activeColumns.difference(cnames)
106 raise Exception(
"EXTEND must drop exactly one column.")
108 if mode ==
"EXTEND_X":
109 self._x.type = EXTEND_X
110 self._x.columns = cms.vstring(cname)
111 elif mode ==
"EXTEND_Y":
112 self._y.type = EXTEND_Y
113 self._y.columns = cms.vstring(cname)
115 raise Exception(
"Only EXTEND_X or EXTEND_Y allowed here, not " + mode)
120 if s.stage == FIRST
and s.type == GROUPBY
and c
in s.columns:
123 self._activeColumns.remove(c)
125 self._lastColumns.remove(c)
131 if self._activeColumns.issubset(cname):
132 raise Exception(
"Harvesting GROUPBY must drop some columns")
133 if mode ==
"EXTEND_X":
138 raise Exception(
"Currently only EXTEND_X and SUM supported in harvesting, not " + mode)
144 self.spec.append(cms.PSet(
147 columns = cms.vstring(cname),
148 arg = cms.string(mode)
153 if newstate == STAGE1
and self.
_state == FIRST:
155 type = USE_X, stage = STAGE1,
156 columns = cms.vstring(),
159 self.spec.append(self.
_x)
161 type = USE_Y, stage = STAGE1,
162 columns = cms.vstring(),
165 self.spec.append(self.
_y)
167 type = USE_Z, stage = STAGE1,
168 columns = cms.vstring(),
171 self.spec.append(self.
_z)
184 raise Exception(
"First statement must be groupBy.")
185 self.
spec[0].type = COUNT
192 self.spec.append(cms.PSet(
193 type = PROFILE, stage = STAGE1,
194 columns = cms.vstring(), arg = cms.string(
"")
199 raise Exception(
"Harvesting allows only reduce(MEAN) at the moment, not " + sort)
201 self.spec.append(cms.PSet(
204 columns = cms.vstring(),
205 arg = cms.string(sort)
211 raise Exception(
"First statement must be groupBy.")
216 if self._x.type == USE_X: self._x.arg = cms.string(
str(n)); n = n+1
217 if self._y.type == USE_Y: self._y.arg = cms.string(
str(n)); n = n+1
218 if self._z.type == USE_Z: self._z.arg = cms.string(
str(n)); n = n+1
236 for i
in range(len(columns)-1, 0, -1):
def __init__(self, conf=DefaultConf)
static std::string join(char **cmd)
def groupBy(self, cols, mode="SUM")
def __deepcopy__(self, memo)
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