14 from Configurables
import EvtStoreSvc
15 from Configurables
import Gaudi__Monitoring__MessageSvcSink
as MessageSvcSink
16 from Configurables
import Gaudi__TestSuite__ContextConsumer
as ContextConsumer
17 from Configurables
import Gaudi__TestSuite__ContextIntConsumer
as ContextIntConsumer
18 from Configurables
import Gaudi__TestSuite__CountingConsumer
as CountingConsumer
19 from Configurables
import Gaudi__TestSuite__FloatDataConsumer
as FloatDataConsumer
20 from Configurables
import Gaudi__TestSuite__FrExpTransformer
as FrExpTransformer
21 from Configurables
import Gaudi__TestSuite__IntDataConsumer
as IntDataConsumer
22 from Configurables
import Gaudi__TestSuite__IntDataProducer
as IntDataProducer
23 from Configurables
import (
24 Gaudi__TestSuite__IntIntToFloatFloatData
as IntIntToFloatFloatData,
26 from Configurables
import Gaudi__TestSuite__IntToFloatData
as IntToFloatData
27 from Configurables
import Gaudi__TestSuite__IntVectorsMerger
as IntVectorsMerger
28 from Configurables
import (
29 Gaudi__TestSuite__IntVectorsMergingConsumer
as IntVectorsMergingConsumer,
31 from Configurables
import Gaudi__TestSuite__IntVectorsToInts
as IntVectorsToInts
32 from Configurables
import (
33 Gaudi__TestSuite__IntVectorsToIntVector
as IntVectorsToIntVector,
35 from Configurables
import Gaudi__TestSuite__LdExpTransformer
as LdExpTransformer
36 from Configurables
import Gaudi__TestSuite__MyConsumerTool
as MyConsumerTool
37 from Configurables
import Gaudi__TestSuite__MyExampleTool
as MyExampleTool
38 from Configurables
import Gaudi__TestSuite__OpaqueProducer
as OpaqueProducer
39 from Configurables
import Gaudi__TestSuite__OptFrExpTransformer
as OptFrExpTransformer
40 from Configurables
import Gaudi__TestSuite__OptLdExpTransformer
as OptLdExpTransformer
41 from Configurables
import Gaudi__TestSuite__SDataProducer
as SDataProducer
42 from Configurables
import Gaudi__TestSuite__ShrdPtrConsumer
as ShrdPtrConsumer
43 from Configurables
import Gaudi__TestSuite__ShrdPtrProducer
as ShrdPtrProducer
44 from Configurables
import Gaudi__TestSuite__SRangesToIntVector
as SRangesToIntVector
45 from Configurables
import (
46 Gaudi__TestSuite__OptionalSRangesMerger
as OptionalSRangesMerger,
48 from Configurables
import Gaudi__TestSuite__ToolConsumer
as ToolConsumer
49 from Configurables
import Gaudi__TestSuite__TwoDMerger
as TwoDMerger
50 from Configurables
import Gaudi__TestSuite__VectorDataProducer
as VectorDataProducer
51 from Configurables
import Gaudi__TestSuite__VectorDoubleProducer
as VectorDoubleProducer
57 app.ExtSvc = [EvtStoreSvc(
"EventDataSvc"), MessageSvcSink()]
62 print(
"---\n# List of input and output types by class")
63 for configurable
in sorted(
71 IntIntToFloatFloatData,
72 IntVectorsToIntVector,
84 key=
lambda c: c.getType(),
86 print(
'"{}":'.
format(configurable.getType()))
87 props = configurable.getDefaultProperties()
88 for propname, prop
in sorted(props.items()):
89 if isinstance(prop, DataHandle):
90 types.append(prop.type())
91 print(
' {}: "{}"'.
format(propname, prop.type()))
96 OtherIntDataProducer = IntDataProducer(
"OtherIntDataProducer")
97 OtherIntDataProducer.OutputLocation =
"/Event/MyOtherInt"
98 VectorDataProducer1 = VectorDataProducer(
99 "VectorDataProducer1", OutputLocation=
"/Event/IntVector1"
101 VectorDataProducer2 = VectorDataProducer(
102 "VectorDataProducer2", OutputLocation=
"/Event/IntVector2"
104 SDataProducer1 = SDataProducer(
"SDataProducer1", OutputLocation=
"/Event/S1", j=3)
105 SDataProducer2 = SDataProducer(
"SDataProducer2", OutputLocation=
"/Event/S2", j=10)
107 IntDataProducer(
"IntDataProducer"),
108 OtherIntDataProducer,
109 IntDataConsumer(
"IntDataConsumer"),
110 ToolConsumer(
"MyToolConsumer", MyTool=MyExampleTool(Message=
"Hello World!!!")),
112 "MyBoundToolConsumer", MyTool=MyConsumerTool(MyInt=
"/Event/MyOtherInt")
114 IntToFloatData(
"IntToFloatData"),
115 IntIntToFloatFloatData(
"IntIntToFloatFloatData"),
116 FloatDataConsumer(
"FloatDataConsumer"),
117 ContextConsumer(
"ContextConsumer"),
118 ContextIntConsumer(
"ContextIntConsumer"),
119 VectorDoubleProducer(
"VectorDoubleProducer"),
122 IntVectorsToIntVector(
123 "IntVectorsToIntVector",
125 str(VectorDataProducer1.OutputLocation),
126 str(VectorDataProducer2.OutputLocation),
129 FrExpTransformer(
"FrExpTransformer"),
130 LdExpTransformer(
"LdExpTransfomer"),
131 OptFrExpTransformer(
"OptFrExpTransformer"),
132 OptLdExpTransformer(
"OptLdExpTransformer"),
133 CountingConsumer(
"CountingConsumer"),
137 "SRangesToIntVector",
139 str(SDataProducer1.OutputLocation),
140 str(SDataProducer2.OutputLocation),
143 OptionalSRangesMerger(
144 "OptionalSRangesMerger",
146 str(SDataProducer1.OutputLocation),
147 str(SDataProducer2.OutputLocation),
150 OptionalSRangesMerger(
151 "OptionalSRangesMerger_EmptyInput",
153 "/Event/NonExistent",
159 str(VectorDataProducer1.OutputLocation),
160 str(VectorDataProducer2.OutputLocation),
163 IntVectorsMergingConsumer(
164 "IntVectorsMergingConsumer",
166 str(VectorDataProducer1.OutputLocation),
167 str(VectorDataProducer2.OutputLocation),
173 str(VectorDataProducer1.OutputLocation),
174 str(VectorDataProducer2.OutputLocation),
177 str(OptLdExpTransformer(
"OptLdExpTransformer").OutputDoubles),
179 OutputInts=
"/Event/SummedInts",
180 OutputDoubles=
"/Event/SummedDoubles",
182 OpaqueProducer(
"OpaqueProducer"),
183 ShrdPtrProducer(
"SharedPtrProducer"),
184 ShrdPtrConsumer(
"SharedPtrConsumer"),
186 "IntProducer0", Data=[0, 2, 4], OutputLocation=
"/Event/EventInts"
189 "IntProducer1", Data=[1, 3, 5, 7], OutputLocation=
"/Event/OddInt"
192 "IntProducer2", Data=[1, 1, 2, 3, 5, 8, 13], OutputLocation=
"/Event/Fib7"
196 Mapping=[[0, 0], [0, 1], [0, 2], [1, 1], [1, 2]],
197 InputLocations=[
"/Event/EventInts",
"/Event/OddInt",
"/Event/Fib7"],
198 OutputLocations=[
"/Event/EvenOddFib",
"/Event/OddFib"],
200 ContextIntConsumer(
"EvenOddFibConsumer", InputLocation=
"/Event/EvenOddFib"),
201 ContextIntConsumer(
"OddFibConsumer", InputLocation=
"/Event/OddFib"),
206 app.HistogramPersistency =
"NONE"