ATLAS Offline Software
Loading...
Searching...
No Matches
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
18namespace TrigConf {
19 class HLTPrescale;
20}
21
22namespace TrigConf {
23
24 std::ostream & operator<<(std::ostream &, const TrigConf::HLTPrescale &);
25
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;
39 HLTPrescale& operator=(HLTPrescale&&) noexcept = 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
69 };
70
71}
72
73#endif
HLTPrescale & setStreamPrescale(const std::string &streamName, float ps)
PrescaleMap_t m_stream_prescale
Definition HLTPrescale.h:68
float pass_through() const
Definition HLTPrescale.h:53
const PrescaleMap_t & getStreamPrescales() const
Definition HLTPrescale.h:57
HLTPrescale(float prescale=1, float pass_through=-1)
PrescaleMap_t::value_type value_type
Definition HLTPrescale.h:43
HLTPrescale(HLTPrescale &&o) noexcept=default
HLTPrescale & operator=(HLTPrescale &&) noexcept=default
HLTPrescale & setRerunPrescale(const std::string &targetName, float ps)
std::string __str__() const
PrescaleMap_t m_rerun_prescale
Definition HLTPrescale.h:67
HLTPrescale & operator=(const HLTPrescale &)=default
HLTPrescale & setPassThrough(float pass_through)
Definition HLTPrescale.h:47
const PrescaleMap_t & getRerunPrescales() const
Definition HLTPrescale.h:56
std::pair< bool, float > getRerunPrescale(const std::string &targetName) const
std::unordered_map< std::string, float > PrescaleMap_t
Definition HLTPrescale.h:42
HLTPrescale & setPrescale(float prescale)
Definition HLTPrescale.h:46
float prescale() const
Definition HLTPrescale.h:52
HLTPrescale(const HLTPrescale &o)=default
bool disabled() const
Definition HLTPrescale.h:59
std::pair< bool, float > getStreamPrescale(const std::string &streamName) const
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.