ATLAS Offline Software
Loading...
Searching...
No Matches
TileRawData.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//*****************************************************************************
6// Filename : TileRawData.cxx
7// Author : Alexandre Solodkov
8// Created : Oct, 2002
9//
10// DESCRIPTION:
11// Implementation comments only. Class level comments go in .h file.
12//
13// HISTORY:
14// 02Oct02: Created
15//
16// BUGS:
17//
18//
19//
20//*****************************************************************************
21
24
26
27#include <iostream>
28#include <sstream>
29#include <iomanip>
30
31// get cabling
32namespace {
33const TileCablingService * const s_cabling = TileCablingService::getInstance();
34}
35
37 : m_adc_hwid (s_cabling->s2h_adc_id(id))
38{
39}
40
42{
43 std::cout << (std::string) (*this) << std::endl;
44}
45
46TileRawData::operator std::string() const
47{
48 std::string result(whoami());
49 result += " Id = " + s_cabling->getTileHWID()->to_string(m_adc_hwid);
50 return result;
51}
52
54 return s_cabling->h2s_adc_id(m_adc_hwid);
55}
56
58 return s_cabling->h2s_pmt_id(m_adc_hwid);
59}
60
62 return s_cabling->h2s_cell_id(m_adc_hwid);
63}
64
66 return s_cabling->h2s_cell_id_index(m_adc_hwid, index, pmt);
67}
68
70 return s_cabling->pmt2tt_id(adc_ID());
71}
72
74 return s_cabling->pmt2mt_id(adc_ID());
75}
76
77int TileRawData::frag_ID(void) const {
78 return s_cabling->frag(m_adc_hwid);
79}
80
81void TileRawData::print_to_stream ( const std::vector<float>& val,
82 const std::string & label,
83 std::ostringstream & text)
84{
85 text << label;
86 for (float v : val) {
87 text << " " << v;
88 }
89}
90
91
92void TileRawData::print_to_stream ( const std::vector<double>& val,
93 const std::string & label,
94 std::ostringstream & text)
95{
96 text << label;
97 for (double v : val) {
98 text << " " << v;
99 }
100}
101
102void TileRawData::print_to_stream ( const std::vector<uint32_t>& val,
103 const std::string & label,
104 std::ostringstream & text)
105{
106 text << label;
107 for (uint32_t v : val) {
108 text << " " << v;
109 }
110}
111
static const TileCablingService * getInstance()
get pointer to service instance
Identifier cell_ID_index(int &index, int &pmt) const
Identifier mt_ID(void) const
Identifier pmt_ID(void) const
Identifier adc_ID(void) const
virtual std::string whoami(void) const
Definition TileRawData.h:63
int frag_ID(void) const
Identifier cell_ID(void) const
virtual void print(void) const
HWIdentifier m_adc_hwid
Definition TileRawData.h:82
static void print_to_stream(const std::vector< float > &val, const std::string &label, std::ostringstream &text)
Identifier tt_ID(void) const
std::string label(const std::string &format, int i)
Definition label.h:19
Definition index.py:1