ATLAS Offline Software
Loading...
Searching...
No Matches
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
22namespace TrigConf {
23 class HLTPrescaleSet;
24}
25
26namespace TrigConf {
27
28 std::ostream & operator<<(std::ostream &, const TrigConf::HLTPrescaleSet &);
29
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 );
61 void setIOV(uint64_t start, uint64_t end );
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
74 uint64_t m_iovstart;
75 uint64_t m_iovend;
76
77 friend std::ostream & operator<<(std::ostream &, const TrigConf::HLTPrescaleSet &);
78 };
79
80}
81
82#endif
static Double_t sc
HLT chain configuration information.
void print(const std::string &indent="", unsigned int detail=1) const override
print the prescale set
size_t size(HLTLevel level=HLT) const
std::array< ScalingMap_t, 3 > m_scalers
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
HLTPrescaleSet()
default constructor
const ScalingMap_t & getPrescales(HLTLevel level) const
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
friend std::ostream & operator<<(std::ostream &, const TrigConf::HLTPrescaleSet &)
bool isValid(uint32_t run, uint32_t lb) const
checks if run/lb are in the current IOV
virtual ~HLTPrescaleSet() override=default
destructor
std::string __str__() const override
bool hasPrescale(unsigned int counter, TrigConf::HLTLevel level=HLT) const
HLTPrescale & thePrescale(unsigned int chain_counter, HLTLevel level)
HLTPrescale & setPrescale(const HLTPrescale &sc, unsigned int chain_counter, HLTLevel level=HLT)
const HLTPrescale & getPrescale(unsigned int chain_counter, HLTLevel level=HLT) const
std::unordered_map< unsigned int, HLTPrescale > ScalingMap_t
std::ostream & indent(std::ostream &o, int lvl, int size) const
TrigConfData(const std::string &name="")
int lb
Definition globals.cxx:23
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
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)
Definition run.py:1