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