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