ATLAS Offline Software
TileDigits.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 //*****************************************************************************
6 // Filename : TileDigit.cxx
7 // Author : Chicago( Merritt)
8 // Created : May, 2002
9 //
10 // DESCRIPTION:
11 // Implementation comments only. Class level comments go in .h file.
12 //
13 // HISTORY:
14 // 16May02: Created for DC1 and HLT tests.
15 //
16 // BUGS:
17 //
18 //
19 //
20 //*****************************************************************************
21 
22 #include "TileEvent/TileDigits.h"
23 
24 #include <iostream>
25 #include <sstream>
26 #include <iomanip>
27 
29  const std::vector<double>& digits )
30 
31  : TileRawData( id )
32 {
33 
34  m_digits.reserve(digits.size());
35 
36  std::vector<double>::const_iterator it1=digits.begin();
37  std::vector<double>::const_iterator it2=digits.end();
38 
39  float dig;
40  for ( ; it1!=it2; ++it1) {
41  dig = (*it1);
42  m_digits.push_back(dig);
43  }
44 
45 }
46 
48  const std::vector<double>& digits )
49 
50  : TileRawData( HWid )
51 {
52 
53  m_digits.reserve(digits.size());
54 
55  std::vector<double>::const_iterator it1=digits.begin();
56  std::vector<double>::const_iterator it2=digits.end();
57 
58  float dig;
59  for ( ; it1!=it2; ++it1) {
60  dig = (*it1);
61  m_digits.push_back(dig);
62  }
63 
64 }
65 
67  const std::vector<short>& digits )
68 
69  : TileRawData( HWid )
70 {
71  m_digits.reserve(digits.size());
72 
73  std::vector<short>::const_iterator it1=digits.begin();
74  std::vector<short>::const_iterator it2=digits.end();
75 
76  float dig;
77  for ( ; it1!=it2; ++it1) {
78  dig = (*it1);
79  m_digits.push_back(dig);
80  }
81 }
82 
84  const std::vector<float>& digits )
85 
86  : TileRawData( id )
87  , m_digits ( digits )
88 {
89 }
90 
92  const std::vector<float>& digits )
93 
94  : TileRawData( HWid )
95  , m_digits ( digits )
96 {
97 }
98 
99 
101  std::vector<float>&& digits )
102 
103  : TileRawData( HWid )
104  , m_digits ( std::move(digits) )
105 {
106 }
107 
108 
109 void TileDigits::print() const
110 {
111  std::cout << (std::string) (*this) << std::endl;
112 }
113 
114 TileDigits::operator std::string() const
115 {
116  std::ostringstream text(std::ostringstream::out);
117 
118  text << TileRawData::operator std::string();
119 
120  text << std::setiosflags( std::ios::fixed );
121  text << std::setiosflags( std::ios::showpoint );
122  text << std::setprecision(2);
123 
124  TileRawData::print_to_stream(m_digits," Val:",text);
125 
126  return text.str();
127 }
TileDigits::TileDigits
TileDigits()
Definition: TileDigits.h:35
TileDigits::m_digits
std::vector< float > m_digits
Definition: TileDigits.h:84
TileRawData::print_to_stream
static void print_to_stream(const std::vector< float > &val, const std::string &label, std::ostringstream &text)
Definition: TileRawData.cxx:81
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
TileDigits::print
void print(void) const
Definition: TileDigits.cxx:109
HWIdentifier
Definition: HWIdentifier.h:13
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
DetDescrDictionaryDict::it1
std::vector< HWIdentifier >::iterator it1
Definition: DetDescrDictionaryDict.h:17
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:191
TileRawData
Definition: TileRawData.h:34
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
TileDigits.h