ATLAS Offline Software
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 
13 namespace xAOD {
14 
16  : SG::AuxElement() {
17  }
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.
37 std::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 
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
AuxStoreAccessorMacros.h
xAOD::TrigT2MbtsBits_v1::TrigT2MbtsBits_v1
TrigT2MbtsBits_v1()
default ctor
Definition: TrigT2MbtsBits_v1.cxx:15
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
x
#define x
xAOD::TrigT2MbtsBits_v1
Definition: TrigT2MbtsBits_v1.h:14
xAOD::TrigT2MbtsBits_v1::print
void print(void) const
Prints out data members to std::cout.
Definition: TrigT2MbtsBits_v1.cxx:22
xAOD::str
std::string str(const TrigT2MbtsBits_v1 &trigT2MbtsBits)
Definition: TrigT2MbtsBits_v1.cxx:37
TrigT2MbtsBits_v1.h
xAOD::TrigT2MbtsBits_v1::triggerTimes
const std::vector< float > & triggerTimes() const
Return the relative times of the triggers.
xAOD::TrigT2MbtsBits_v1::triggerEnergies
const std::vector< float > & triggerEnergies() const
Return the trigger energies of each counter.
xAOD::operator<<
std::ostream & operator<<(std::ostream &out, const std::pair< FIRST, SECOND > &pair)
Helper print operator.
Definition: RDataSource.cxx:53
xAOD::AUXSTORE_OBJECT_SETTER_AND_GETTER
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
Definition: CaloRings_v1.cxx:27
xAOD::TrigT2MbtsBits_v1::~TrigT2MbtsBits_v1
~TrigT2MbtsBits_v1()
Definition: TrigT2MbtsBits_v1.cxx:19