ATLAS Offline Software
Loading...
Searching...
No Matches
Trigger/TrigConfiguration/TrigConfigSvc/src/BunchGroupCondAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGCONFIGSVC__BUNCHGROUPCONDALG
6#define TRIGCONFIGSVC__BUNCHGROUPCONDALG
7
10
15#include <tbb/concurrent_unordered_map.h>
16
17
18namespace TrigConf {
19
21 public:
22 BunchGroupCondAlg (const std::string& name, ISvcLocator* pSvcLocator);
23 virtual StatusCode initialize() override;
24 virtual StatusCode execute(const EventContext& ctx) const override;
25
26 private:
27 // helper function to load a L1BunchGroupSet set from a file
28 std::shared_ptr<L1BunchGroupSet> createFromFile( const std::string & filename ) const;
29
30 // helper function to load a L1BunchGroupSet
31 std::shared_ptr<L1BunchGroupSet> createFromDB( unsigned int ) const;
32
33 // map the key to a L1BunchGroupSet
34 mutable tbb::concurrent_unordered_map<unsigned int, std::shared_ptr<const L1BunchGroupSet>> m_BgsMap ATLAS_THREAD_SAFE;
35
36 // input key to the BunchGroupKey folder
37 SG::ReadCondHandleKey<AthenaAttributeList> m_bgkFolderInputKey{ this, "BGKFolder", "/TRIGGER/LVL1/BunchGroupKey", "SG Key of AthenaAttributeList bgk"};
38
39 // output key to store the L1BunchGroup
40 SG::WriteCondHandleKey<TrigConf::L1BunchGroupSet> m_l1BunchGroupSetOutputKey{ this, "L1BunchGroup", "L1BunchGroup", "L1 BunchGroups"};
41
42 // properties
43 Gaudi::Property< std::string > m_configSource { this, "Source", "FILE", "Configuration source, can be 'FILE', 'DB', or 'COOL'" };
44 Gaudi::Property< std::string > m_dbConnection { this, "TriggerDB", "", "DB connection alias or 'JOSVC', used when property Source set to 'DB' or set to 'COOL'." };
45 Gaudi::Property< unsigned int > m_bgk { this, "BGSK", 0, "L1 BunchGroup key, used when property 'Source' set to 'DB' or 'FILE'" };
46 Gaudi::Property< std::string > m_filename { this, "Filename", "", "L1BunchGroupSet json file, used when property 'Source' set to 'FILE'" };
47
48
49 };
50
51}
52
53#endif
Base class for conditions algorithms.
An AttributeList represents a logical row of attributes in a metadata table.
Define macros for attributes used to control the static checker.
Base class for conditions algorithms.
tbb::concurrent_unordered_map< unsigned int, std::shared_ptr< const L1BunchGroupSet > > m_BgsMap ATLAS_THREAD_SAFE
SG::WriteCondHandleKey< TrigConf::L1BunchGroupSet > m_l1BunchGroupSetOutputKey
BunchGroupCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
std::shared_ptr< L1BunchGroupSet > createFromFile(const std::string &filename) const
std::shared_ptr< L1BunchGroupSet > createFromDB(unsigned int) const
virtual StatusCode execute(const EventContext &ctx) const override
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22