2008 testTask1 =
Task(edproducer, edfilter)
2009 self.assertRaises(RuntimeError, testTask1.add, edanalyzer)
2010 testTask1.add(essource, service)
2011 testTask1.add(essource, esproducer)
2012 testTask1.add(testTask2)
2013 coll = testTask1._collection
2014 self.assertTrue(edproducer
in coll)
2015 self.assertTrue(edfilter
in coll)
2016 self.assertTrue(service
in coll)
2017 self.assertTrue(essource
in coll)
2018 self.assertTrue(esproducer
in coll)
2019 self.assertTrue(testTask2
in coll)
2020 self.assertTrue(len(coll) == 6)
2021 self.assertTrue(len(testTask2._collection) == 0)
2025 taskContents.append(i)
2026 self.assertTrue(taskContents == [edproducer, edfilter, essource, service, esproducer, testTask2])
2031 process.mproducer = edproducer
2032 process.mproducer2 = edproducer2
2033 process.mfilter = edfilter
2034 process.messource = essource
2035 process.mesproducer = esproducer
2038 testTask3 =
Task(edproducer, edproducer2)
2039 testTask1.add(testTask3)
2040 process.myTask1 = testTask1
2047 testTask1.visit(visitor)
2048 self.assertTrue(l == set([
'mesproducer',
'mproducer',
'mproducer2',
'mfilter',
'd',
'messource']))
2049 l2 = testTask1.moduleNames
2050 self.assertTrue(l == set([
'mesproducer',
'mproducer',
'mproducer2',
'mfilter',
'd',
'messource']))
2052 testTask4 =
Task(edproducer3)
2054 self.assertRaises(RuntimeError, testTask4.visit, visitor)
2056 process.myTask4 = testTask4
2057 self.assertTrue(
False)
2058 except RuntimeError:
2061 testTask5 =
Task(service3)
2063 self.assertRaises(RuntimeError, testTask5.visit, visitor)
2065 process.myTask5 = testTask5
2066 self.assertTrue(
False)
2067 except RuntimeError:
2070 process.d = service3
2071 process.myTask5 = testTask5
2074 expectedDict = {
'myTask1' : testTask1,
'myTask5' : testTask5 }
2076 self.assertTrue(process.tasks == expectedFixedDict)
2077 self.assertTrue(process.tasks[
'myTask1'] == testTask1)
2078 self.assertTrue(process.myTask1 == testTask1)
2082 process.mproducer2 = edproducer4
2086 testTask1.visit(visitor1)
2088 expectedList = [edproducer,essource,esproducer,service,edfilter,edproducer,edproducer4]
2090 self.assertTrue(expectedList == l)
2092 process.myTask6 =
Task()
2093 process.myTask7 =
Task()
2094 process.mproducer8 = edproducer8
2095 process.myTask8 =
Task(process.mproducer8)
2096 process.myTask6.add(process.myTask7)
2097 process.myTask7.add(process.myTask8)
2098 process.myTask1.add(process.myTask6)
2099 process.myTask8.add(process.myTask5)
2101 testDict = process._itemsInDependencyOrder(process.tasks)
2102 expectedLabels = [
"myTask5",
"myTask8",
"myTask7",
"myTask6",
"myTask1"]
2103 expectedTasks = [process.myTask5, process.myTask8, process.myTask7, process.myTask6, process.myTask1]
2105 for testLabel, testTask
in testDict.items():
2106 self.assertTrue(testLabel == expectedLabels[index])
2107 self.assertTrue(testTask == expectedTasks[index])
2113 expectedPythonDump =
'cms.Task(process.d, process.mesproducer, process.messource, process.mfilter, process.mproducer, process.mproducer2, process.myTask6)\n' 2114 self.assertTrue(pythonDump == expectedPythonDump)
2116 process.myTask5 =
Task()
2117 process.myTask100 =
Task()
2118 process.mproducer9 = edproducer9
2119 sequence1 =
Sequence(process.mproducer8, process.myTask1, process.myTask5, testTask2, testTask3)
2120 sequence2 =
Sequence(process.mproducer8 + process.mproducer9)
2121 process.sequence3 =
Sequence((process.mproducer8 + process.mfilter))
2123 process.path1 =
Path(process.mproducer+process.mproducer8+sequence1+sequence2+process.sequence3+sequence4)
2124 process.path1.associate(process.myTask1, process.myTask5, testTask2, testTask3)
2125 process.path11 =
Path(process.mproducer+process.mproducer8+sequence1+sequence2+process.sequence3+ sequence4,process.myTask1, process.myTask5, testTask2, testTask3, process.myTask100)
2126 process.path2 =
Path(process.mproducer)
2127 process.path3 =
Path(process.mproducer9+process.mproducer8,testTask2)
2129 self.assertTrue(process.path1.dumpPython(
PrintOptions()) ==
'cms.Path(process.mproducer+process.mproducer8+cms.Sequence(process.mproducer8, cms.Task(), cms.Task(process.None, process.mproducer), process.myTask1, process.myTask5)+(process.mproducer8+process.mproducer9)+process.sequence3, cms.Task(), cms.Task(process.None, process.mproducer), process.myTask1, process.myTask5)\n')
2131 self.assertTrue(process.path11.dumpPython(
PrintOptions()) ==
'cms.Path(process.mproducer+process.mproducer8+cms.Sequence(process.mproducer8, cms.Task(), cms.Task(process.None, process.mproducer), process.myTask1, process.myTask5)+(process.mproducer8+process.mproducer9)+process.sequence3, cms.Task(), cms.Task(process.None, process.mproducer), process.myTask1, process.myTask100, process.myTask5)\n')
2136 process.path1.visit(nameVisitor)
2137 self.assertTrue(l == set([
'mproducer',
'd',
'mesproducer',
None,
'mproducer9',
'mproducer8',
'messource',
'mproducer2',
'mfilter']))
2138 self.assertTrue(process.path1.moduleNames() == set([
'mproducer',
'd',
'mesproducer',
None,
'mproducer9',
'mproducer8',
'messource',
'mproducer2',
'mfilter']))
2142 process.path21 = process.path11.copy()
2143 process.path21.replace(process.mproducer, process.mproducer10)
2145 self.assertTrue(process.path11.dumpPython(
PrintOptions()) ==
'cms.Path(process.mproducer+process.mproducer8+cms.Sequence(process.mproducer8, cms.Task(), cms.Task(process.None, process.mproducer), process.myTask1, process.myTask5)+(process.mproducer8+process.mproducer9)+process.sequence3, cms.Task(), cms.Task(process.None, process.mproducer), process.myTask1, process.myTask100, process.myTask5)\n')
2154 self.assertTrue(process.path21.dumpPython(
PrintOptions()) ==
'cms.Path(process.mproducer10+process.mproducer8+process.mproducer8+(process.mproducer8+process.mproducer9)+process.sequence3, cms.Task(), cms.Task(process.None, process.mproducer10), cms.Task(process.d, process.mesproducer, process.messource, process.mfilter, process.mproducer10, process.mproducer2, process.myTask6), process.myTask100, process.myTask5)\n')
2156 process.path22 = process.path21.copyAndExclude([process.d, process.mesproducer, process.mfilter])
2157 self.assertTrue(process.path22.dumpPython(
PrintOptions()) ==
'cms.Path(process.mproducer10+process.mproducer8+process.mproducer8+(process.mproducer8+process.mproducer9)+process.mproducer8, cms.Task(), cms.Task(process.None, process.mproducer10), cms.Task(process.messource, process.mproducer10, process.mproducer2, process.myTask6), process.myTask100, process.myTask5)\n')
2159 process.path23 = process.path22.copyAndExclude([process.messource, process.mproducer10])
2160 self.assertTrue(process.path23.dumpPython(
PrintOptions()) ==
'cms.Path(process.mproducer8+process.mproducer8+(process.mproducer8+process.mproducer9)+process.mproducer8, cms.Task(), cms.Task(process.None), cms.Task(process.mproducer2, process.myTask6), process.myTask100, process.myTask5)\n')
2169 process.path24 =
Path(process.a+process.b+process.c+process.d)
2170 process.path25 = process.path24.copyAndExclude([process.a,process.b,process.c])
2171 self.assertTrue(process.path25.dumpPython(
None) ==
'cms.Path(process.d)\n')
2176 process.path200.replace(process.c,process.b)
2177 process.path200.replace(process.e,process.f)
2178 self.assertEqual(process.path200.dumpPython(
None),
"cms.EndPath(process.b, cms.Task(process.f))\n")
2179 process.path200.replace(process.b,process.c)
2180 process.path200.replace(process.f,process.e)
2181 self.assertEqual(process.path200.dumpPython(
None),
"cms.EndPath(process.c, cms.Task(process.e))\n")
2182 process.path200.replace(process.c,process.a)
2183 process.path200.replace(process.e,process.g)
2184 self.assertEqual(process.path200.dumpPython(
None),
"cms.EndPath(process.a, cms.Task(process.g))\n")
2185 process.path200.replace(process.a,process.c)
2186 process.path200.replace(process.g,process.e)
2187 self.assertEqual(process.path200.dumpPython(
None),
"cms.EndPath(process.c, cms.Task(process.e))\n")
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