The Gaudi Framework  master (37c0b60a)
Write.py
Go to the documentation of this file.
1 
14 
15 from Configurables import Gaudi__RootCnvSvc as RootCnvSvc
16 from Configurables import GaudiPersistency
17 from Configurables import GaudiTesting__EvenEventsFilter as EvenFilter
18 from Configurables import GaudiTesting__OddEventsFilter as OddFilter
19 from Configurables import GaudiTesting__PutDataObjectAlg as DataCreator
20 from Gaudi.Configuration import *
21 
22 # create data in the TES
23 creator = DataCreator("DataCreator")
24 creator.Paths = ["A", "B", "C", "D"]
25 
26 # Filter algorithms
27 oddEvts = OddFilter("OddEvents")
28 evenEvts = EvenFilter("EvenEvents")
29 
30 # Output setup
31 # - DST
32 stream = OutputStream()
33 stream.Output = (
34  "DATAFILE='PFN:ConditionalOutput.dst' SVC='Gaudi::RootCnvSvc' OPT='RECREATE'"
35 )
36 # stream.ItemList = ['A', 'B', 'C']
37 stream.AlgDependentItemList[oddEvts.name()] = ["/Event/A#1", "/Event/B#1"]
38 stream.AlgDependentItemList[evenEvts.name()] = ["/Event/A#1", "/Event/C#1"]
39 
40 FileCatalog(Catalogs=["xmlcatalog_file:ConditionalOutput.xml"])
41 
42 # Output Levels
43 MessageSvc(OutputLevel=VERBOSE)
44 IncidentSvc(OutputLevel=DEBUG)
45 RootCnvSvc(OutputLevel=INFO)
46 
47 GaudiPersistency()
48 
49 # Application setup
51 # - I/O
52 app.OutStream += [stream]
53 # - Algorithms
54 app.TopAlg = [creator, oddEvts, evenEvts]
55 # - Events
56 app.EvtMax = 10
57 app.EvtSel = "NONE" # do not use any event input
58 app.HistogramPersistency = "NONE"
OutputStream
A small to stream Data I/O.
Definition: OutputStream.h:38
DataCreator
Definition: DataCreator.h:21
IncidentSvc
Default implementation of the IIncidentSvc interface.
Definition: IncidentSvc.h:48
Gaudi.Configuration
Definition: Configuration.py:1
MessageSvc
Definition: MessageSvc.h:40
ApplicationMgr
Definition: ApplicationMgr.h:57