Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
StreamInfo.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
3 import eformat
4 from AthenaCommon.Logging import logging
5 log = logging.getLogger( __name__ )
6 
7 _allowed_tag_types = [eformat.helper.tagtype_to_string(t) for t in eformat.helper.TagType.values.values()]
8 
10  def __init__(self, name, streamType, obeysLumiBlock, forceFullEventBuilding):
11  assert type(name) is str, "name has to be str"
12  assert type(streamType) is str, "streamType has to be str"
13  assert streamType in _allowed_tag_types, "streamType '"+streamType+"' is not one of "+\
14  "the allowed types: "+str(_allowed_tag_types)
15  assert type(obeysLumiBlock) is bool, "obeysLumiBlock has to be bool"
16  assert type(forceFullEventBuilding) is bool, "forceFullEventBuilding has to be bool"
17  self.__data = [name, streamType, obeysLumiBlock, forceFullEventBuilding]
18 
19  def __str__(self):
20  return '({}, obeysLumiBlock={}, forceFullEventBuilding={})'.format(
21  self.typeName(), self.obeysLumiBlock(), self.forceFullEventBuilding())
22 
23  def name(self):
24  return self.__data[0]
25 
26  def type(self):
27  return self.__data[1]
28 
29  def obeysLumiBlock(self):
30  return self.__data[2]
31 
33  return self.__data[3]
34 
35  def typeName(self):
36  return '{:s}_{:s}'.format(self.type(), self.name())
37 
38 
39 _all_streams = [
40  # PHYSICS STREAMS
41  StreamInfo('Main', 'physics', True, True),
42  StreamInfo('CosmicMuons', 'physics', True, True),
43  StreamInfo('CosmicCalo', 'physics', True, True),
44  StreamInfo('IDCosmic', 'physics', True, True),
45  StreamInfo('ZeroBias', 'physics', True, True),
46  StreamInfo('Background', 'physics', True, True),
47  StreamInfo('Standby', 'physics', True, True),
48  StreamInfo('L1Calo', 'physics', True, True),
49  StreamInfo('EnhancedBias', 'physics', True, True),
50  StreamInfo('Late', 'physics', True, True),
51  StreamInfo('Mistimed', 'physics', True, True),
52  # TLA/PEB/DATA SCOUTING (physics) STREAMS
53  StreamInfo('TLA','physics',True,False),
54  StreamInfo('DarkJetPEBTLA', 'physics', True, False),
55  StreamInfo('FTagPEBTLA', 'physics', True, False),
56  StreamInfo('EgammaPEBTLA', 'physics', True, False),
57  StreamInfo('AFPPEB','physics',True,False),
58  # EXPRESS STREAM
59  StreamInfo('express', 'express', True, True),
60  # MONITORING STREAMS
61  StreamInfo('IDMonitoring', 'monitoring', True, True),
62  StreamInfo('CSC', 'monitoring', True, False),
63  # CALIBRATION STREAMS
64  StreamInfo('Muon_Calibration','calibration',False,True),
65  StreamInfo('MuonDS','calibration',True,False),
66  StreamInfo('BphysPEB','calibration',True,False),
67  StreamInfo('BeamSpot', 'calibration', True, False),
68  StreamInfo('LArCells', 'calibration', False, False),
69  StreamInfo('LArCellsEmpty', 'calibration', False, False),
70  StreamInfo('LArNoiseBurst', 'calibration', False, True),
71  StreamInfo('TgcNoiseBurst', 'calibration', False, True),
72  StreamInfo('CostMonitoring', 'calibration', False, False),
73  StreamInfo('SCTNoise', 'calibration', False, False),
74  StreamInfo('PixelNoise', 'calibration', False, False),
75  StreamInfo('Tile', 'calibration', False, False),
76  StreamInfo('LArPEB', 'calibration', False, False),
77  StreamInfo('LArPEBDigitalTrigger', 'calibration', False, False),
78  StreamInfo('L1TopoMismatches', 'calibration', False, True),
79  StreamInfo('ZDCCalib', 'calibration', False, False),
80  StreamInfo('ZDCLEDCalib', 'calibration', False, False),
81  StreamInfo('ZDCInjCalib', 'calibration', False, False),
82  StreamInfo('IDCalib', 'calibration', True, False),
83  StreamInfo('AFPCalib', 'calibration', False, False),
84  StreamInfo('PixelBeam', 'calibration', True, False),
85  StreamInfo('VdM', 'calibration', True, False),
86  StreamInfo('L1CaloCalib', 'calibration', False, False),
87  StreamInfo('NSWTriggerMonitor', 'calibration', False, True),
88  # HI STREAMS
89  StreamInfo('HardProbes', 'physics', True, True),
90  StreamInfo('MinBias', 'physics', True, True),
91  StreamInfo('UPC', 'physics', True, True),
92  StreamInfo('MinBiasOverlay', 'physics', True, True),
93  StreamInfo('PC', 'physics', True, True),
94  StreamInfo('CC', 'physics', True, True),
95  StreamInfo('UCC', 'physics', True, True),
96  # DELAYED STREAMS
97  StreamInfo('VBFDelayed' , 'physics', True, True),
98  StreamInfo('BphysDelayed', 'physics', True, True),
99  # Special stream to be used only for special chains rejecting all events like timeburner
100  StreamInfo('DISCARD', 'unknown', False, True),
101 
102  # Add new streams grouped by type as above, not at the end of the list
103 ]
104 
105 
107  return _all_streams
108 
109 
110 def getStreamTag(streamName):
111  matches = [s for s in _all_streams if s.name() == streamName]
112  if len(matches) == 0:
113  log.error('Stream %s is not defined in StreamInfo', streamName)
114  return None
115  elif len(matches) > 1:
116  log.error('Stream %s has multiple definitions in StreamInfo', streamName)
117  return None
118  else:
119  return matches[0]
120 
121 
122 def getStreamTags(streamNames):
123  return [getStreamTag(name) for name in streamNames]
python.HLT.Menu.StreamInfo.StreamInfo.__str__
def __str__(self)
Definition: StreamInfo.py:19
vtune_athena.format
format
Definition: vtune_athena.py:14
python.HLT.Menu.StreamInfo.StreamInfo.__data
__data
Definition: StreamInfo.py:17
python.HLT.Menu.StreamInfo.StreamInfo.name
def name(self)
Definition: StreamInfo.py:23
python.HLT.Menu.StreamInfo.StreamInfo.obeysLumiBlock
def obeysLumiBlock(self)
Definition: StreamInfo.py:29
python.HLT.Menu.StreamInfo.StreamInfo.type
def type(self)
Definition: StreamInfo.py:26
python.HLT.Menu.StreamInfo.StreamInfo.forceFullEventBuilding
def forceFullEventBuilding(self)
Definition: StreamInfo.py:32
python.HLT.Menu.StreamInfo.getStreamTag
def getStreamTag(streamName)
Definition: StreamInfo.py:110
python.HLT.Menu.StreamInfo.getAllStreams
def getAllStreams()
Definition: StreamInfo.py:106
python.HLT.Menu.StreamInfo.getStreamTags
def getStreamTags(streamNames)
Definition: StreamInfo.py:122
pickleTool.object
object
Definition: pickleTool.py:30
str
Definition: BTagTrackIpAccessor.cxx:11
python.HLT.Menu.StreamInfo.StreamInfo
Definition: StreamInfo.py:9
python.HLT.Menu.StreamInfo.StreamInfo.typeName
def typeName(self)
Definition: StreamInfo.py:35
python.HLT.Menu.StreamInfo.StreamInfo.__init__
def __init__(self, name, streamType, obeysLumiBlock, forceFullEventBuilding)
Definition: StreamInfo.py:10