ATLAS Offline Software
Loading...
Searching...
No Matches
HLTPrescalesSet.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGCONFDATA_HLTPRESCALESET_H
6#define TRIGCONFDATA_HLTPRESCALESET_H
7
9
10#include <unordered_map>
11
12namespace TrigConf {
13
19 class HLTPrescalesSet final : public DataStructure {
20 public:
21
22 struct HLTPrescale {
23 bool enabled { false }; // chain enabled
24 double prescale { 1 }; // prescale value
25 };
26
29 HLTPrescalesSet(const HLTPrescalesSet &) = default;
31
35 HLTPrescalesSet(const ptree & data);
36
38 virtual ~HLTPrescalesSet() override = default;
39
40 // class name
41 virtual std::string className() const override {
42 return "HLTPrescaleSet";
43 }
44
46 std::size_t size() const;
47
49 unsigned int psk() const;
50 void setPSK(unsigned int psk );
51
53 const HLTPrescale & prescale(const std::string & chainName) const;
54
56 const HLTPrescale & prescale(uint32_t chainHash) const;
57
59 const HLTPrescale & prescale_express(const std::string & chainName) const;
60
62 const HLTPrescale & prescale_express(uint32_t chainHash) const;
63
64 void printPrescaleSet(bool full) const;
65
67 virtual void clear() override;
68
69 private:
70
72 virtual void update() override { load(); };
73 void load();
74
76 unsigned int m_psk {0};
77
78 // maps HLT chain names to prescales
79 std::unordered_map<std::string, HLTPrescale> m_prescales {1024};
80
81 // maps HLT chain hashes to prescales
82 std::unordered_map<uint32_t, HLTPrescale> m_prescalesByHash {1024};
83
84 // maps HLT chain names to express prescales
85 std::unordered_map<std::string, HLTPrescale> m_prescales_express {1024};
86
87 // maps HLT chain hashes to express prescales
88 std::unordered_map<uint32_t, HLTPrescale> m_prescalesByHash_express {1024};
89
90 // default for not in express
92
93 };
94}
95
96#ifndef TRIGCONF_STANDALONE
97#ifndef XAOD_STANDALONE
98
100CLASS_DEF( TrigConf::HLTPrescalesSet , 134177107 , 1 )
101
102#include "AthenaKernel/CondCont.h"
104
105#endif
106#endif
107
108#endif
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
const ptree & data() const
Access to the underlying data, if needed.
DataStructure()
Default constructor, leading to an uninitialized configuration object.
boost::property_tree::ptree ptree
HLT menu configuration.
std::size_t size() const
number of HLT prescales
const HLTPrescale & prescale_express(const std::string &chainName) const
HLT prescales by chain names.
HLTPrescalesSet(const HLTPrescalesSet &)=default
const HLTPrescale & prescale(const std::string &chainName) const
HLT prescales by chain names.
virtual void update() override
Update the internal prescale map after modification of the data object.
std::unordered_map< std::string, HLTPrescale > m_prescales_express
void setPSK(unsigned int psk)
std::unordered_map< uint32_t, HLTPrescale > m_prescalesByHash
virtual std::string className() const override
A string that is the name of the class.
std::unordered_map< std::string, HLTPrescale > m_prescales
unsigned int m_psk
the prescale key
unsigned int psk() const
setter and getter for the HLT prescale key
void printPrescaleSet(bool full) const
HLTPrescalesSet(HLTPrescalesSet &&)=default
virtual void clear() override
Clearing the configuration data.
std::unordered_map< uint32_t, HLTPrescale > m_prescalesByHash_express
virtual ~HLTPrescalesSet() override=default
Destructor.
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22