ATLAS Offline Software
Loading...
Searching...
No Matches
HLTPrescale.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5
6#ifndef TrigConf_HLTPrescale
7#define TrigConf_HLTPrescale
9
11
12#include <iosfwd>
13#include <string>
14#include <string_view>
15#include <map>
16#include <vector>
17#include <utility>
18
19#include <unordered_map>
20
21
22namespace TrigConf {
23 class HLTPrescale;
24}
25
26namespace TrigConf {
27
28 std::ostream & operator<<(std::ostream &, const TrigConf::HLTPrescale &);
29
31 public:
32
33 // constructor
34 HLTPrescale(float prescale=1, float pass_through=-1);
35 HLTPrescale(const HLTPrescale& o) = default;
36 HLTPrescale(HLTPrescale&& o) noexcept = default;
37
38 // destructor
39 ~HLTPrescale() = default;
40
41 // assignment
42 HLTPrescale& operator=(const HLTPrescale&) = default;
43 HLTPrescale& operator=(HLTPrescale&&) noexcept = default;
44
45 // maps for rerun and stream prescales
46 typedef std::unordered_map<std::string, float, CxxUtils::TransparentStringHash, std::equal_to<> > PrescaleMap_t;
48
49 // setters
50 HLTPrescale& setPrescale(float prescale) { m_prescale = prescale; return *this; }
52 HLTPrescale& setRerunPrescale(const std::string& targetName, float ps);
53 HLTPrescale& setStreamPrescale(const std::string& streamName, float ps);
54
55 // getters
56 float prescale() const { return m_prescale; }
57 float pass_through() const { return m_pass_through; }
58 std::pair<bool, float> getRerunPrescale(std::string_view targetName) const;
59 std::pair<bool, float> getStreamPrescale(std::string_view streamName) const;
62
63 bool disabled() const { return m_prescale<0; }
64
65 std::string __str__() const;
66
67 private:
68 // data
73 };
74
75}
76
77#endif
HLTPrescale & setStreamPrescale(const std::string &streamName, float ps)
PrescaleMap_t m_stream_prescale
Definition HLTPrescale.h:72
float pass_through() const
Definition HLTPrescale.h:57
const PrescaleMap_t & getStreamPrescales() const
Definition HLTPrescale.h:61
HLTPrescale(float prescale=1, float pass_through=-1)
PrescaleMap_t::value_type value_type
Definition HLTPrescale.h:47
HLTPrescale(HLTPrescale &&o) noexcept=default
HLTPrescale & operator=(HLTPrescale &&) noexcept=default
HLTPrescale & setRerunPrescale(const std::string &targetName, float ps)
std::pair< bool, float > getRerunPrescale(std::string_view targetName) const
std::string __str__() const
PrescaleMap_t m_rerun_prescale
Definition HLTPrescale.h:71
HLTPrescale & operator=(const HLTPrescale &)=default
HLTPrescale & setPassThrough(float pass_through)
Definition HLTPrescale.h:51
std::pair< bool, float > getStreamPrescale(std::string_view streamName) const
const PrescaleMap_t & getRerunPrescales() const
Definition HLTPrescale.h:60
HLTPrescale & setPrescale(float prescale)
Definition HLTPrescale.h:50
float prescale() const
Definition HLTPrescale.h:56
HLTPrescale(const HLTPrescale &o)=default
bool disabled() const
Definition HLTPrescale.h:63
std::unordered_map< std::string, float, CxxUtils::TransparentStringHash, std::equal_to<> > PrescaleMap_t
Definition HLTPrescale.h:46
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
std::ostream & operator<<(std::ostream &os, const TrigConf::IsolationLegacy &iso)
STL namespace.