ATLAS Offline Software
Loading...
Searching...
No Matches
DataScoutingInfo.py
Go to the documentation of this file.
1# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3from AthenaCommon.Logging import logging
4log = logging.getLogger( __name__ )
5
6'''
7This file defines the Data Scouting chain identifiers which serve also
8as EDM target identifiers and their mapping to HLT Result module IDs.
9
10When adding new identifiers, please follow the naming convention SomeNameDS,
11where SomeName is generally camel-case unless it's an acronym like LAr or MET.
12
13Possible examples:
14CostMonDS, 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 'MuonDS' : 2,
25 'PhysicsTLA': 5,
26 'DarkJetPEBTLA': 6,
27 'FTagPEBTLA' : 7,
28 'EgammaPEBTLA' : 8,
29}
30
31# Each stream should correspond to exactly one event building type
32_DataScoutingStreams = {
33 'calibration_CostMonitoring': 'CostMonDS',
34 'calibration_MuonDSCalib':'MuonDS',
35 'physics_TLA': 'PhysicsTLA',
36 'physics_DarkJetPEBTLA': 'DarkJetPEBTLA',
37 'physics_FTagPEBTLA': 'FTagPEBTLA',
38 'physics_EgammaPEBTLA': 'EgammaPEBTLA',
39}
40
41# Truncation thresholds (in bytes) for each HLT result type
42TruncationThresholds = {
43 0: 7*(1024**2), # Main: 7 MB (increased from 5MB after ATR-29142)
44 1: 2*(1024**2), # CostMonDS: 2 MB
45 2: 1*(1024**2), # MuonDS: 1 MB
46 5: 1*(1024**2), # PhysicsTLA: 1 MB
47 6: 1*(1024**2), # DarkJetPEBTLA: 1 MB
48 7: 1*(1024**2), # FTagPEBTLA 1 MB
49 8: 1*(1024**2), # EgammaPEBTLA 1 MB
50
51}
52
53
55 if name in _DataScoutingIdentifiers:
56 return _DataScoutingIdentifiers[name]
57 else:
58 log.error('Unknown name %s, cannot assign result ID', name)
59
60
62 return list(_DataScoutingStreams.keys())
63
64
66 if streamname in _DataScoutingStreams:
67 return _DataScoutingStreams[streamname]
68 else:
69 log.error('Unknown name %s, not a data scouting stream', streamname)
70
71
73 return _DataScoutingIdentifiers.values()
74
75
77 # WARNING: Don't change this, it should always be zero.
78 # It's defined here to avoid using a magic number in other places
79 return 0
80
81
83 return list(_DataScoutingIdentifiers.keys())
getDataScoutingTypeFromStream(streamname)