ATLAS Offline Software
Loading...
Searching...
No Matches
CostROSData.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 TRIGCOSTANALYSIS_COSTROSDATA_H
6#define TRIGCOSTANALYSIS_COSTROSDATA_H 1
7
10
11#include <boost/thread/tss.hpp>
12
13#include <map>
14#include <vector>
15
23
25 public:
26
30 void initialize(const std::map<std::string, std::vector<uint32_t>>& rosToRobMap);
31
37 int getBinForROS(const std::string& rosName) const;
38
44 std::string getROSForROB(uint32_t robId) const;
45
51 std::vector<uint32_t> getROBForROS(const std::string& rosName) const;
52
58 std::string getROBName(uint32_t robId) const;
59
64 unsigned getNROS() const {return m_rosIdToBin.size();}
65
70 const std::map<std::string, std::vector<uint32_t>>& getROStoROBMap() const {return m_rosToRob;}
71
76 const std::map<uint32_t, std::string>& getROBtoROSMap() const {return m_robToRos;}
77
82 MsgStream& msg() const;
83
89 MsgStream& msg(const MSG::Level lvl) const;
90
96 bool msgLvl(const MSG::Level lvl) const;
97
98 private:
99 std::map<std::string, std::vector<uint32_t>> m_rosToRob ;
100 std::map<uint32_t, std::string> m_robToRos;
101 std::map<std::string, int> m_rosIdToBin;
102
103 mutable boost::thread_specific_ptr<MsgStream> m_msgStream;
104};
105
106#endif // TRIGCOSTANALYSIS_COSTROSDATA_H
Caches and propagates event data to be used by monitoring algorithms.
Definition CostROSData.h:24
std::map< uint32_t, std::string > m_robToRos
Mapping of ROB corresponding to ROS.
const std::map< uint32_t, std::string > & getROBtoROSMap() const
Return ROB id to ROS name map.
Definition CostROSData.h:76
int getBinForROS(const std::string &rosName) const
Return cached bin for given ROS name.
boost::thread_specific_ptr< MsgStream > m_msgStream
bool msgLvl(const MSG::Level lvl) const
Returns if requested level is same or higher than logging level.
std::string getROBName(uint32_t robId) const
Create ROB name in hex string format.
std::map< std::string, int > m_rosIdToBin
Cached mapping of ros id to bin in ROS histograms.
std::vector< uint32_t > getROBForROS(const std::string &rosName) const
Return list of ROBs name for given ROS.
const std::map< std::string, std::vector< uint32_t > > & getROStoROBMap() const
Return ROS name to ROB ids map.
Definition CostROSData.h:70
std::string getROSForROB(uint32_t robId) const
Return ROS name for given ROB.
std::map< std::string, std::vector< uint32_t > > m_rosToRob
Mapping of ROS corresponding to ROB requests.
Definition CostROSData.h:99
unsigned getNROS() const
Return number of saved unique ROSes.
Definition CostROSData.h:64
MsgStream & msg() const
Logging.
void initialize()