ATLAS Offline Software
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 
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
CostROSData::m_rosIdToBin
std::map< std::string, int > m_rosIdToBin
Cached mapping of ros id to bin in ROS histograms.
Definition: CostROSData.h:101
AthMsgStreamMacros.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CostROSData::initialize
void initialize(const std::map< std::string, std::vector< uint32_t >> &rosToRobMap)
Create object based on ROS to ROB mapping.
Definition: CostROSData.cxx:8
CostROSData::getBinForROS
int getBinForROS(const std::string &rosName) const
Return cached bin for given ROS name.
Definition: CostROSData.cxx:26
CostROSData::m_rosToRob
std::map< std::string, std::vector< uint32_t > > m_rosToRob
Mapping of ROS corresponding to ROB requests.
Definition: CostROSData.h:99
CostROSData::getNROS
unsigned getNROS() const
Return number of saved unique ROSes.
Definition: CostROSData.h:64
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
CostROSData::getROBForROS
std::vector< uint32_t > getROBForROS(const std::string &rosName) const
Return list of ROBs name for given ROS.
Definition: CostROSData.cxx:45
CostROSData::getROBName
std::string getROBName(uint32_t robId) const
Create ROB name in hex string format.
Definition: CostROSData.cxx:54
CostROSData::getROStoROBMap
const std::map< std::string, std::vector< uint32_t > > & getROStoROBMap() const
Return ROS name to ROB ids map.
Definition: CostROSData.h:70
CostROSData
Caches and propagates event data to be used by monitoring algorithms.
Definition: CostROSData.h:24
CostROSData::getROBtoROSMap
const std::map< uint32_t, std::string > & getROBtoROSMap() const
Return ROB id to ROS name map.
Definition: CostROSData.h:76
CostROSData::msg
MsgStream & msg() const
Logging.
Definition: CostROSData.cxx:60
CostROSData::m_msgStream
boost::thread_specific_ptr< MsgStream > m_msgStream
Definition: CostROSData.h:103
CostROSData::msgLvl
bool msgLvl(const MSG::Level lvl) const
Returns if requested level is same or higher than logging level.
Definition: CostROSData.cxx:68
CostROSData::m_robToRos
std::map< uint32_t, std::string > m_robToRos
Mapping of ROB corresponding to ROS.
Definition: CostROSData.h:100
MsgStream.h
CostROSData::getROSForROB
std::string getROSForROB(uint32_t robId) const
Return ROS name for given ROB.
Definition: CostROSData.cxx:36