ATLAS Offline Software
TrigMonROB.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // C/C++
6 #include <iostream>
7 #include <sstream>
8 #include <map>
9 
10 // Local
12 
13 using namespace std;
14 
15 //--------------------------------------------------------------------------------------
17  :m_word(3, 0)
18 {
19 }
20 
21 //--------------------------------------------------------------------------------------
23  long int start_sec,
24  long int start_usec,
25  long int stop_sec,
26  long int stop_usec)
27 {
28  m_word.push_back(requestor_id);
29  m_word.push_back(TrigMonTimer(start_sec, start_usec).getEncoded());
30  m_word.push_back(TrigMonTimer(stop_sec, stop_usec).getEncoded());
31 }
32 
33 //--------------------------------------------------------------------------------------
34 const std::vector<TrigMonROBSum> TrigMonROB::getSum() const
35 {
36  //
37  // Converted encoded words to TrigMonROBSum
38  //
39  std::vector<TrigMonROBSum> svec;
40 
41  for(unsigned int i = 3; i < m_word.size(); ++i) {
42  svec.push_back(TrigMonROBSum(m_word[i]));
43  }
44 
45  return svec;
46 }
47 
48 //--------------------------------------------------------------------------------------
49 void TrigMonROB::print(std::ostream &os) const
50 {
51  os << str(*this) << "\n";
52 }
53 
54 //--------------------------------------------------------------------------------------
55 std::string str(const TrigMonROB &o)
56 {
57  std::stringstream s;
58  s << "TrigMonROB: requester id=" << o.getRequestorId()
59  << " timer=" << o.getTimer();
60 
61  return s.str();
62 }
TrigMonROBSum
Definition: TrigMonROBSum.h:25
TrigMonROB::m_word
std::vector< uint32_t > m_word
Definition: TrigMonROB.h:64
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
TrigMonROB.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
TrigMonROB::getSum
const std::vector< TrigMonROBSum > getSum() const
Definition: TrigMonROB.cxx:34
TrigMonROB::TrigMonROB
TrigMonROB()
Definition: TrigMonROB.cxx:16
TrigMonTimer
Definition: TrigMonTimer.h:27
TrigMonROB::print
void print(std::ostream &os=std::cout) const
Definition: TrigMonROB.cxx:49
str
std::string str(const TrigMonROB &o)
Definition: TrigMonROB.cxx:55
TrigMonROB
Definition: TrigMonROB.h:30
lumiFormat.i
int i
Definition: lumiFormat.py:92
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
TrigMonROB::getTimer
double getTimer() const
Definition: TrigMonROB.h:46
TrigMonROB::getRequestorId
uint32_t getRequestorId() const
Definition: TrigMonROB.h:45