ATLAS Offline Software
Loading...
Searching...
No Matches
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
13using namespace std;
14
15//--------------------------------------------------------------------------------------
17 :m_word(3, 0)
18{
19}
20
21//--------------------------------------------------------------------------------------
22TrigMonROB::TrigMonROB(uint32_t requestor_id,
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//--------------------------------------------------------------------------------------
34const 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//--------------------------------------------------------------------------------------
49void TrigMonROB::print(std::ostream &os) const
50{
51 os << str(*this) << "\n";
52}
53
54//--------------------------------------------------------------------------------------
55std::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}
std::vector< uint32_t > m_word
Definition TrigMonROB.h:64
uint32_t getRequestorId() const
Definition TrigMonROB.h:45
const std::vector< TrigMonROBSum > getSum() const
void print(std::ostream &os=std::cout) const
double getTimer() const
Definition TrigMonROB.h:46
STL namespace.