ATLAS Offline Software
Loading...
Searching...
No Matches
L1PrescaleCondAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGCONFIGSVC__L1PRESCALECONDALG
6#define TRIGCONFIGSVC__L1PRESCALECONDALG
7
10
14
16
17#include <tbb/concurrent_unordered_map.h>
18
19#include <memory>
20
21namespace TrigConf {
22
34 public:
35 L1PrescaleCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
36 virtual ~L1PrescaleCondAlg() override = default;
37
38 virtual StatusCode initialize() override;
39 virtual StatusCode execute(const EventContext& ctx) const override;
40
41 private:
42
43 // helper function to load a L1 prescales set from a file
44 std::shared_ptr<L1PrescalesSet> createFromFile( const std::string & filename ) const;
45
46 // helper function to load a L1 prescales set from a prescale key
47 std::shared_ptr<L1PrescalesSet> createFromDB( unsigned int psk, bool isRun3 ) const;
48
49 // map the prescale key to a L1PrescalesSet
50 mutable tbb::concurrent_unordered_map<unsigned int, std::shared_ptr<const L1PrescalesSet>> m_pssMap ATLAS_THREAD_SAFE;
51
52 // input key to the L1 Prescale Key folder
53 SG::ReadCondHandleKey<AthenaAttributeList> m_pskFolderInputKey{ this, "PSKFolder", "/TRIGGER/LVL1/Lvl1ConfigKey", "SG Key of AthenaAttributeList containing l1 psk"};
54
55 // output key to store the L1PrescalesSet
56 SG::WriteCondHandleKey<TrigConf::L1PrescalesSet> m_l1PrescalesSetOutputKey{ this, "L1Prescales", "L1Prescales", "L1 prescales"};
57
58 // properties
59 Gaudi::Property< std::string > m_configSource { this, "Source", "FILE", "Configuration source, can be 'FILE', 'DB', or 'COOL'" };
60 Gaudi::Property< std::string > m_dbConnection { this, "TriggerDB", "", "DB connection alias or 'JOSVC', used when property Source set to 'DB' or set to 'COOL'." };
61 Gaudi::Property< unsigned int > m_psk { this, "L1Psk", 0, "L1 prescale key, used when property 'Source' set to 'DB' or 'FILE'" };
62 Gaudi::Property< std::string > m_filename { this, "Filename", "", "L1 prescale json file, used when property 'Source' set to 'FILE'" };
63
64 };
65
66}
67#endif
Base class for conditions algorithms.
Define macros for attributes used to control the static checker.
Base class for conditions algorithms.
SG::WriteCondHandleKey< TrigConf::L1PrescalesSet > m_l1PrescalesSetOutputKey
std::shared_ptr< L1PrescalesSet > createFromDB(unsigned int psk, bool isRun3) const
Gaudi::Property< unsigned int > m_psk
virtual StatusCode execute(const EventContext &ctx) const override
std::shared_ptr< L1PrescalesSet > createFromFile(const std::string &filename) const
Gaudi::Property< std::string > m_configSource
Gaudi::Property< std::string > m_filename
tbb::concurrent_unordered_map< unsigned int, std::shared_ptr< const L1PrescalesSet > > m_pssMap ATLAS_THREAD_SAFE
SG::ReadCondHandleKey< AthenaAttributeList > m_pskFolderInputKey
virtual ~L1PrescaleCondAlg() override=default
virtual StatusCode initialize() override
L1PrescaleCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< std::string > m_dbConnection
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22