ATLAS Offline Software
Loading...
Searching...
No Matches
xAODMenuWriter.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef TRIGCONFXAOD_XAODMENUWRITER_H
8#define TRIGCONFXAOD_XAODMENUWRITER_H
9
10// System include(s):
11extern "C" {
12# include <stdint.h>
13}
14#include <string>
15#include <set>
16#include <map> // For std::pair...
17
19
20// Gaudi/Athena include(s):
22#include "GaudiKernel/ServiceHandle.h"
24
25// Trigger include(s):
28#include "TrigConfData/L1Menu.h"
32
33// EDM include(s):
35
36namespace TrigConf {
37
55
56 public:
58 xAODMenuWriter( const std::string& name, ISvcLocator* svcLoc );
59
60 virtual ~xAODMenuWriter() override = default;
61
63 virtual StatusCode initialize() override;
64
66 virtual StatusCode execute(const EventContext& ctx) const override;
67
68 private:
69
70 SG::ReadHandleKey<TrigConf::HLTMenu> m_HLTMenuKey {this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu",
71 "HLT Menu key"};
72
73 SG::ReadHandleKey<TrigConf::HLTMonitoring> m_HLTMonitoringKey {this, "HLTMonitoringMenu", "DetectorStore+HLTMonitoringMenu",
74 "HLT Monitoring key"};
75
76 SG::ReadHandleKey<TrigConf::L1Menu> m_L1MenuKey {this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu",
77 "L1 Menu key"};
78
80 "HLT prescales set condition handle"};
81
83 "L1 prescales set condition handle"};
84
86 "L1BunchGroupSet condition handl"};
87
88 Gaudi::Property< std::string > m_metaNameJSON_hlt {this, "JSONMetaObjectNameHLT", "TriggerMenuJson_HLT",
89 "StoreGate key for the xAOD::TriggerMenuJson HLT configuration object"};
90
91 Gaudi::Property< std::string > m_metaNameJSON_hltmonitoring {this, "JSONMetaObjectNameHLTMonitoring", "TriggerMenuJson_HLTMonitoring",
92 "StoreGate key for the xAOD::TriggerMenuJson HLT Monitoring configuration object"};
93
94 Gaudi::Property< std::string > m_metaNameJSON_l1 {this, "JSONMetaObjectNameL1", "TriggerMenuJson_L1",
95 "StoreGate key for the xAOD::TriggerMenuJson L1 configuration object"};
96
97 Gaudi::Property< std::string > m_metaNameJSON_hltps {this, "JSONMetaObjectNameHLTPS", "TriggerMenuJson_HLTPS",
98 "StoreGate key for the xAOD::TriggerMenuJson HLT prescales configuration object"};
99
100 Gaudi::Property< std::string > m_metaNameJSON_l1ps {this, "JSONMetaObjectNameL1PS", "TriggerMenuJson_L1PS",
101 "StoreGate key for the xAOD::TriggerMenuJson L1 prescales configuration object"};
102
103 Gaudi::Property< std::string > m_metaNameJSON_bg {this, "JSONMetaObjectNameBunchgroup", "TriggerMenuJson_BG",
104 "StoreGate key for the xAOD::TriggerMenuJson BunchGroup configuration object"};
105
106 ServiceHandle< StoreGateSvc > m_metaStore {this, "MetaDataStore", "StoreGateSvc/MetaDataStore",
107 "The MetaDataStore"};
108
109 ToolHandle<IKeyWriterTool> m_keyWriterTool{this, "KeyWriterTool", "KeyWriterTool/OfflineKeyWriterTool",
110 "Writes the keys which are configured when the trigger configuration is written to in-file metadata."};
111
113 typedef std::pair< uint32_t, std::pair< uint32_t, uint32_t > > TrigKey_t;
114
115 // The configuration objects that we are writing
117 mutable xAOD::TriggerMenuJsonContainer* m_menuJSON_hltmonitoring ATLAS_THREAD_SAFE {};
122
124 mutable std::set< uint32_t > m_converted_smk ATLAS_THREAD_SAFE;
125 mutable std::set< uint32_t > m_converted_hltpsk ATLAS_THREAD_SAFE;
126 mutable std::set< uint32_t > m_converted_l1psk ATLAS_THREAD_SAFE;
127 mutable std::set< uint32_t > m_converted_bg ATLAS_THREAD_SAFE;
128
130 mutable std::mutex m_mutex;
131
132 }; // class xAODMenuWriter
133
134} // namespace TrigConf
135
136#endif // TRIGCONFXAOD_XAODMENUWRITER_H
Define macros for attributes used to control the static checker.
An algorithm that can be simultaneously executed in multiple threads.
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::ReadHandleKey< TrigConf::HLTMenu > m_HLTMenuKey
SG::ReadHandleKey< TrigConf::HLTMonitoring > m_HLTMonitoringKey
ToolHandle< IKeyWriterTool > m_keyWriterTool
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
SG::ReadCondHandleKey< TrigConf::HLTPrescalesSet > m_HLTPrescaleSetInputKey
Gaudi::Property< std::string > m_metaNameJSON_bg
virtual StatusCode initialize() override
Function initialising the algorithm.
SG::ReadCondHandleKey< TrigConf::L1PrescalesSet > m_L1PrescaleSetInputKey
Gaudi::Property< std::string > m_metaNameJSON_hltps
Gaudi::Property< std::string > m_metaNameJSON_hlt
std::mutex m_mutex
The mutex to prevent us from writing more than one configuration at a time.
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSet > m_bgInputKey
std::pair< uint32_t, std::pair< uint32_t, uint32_t > > TrigKey_t
Trigger configuration key type (used just internally)
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Gaudi::Property< std::string > m_metaNameJSON_l1ps
Gaudi::Property< std::string > m_metaNameJSON_l1
ServiceHandle< StoreGateSvc > m_metaStore
virtual ~xAODMenuWriter() override=default
xAODMenuWriter(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Gaudi::Property< std::string > m_metaNameJSON_hltmonitoring
xAOD::TriggerMenuJsonContainer *m_menuJSON_hlt ATLAS_THREAD_SAFE
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
TriggerMenuJsonContainer_v1 TriggerMenuJsonContainer