Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
########################################
#
# Example setup for ByteStreamEmonSvc
#
#########################################
## -------------------------------------------------------------------
## list of local flags
if ('partitionName' not in dir() or partitionName is None):
partitionName = 'ATLAS'
if ('publishName' not in dir() or publishName is None):
publishName = 'Global_PT'
if ('streamType' not in dir() or streamType is None):
streamType = 'physics'
if ('streamName' not in dir() or streamName is None):
streamName = 'Egamma:Muons'
if ('streamLogic' not in dir() or streamLogic is None):
streamLogic = 'Ignore'
if ('lvl1Name' not in dir() or lvl1Name is None):
lvl1Name = 'L1_MU2:L1_MU3:L1_EM10'
if ('lvl1Logic' not in dir() or lvl1Logic is None):
lvl1Logic = 'Ignore'
if ('keyname' not in dir()):
keyname = 'SFI'
if ('keycount' not in dir()):
keycount = 10
if ('buffersize' not in dir()):
buffersize = 10
if ('updateperiod' not in dir()):
updateperiod = 200
if ('timeout' not in dir()):
timeout = 240000
if ('groupName' not in dir()):
groupName = 'RecExOnline'
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
if ('isserverName' not in dir()):
isserverName = 'Histogramming'
if ('isGlobalMonitoring' not in dir()):
isGlobalMonitoring = False
## -------------------------------------------------------------------
# Common part, copy from here
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
from AthenaCommon.Constants import *
include("ByteStreamEmonSvc/ByteStreamEmonInputSvc_jobOptions.py")
# #####################################################
# If using the ERSBootstrap.py file, enable the output
# via ERS
# ####################################################
#MessageSvc.useErs = True
# Define the input
ByteStreamEmonInputSvc = svcMgr.ByteStreamInputSvc
# ############################################################
# The name of the partition you want to connect to is taken
# from 'TDAQ_PARTITION' if it exists, otherwise from here.
# ############################################################
ByteStreamEmonInputSvc.Partition = partitionName
# #######################################################
# The source of events, can be 'REB' (ROS Event Builder),
# 'SFI' (output of L2, default), 'efd' (output of EF)
# #######################################################
#print "IRH got Key: keyname: "+keyname
ByteStreamEmonInputSvc.Key = keyname
# special settings for pixel stand-alone partition
if (partitionName == 'PixelDD'):
ByteStreamEmonInputSvc.Key = 'ReadoutApplication'
ByteStreamEmonInputSvc.KeyValue = [ 'ROSEventBuilder' ]
# ############################################################
# A list of of key values, e.g. a list of SFIs to contact.
# If not defined, one event provider of this type (i.e. any SFI)
# ############################################################
#ByteStreamEmonInputSvc.KeyValue = [ 'SFI-1', 'SFI-2' ]
# #######################################
# Alternative: N providers of type 'SFI'
# KeyValue is ignored if this is set.
# ######################################
ByteStreamEmonInputSvc.KeyCount = keycount
# #######################################
# Set this to the IS server where you want
# to publish histograms, too. If unset, no
# histograms are published.
# #######################################
if (isGlobalMonitoring and partitionName in ['ATLAS', 'TDAQ']):
ByteStreamEmonInputSvc.ISServer = 'Histogramming-Global-iss'
else:
ByteStreamEmonInputSvc.ISServer = isserverName
# ########################################
# The provider name under which your histograms
# appear in OH.
# ########################################
ByteStreamEmonInputSvc.PublishName = publishName
# ###################################################
# Should histograms be cleared at new run? default: yes
# ###################################################
ByteStreamEmonInputSvc.ClearHistograms = True
# ####################################################
# A regular expression to restrict which histograms are published.
# Default: no selection - include all, exclude none
# ####################################################
# AK: 11-07-2014 in rel.19 SHIFT and EXPERT histogram folders are disabled. This means that no histograms are published, since SHIFT is enabled and EXPERT disabled.
#if (isGlobalMonitoring):
# ByteStreamEmonInputSvc.Include = '/SHIFT/.*'
# ByteStreamEmonInputSvc.Exclude = '/EXPERT/.*'
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# ###############################################
# Frequency of updates (in number of events, not secs...)
# ###############################################
#ByteStreamEmonInputSvc.Frequency = 5
ByteStreamEmonInputSvc.BufferSize = buffersize
ByteStreamEmonInputSvc.UpdatePeriod = updateperiod
ByteStreamEmonInputSvc.Timeout = timeout
# ##############################
# one of 'Ignore', 'Or', 'And'
# ##############################
ByteStreamEmonInputSvc.LVL1Logic = lvl1Logic
# #########################################
# One of 'TAP', 'TBP' or 'TAV' (default)
# #########################################
#ByteStreamEmonInputSvc.LVL1Origin = 'TAV'
# ###########################################################
# A list of L1 bit names to select on. This requires the
# L1CT.TrigConfL1Items to be published in IS.
# This can be used instead of or in addition to LVL1Bits.
# ###########################################################
if (lvl1Logic != 'Ignore'):
ByteStreamEmonInputSvc.LVL1Names = lvl1Name.split(':')
# ##########################################################
# A list of numerical trigger bits instead of names. This is
# Or'ed with LVL1Names
# ##########################################################
#ByteStreamEmonInputSvc.LVL1Items = [ 10, 20, 72, 245 ]
# ###########################################
# Selection by stream tag:
# One of 'Or', 'And', 'Ignore' (default)
# ###########################################
ByteStreamEmonInputSvc.StreamLogic = streamLogic
# ###########################################
# One of 'physics' or 'calibration'
# ############################################
if (streamName == 'express'):
ByteStreamEmonInputSvc.StreamType = 'express'
else:
ByteStreamEmonInputSvc.StreamType = streamType
# ############################################
# A list of stream tag names
# ############################################

Song-Ming Wang
committed
if (streamName == ""):
ByteStreamEmonInputSvc.StreamNames = list()
else:
ByteStreamEmonInputSvc.StreamNames = streamName.split(':')
# #################################################
# Shall athena exit if the partition is shutdown ?
# For offline athena tasks mainly.
# #################################################
ByteStreamEmonInputSvc.ExitOnPartitionShutdown = False
# #################################################
# Set groupName to "RecExOnline" by default so that
# each process belonging to the "RecExOnline" group
# gets a different set of events.
# Set groupName to empty to allow other process get
# the same events.
# #################################################
ByteStreamEmonInputSvc.GroupName = groupName
ByteStreamCnvSvc = Service('ByteStreamCnvSvc')
theApp.ExtSvc += [ 'ByteStreamCnvSvc' ]