ATLAS Offline Software
Loading...
Searching...
No Matches
TrigT2MbtsBits_v1.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5
7
9//#include "GaudiKernel/MsgStream.h"
10#include <iostream>
11#include <sstream>
12
13namespace xAOD {
14
18
20
21 // Simple debug method using MsgStream
22 void TrigT2MbtsBits_v1::print(void) const {
23
24 std::cout << "triggerEnergies = { ";
25 for (float x : triggerEnergies()) {
26 std::cout << x << " ";
27 }
28 std::cout << " }" << std::endl;
29
30 for (float x : triggerTimes()) {
31 std::cout << x << " ";
32 }
33 std::cout << " }" << std::endl;
34 }
35
36// Simple string conversion method.
37std::string str(const TrigT2MbtsBits_v1& trigT2MbtsBits) {
38
39 std::stringstream sstream;
40 std::vector<float> counterValues;
41 std::vector<float>::const_iterator itr;
42 std::vector<float>::const_iterator itr_end;
43
44 counterValues = trigT2MbtsBits.triggerEnergies();
45 itr = counterValues.begin();
46 itr_end = counterValues.end();
47 sstream << "triggerEnergies = { ";
48 for(;itr != itr_end; ++itr) {
49 sstream << (*itr) << " ";
50 }
51 sstream << " }" << std::endl;
52
53 counterValues = trigT2MbtsBits.triggerTimes();
54 itr = counterValues.begin();
55 itr_end = counterValues.end();
56 sstream << "triggerTimes = { ";
57 for(;itr != itr_end; ++itr) {
58 sstream << (*itr) << " ";
59 }
60 sstream << "}";
61
62 return sstream.str();
63 }
64
65#if 0
66 MsgStream& operator<< (MsgStream& m, const TrigT2MbtsBits_v1& trigT2MbtsBits) {
67 return (m << str(trigT2MbtsBits));
68 }
69#endif // 0
70
71 // Simple accessor functions for the "default variable" access pattern
72
73 AUXSTORE_OBJECT_SETTER_AND_GETTER (TrigT2MbtsBits_v1, std::vector<float>, triggerEnergies, setTriggerEnergies)
74 AUXSTORE_OBJECT_SETTER_AND_GETTER (TrigT2MbtsBits_v1, std::vector<float>, triggerTimes, setTriggerTimes)
75}
76
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
#define x
AuxElement()
Default constructor.
void print(void) const
Prints out data members to std::cout.
const std::vector< float > & triggerEnergies() const
Return the trigger energies of each counter.
const std::vector< float > & triggerTimes() const
Return the relative times of the triggers.
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
std::ostream & operator<<(std::ostream &out, const std::pair< FIRST, SECOND > &pair)
Helper print operator.