ATLAS Offline Software
Loading...
Searching...
No Matches
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
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
110{
111 std::cout << (std::string) (*this) << std::endl;
112}
113
114TileDigits::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
125
126 return text.str();
127}
void print(void) const
std::vector< float > m_digits
Definition TileDigits.h:84
static void print_to_stream(const std::vector< float > &val, const std::string &label, std::ostringstream &text)
STL namespace.