ATLAS Offline Software
Loading...
Searching...
No Matches
L1PrescalesSet.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_L1PRESCALESSET_H
6#define TRIGCONFDATA_L1PRESCALESSET_H
7
9
10#include <map>
11
12namespace TrigConf {
13
19 class L1PrescalesSet final : public DataStructure {
20 public:
21
22 struct L1Prescale {
23 uint32_t cut { 1 };
24 bool enabled { false };
25 double prescale { 1 };
26 };
27
28 double getPrescaleFromCut(uint32_t cut) const;
29
32 L1PrescalesSet(const L1PrescalesSet &) = default;
34
38 L1PrescalesSet(const ptree & data);
39
41 virtual ~L1PrescalesSet() override = default;
42
43 // class name
44 virtual std::string className() const override {
45 return "L1PrescaleSet";
46 }
47
49 std::size_t size() const;
50
52 unsigned int psk() const;
53 void setPSK(unsigned int psk);
54
55 const L1Prescale & prescale(const std::string & itemName) const;
56 const std::map<std::string, L1Prescale>& prescales() const;
57
59 virtual void clear() override;
60
61 private:
62
64 virtual void update() override { load(); };
65 void load();
66
68 unsigned int m_psk {0};
69
70 // maps L1 item names to prescales
71 std::map<std::string, L1Prescale> m_prescales;
72
73 };
74}
75
76#ifndef TRIGCONF_STANDALONE
77#ifndef XAOD_STANDALONE
78
80CLASS_DEF( TrigConf::L1PrescalesSet , 146597935 , 1 )
81
82#include "AthenaKernel/CondCont.h"
84
85#endif
86#endif
87
88#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
L1 menu configuration.
std::map< std::string, L1Prescale > m_prescales
unsigned int m_psk
the prescale key
L1PrescalesSet(L1PrescalesSet &&)=default
std::size_t size() const
number of L1 prescales
virtual void update() override
Update the internal prescale map after modification of the data object.
virtual std::string className() const override
A string that is the name of the class.
virtual void clear() override
Clearing the configuration data.
unsigned int psk() const
setter and getter for the L1 prescale key
virtual ~L1PrescalesSet() override=default
Destructor.
const L1Prescale & prescale(const std::string &itemName) const
void setPSK(unsigned int psk)
const std::map< std::string, L1Prescale > & prescales() const
double getPrescaleFromCut(uint32_t cut) const
prescale = 2*24/(cut+1.)
L1PrescalesSet(const L1PrescalesSet &)=default
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22