2 from SequenceTypes
import *
3 from Modules
import OutputModule, EDProducer, EDFilter, EDAnalyzer
8 if isinstance(visitee,OutputModule):
9 raise ValueError(
"Path cannot contain an OutputModule, "+visitee.type_()+
", with label "+visitee.label_())
14 _presetFilters = [
"TriggerResultsFilter",
"HLTPrescaler"]
18 if isinstance(visitee,EDFilter):
21 self.filtersOnEndpaths.append(visitee.type_())
25 if __name__==
"__main__":
31 def testValidators(self):
36 producer.setLabel(
"producer")
37 analyzer.setLabel(
"analyzer")
38 output.setLabel(
"output")
39 filter.setLabel(
"filter")
44 ep1 =
EndPath(producer+output+analyzer)
49 p1.visit(pathValidator)
50 self.assertRaises(ValueError, p2.visit, pathValidator)
51 ep1.visit(endpathValidator)
52 ep2.visit(endpathValidator)
53 ep3.visit(endpathValidator)