ATLAS Offline Software
Loading...
Searching...
No Matches
HLTPrescale.cxx
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
11
12#include <iomanip>
13#include <iostream>
14using namespace std;
15using namespace TrigConf;
16
21
22
24TrigConf::HLTPrescale::setStreamPrescale(const std::string& streamName, float ps) {
25 m_stream_prescale[streamName] = ps;
26 return *this;
27}
28
30TrigConf::HLTPrescale::setRerunPrescale(const std::string& targetName, float ps) {
31 m_rerun_prescale[targetName] = ps;
32 return *this;
33}
34
35std::pair<bool, float>
36TrigConf::HLTPrescale::getRerunPrescale(std::string_view targetName) const {
37 PrescaleMap_t::const_iterator i = m_rerun_prescale.find(targetName);
38 bool found = (i!=m_rerun_prescale.end());
39 float ps = found ? i->second : 0;
40 return std::make_pair(found,ps);
41}
42
43std::pair<bool, float>
44TrigConf::HLTPrescale::getStreamPrescale(std::string_view streamName) const {
45 PrescaleMap_t::const_iterator i = m_stream_prescale.find(streamName);
46 bool found = i!=m_stream_prescale.end();
47 float ps = found ? i->second : 0;
48 return std::make_pair(found,ps);
49}
50
51
52//________________________________________________________________________________
53std::ostream&
54TrigConf::operator<<(std::ostream & o, const TrigConf::HLTPrescale & c) {
55
56 o << "Prescale: " << setw(4) << c.prescale()
57 << ", pass-through: " << setw(4) << c.pass_through()
58 << endl;
59 return o;
60}
61
62
63string HLTPrescale::__str__() const {
64 stringstream s;
65 s << *this;
66 return s.str();
67}
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
HLTPrescale(float prescale=1, float pass_through=-1)
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
std::pair< bool, float > getStreamPrescale(std::string_view streamName) const
float prescale() const
Definition HLTPrescale.h:56
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.