ATLAS Offline Software
DataScoutingInfo.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaCommon.Logging import logging
4 log = logging.getLogger( __name__ )
5 
6 '''
7 This file defines the Data Scouting chain identifiers which serve also
8 as EDM target identifiers and their mapping to HLT Result module IDs.
9 
10 When adding new identifiers, please follow the naming convention SomeNameDS,
11 where SomeName is generally camel-case unless it's an acronym like LAr or MET.
12 
13 Possible examples:
14 CostMonDS, PhysicsTLA
15 '''
16 
17 
18 # Data scouting identifiers and the corresponding HLT result ROBFragment module IDs.
19 # If you add new entries also add a corresponding entry to EventBuildingInfo.py.
20 # WARNING: Never change the module IDs during data taking!
21 # WARNING: ID=0 is reserved for full HLT result
22 _DataScoutingIdentifiers = {
23  'CostMonDS': 1,
24  'PhysicsTLA': 5,
25  'DarkJetPEBTLA': 6,
26  'FTagPEBTLA' : 7,
27  'EgammaPEBTLA' : 8,
28 }
29 
30 # Each stream should correspond to exactly one event building type
31 _DataScoutingStreams = {
32  'calibration_CostMonitoring': 'CostMonDS',
33  'physics_TLA': 'PhysicsTLA',
34  'physics_DarkJetPEBTLA': 'DarkJetPEBTLA',
35  'physics_FTagPEBTLA': 'FTagPEBTLA',
36  'physics_EgammaPEBTLA': 'EgammaPEBTLA',
37 }
38 
39 # Truncation thresholds (in bytes) for each HLT result type
40 TruncationThresholds = {
41  0: 5*(1024**2), # Main: 5 MB
42  1: 2*(1024**2), # CostMonDS: 2 MB
43  5: 1*(1024**2), # PhysicsTLA: 1 MB
44  6: 1*(1024**2), # DarkJetPEBTLA: 1 MB
45  7: 1*(1024**2), # FTagPEBTLA 1 MB
46  8: 1*(1024**2), # EgammaPEBTLA 1 MB
47 
48 }
49 
50 
52  if name in _DataScoutingIdentifiers:
53  return _DataScoutingIdentifiers[name]
54  else:
55  log.error('Unknown name %s, cannot assign result ID', name)
56 
57 
59  return list(_DataScoutingStreams.keys())
60 
61 
63  if streamname in _DataScoutingStreams:
64  return _DataScoutingStreams[streamname]
65  else:
66  log.error('Unknown name %s, not a data scouting stream', streamname)
67 
68 
70  return _DataScoutingIdentifiers.values()
71 
72 
74  # WARNING: Don't change this, it should always be zero.
75  # It's defined here to avoid using a magic number in other places
76  return 0
77 
78 
80  return list(_DataScoutingIdentifiers.keys())
python.DataScoutingInfo.getFullHLTResultID
def getFullHLTResultID()
Definition: DataScoutingInfo.py:73
python.DataScoutingInfo.getDataScoutingResultID
def getDataScoutingResultID(name)
Definition: DataScoutingInfo.py:51
python.DataScoutingInfo.getAllDataScoutingIdentifiers
def getAllDataScoutingIdentifiers()
Definition: DataScoutingInfo.py:79
python.DataScoutingInfo.getDataScoutingTypeFromStream
def getDataScoutingTypeFromStream(streamname)
Definition: DataScoutingInfo.py:62
python.DataScoutingInfo.getAllDataScoutingResultIDs
def getAllDataScoutingResultIDs()
Definition: DataScoutingInfo.py:69
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.DataScoutingInfo.getDataScoutingStreams
def getDataScoutingStreams()
Definition: DataScoutingInfo.py:58