ATLAS Offline Software
HLTPrescaleSet.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigConf_HLTPrescaleSet
6 #define TrigConf_HLTPrescaleSet
7 
8 #include <iosfwd>
9 #include <string>
10 #include <vector>
11 #include <utility>
12 #include <array>
13 #include <stdint.h>
14 
18 
19 #include <unordered_map>
20 
21 
22 namespace TrigConf {
23  class HLTPrescaleSet;
24 }
25 
26 namespace TrigConf {
27 
28  std::ostream & operator<<(std::ostream &, const TrigConf::HLTPrescaleSet &);
29 
31  class HLTPrescaleSet : public TrigConfData {
32  public:
33 
34  typedef std::unordered_map<unsigned int, HLTPrescale> ScalingMap_t;
35 
38 
40  virtual ~HLTPrescaleSet() override = default;
41 
42  HLTPrescale& setPrescale(const HLTPrescale& sc, unsigned int chain_counter, HLTLevel level = HLT);
43 
44  const HLTPrescale& getPrescale(unsigned int chain_counter, HLTLevel level = HLT) const;
45 
46  bool hasPrescale( unsigned int counter, TrigConf::HLTLevel level = HLT ) const;
47 
48  HLTPrescale& thePrescale(unsigned int chain_counter, HLTLevel level);
49 
50  const ScalingMap_t& getPrescales(HLTLevel level) const { return m_scalers[static_cast<unsigned int>(level)]; }
51 
52  size_t size(HLTLevel level=HLT) const { return m_scalers[static_cast<unsigned int>(level)].size(); }
53 
54  void reset();
55 
57  void print(const std::string& indent="", unsigned int detail=1) const override;
58 
60  void setIOV(uint32_t start_run, uint32_t start_lb, uint32_t end_run, uint32_t end_lb );
62 
64  void getIOV(uint32_t& start_run, uint32_t& start_lb, uint32_t& end_run, uint32_t& end_lb ) const;
65 
67  bool isValid(uint32_t run, uint32_t lb ) const;
68 
69  std::string __str__() const override;
70 
71  private:
72  std::array<ScalingMap_t, 3> m_scalers;
73 
76 
77  friend std::ostream & operator<<(std::ostream &, const TrigConf::HLTPrescaleSet &);
78  };
79 
80 }
81 
82 #endif
TrigConf::HLTPrescale
Definition: HLTPrescale.h:26
HLTLevel.h
TrigConf::operator<<
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
Definition: L1ThresholdBase.cxx:339
TrigConf::HLTPrescaleSet::operator<<
friend std::ostream & operator<<(std::ostream &, const TrigConf::HLTPrescaleSet &)
TrigConf::HLTPrescaleSet::hasPrescale
bool hasPrescale(unsigned int counter, TrigConf::HLTLevel level=HLT) const
Definition: HLTPrescaleSet.cxx:35
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TrigConf::HLTPrescaleSet::m_iovstart
uint64_t m_iovstart
Definition: HLTPrescaleSet.h:74
TrigConf::HLTPrescaleSet::HLTPrescaleSet
HLTPrescaleSet()
default constructor
Definition: HLTPrescaleSet.cxx:16
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
TrigConf::HLTPrescaleSet::print
void print(const std::string &indent="", unsigned int detail=1) const override
print the prescale set
Definition: HLTPrescaleSet.cxx:105
HLTPrescale.h
detail
Definition: extract_histogram_tag.cxx:14
TrigConf::HLTPrescaleSet::setPrescale
HLTPrescale & setPrescale(const HLTPrescale &sc, unsigned int chain_counter, HLTLevel level=HLT)
Definition: HLTPrescaleSet.cxx:22
TrigConf::HLTPrescaleSet::m_scalers
std::array< ScalingMap_t, 3 > m_scalers
Definition: HLTPrescaleSet.h:72
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
python.iconfTool.models.loaders.level
level
Definition: loaders.py:20
TrigConf::HLTPrescaleSet::thePrescale
HLTPrescale & thePrescale(unsigned int chain_counter, HLTLevel level)
Definition: HLTPrescaleSet.cxx:53
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
TrigConf::HLTPrescaleSet::~HLTPrescaleSet
virtual ~HLTPrescaleSet() override=default
destructor
TrigConf::HLTPrescaleSet::getIOV
void getIOV(uint32_t &start_run, uint32_t &start_lb, uint32_t &end_run, uint32_t &end_lb) const
gets the IOV of the prescale set
Definition: HLTPrescaleSet.cxx:80
TrigConf::HLTPrescaleSet::getPrescales
const ScalingMap_t & getPrescales(HLTLevel level) const
Definition: HLTPrescaleSet.h:50
python.BunchSpacingUtils.lb
lb
Definition: BunchSpacingUtils.py:88
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
TrigConfData.h
TrigConf::TrigConfData
Definition: TrigConfData.h:13
TrigConf::HLTPrescaleSet::getPrescale
const HLTPrescale & getPrescale(unsigned int chain_counter, HLTLevel level=HLT) const
Definition: HLTPrescaleSet.cxx:42
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
run
Definition: run.py:1
TrigConf::HLTPrescaleSet::reset
void reset()
Definition: HLTPrescaleSet.cxx:99
TrigConf::HLTLevel
HLTLevel
Definition: HLTLevel.h:12
TrigConf::HLTPrescaleSet::size
size_t size(HLTLevel level=HLT) const
Definition: HLTPrescaleSet.h:52
TrigConf::HLTPrescaleSet
HLT chain configuration information.
Definition: HLTPrescaleSet.h:31
TrigConf::HLTPrescaleSet::isValid
bool isValid(uint32_t run, uint32_t lb) const
checks if run/lb are in the current IOV
Definition: HLTPrescaleSet.cxx:89
TrigConf::HLTPrescaleSet::ScalingMap_t
std::unordered_map< unsigned int, HLTPrescale > ScalingMap_t
Definition: HLTPrescaleSet.h:34
TrigConf::counter
Definition: HLTChainList.h:37
TrigConf::HLTPrescaleSet::__str__
std::string __str__() const override
Definition: HLTPrescaleSet.cxx:169
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition: TrigConfData.cxx:23
TrigConf::HLTPrescaleSet::m_iovend
uint64_t m_iovend
Definition: HLTPrescaleSet.h:75
TrigConf::HLTPrescaleSet::setIOV
void setIOV(uint32_t start_run, uint32_t start_lb, uint32_t end_run, uint32_t end_lb)
sets the IOV of the prescale set
Definition: HLTPrescaleSet.cxx:65