ATLAS Offline Software
Loading...
Searching...
No Matches
TileDigits Class Reference

#include <TileDigits.h>

Inheritance diagram for TileDigits:
Collaboration diagram for TileDigits:

Public Member Functions

 TileDigits ()
 TileDigits (const HWIdentifier &HWid, const std::vector< double > &digits)
 TileDigits (const Identifier &id, const std::vector< double > &digits)
 TileDigits (const HWIdentifier &HWid, const std::vector< short > &digits)
 TileDigits (const HWIdentifier &HWid, const std::vector< float > &digits)
 TileDigits (const HWIdentifier &HWid, std::vector< float > &&digits)
 TileDigits (const Identifier &id, const std::vector< float > &digits)
int nsamples () const
const std::vector< float > & samples () const
int NtimeSamples (void) const
std::vector< double > get_digits (void) const
std::string whoami (void) const
void print (void) const
 operator std::string () const
Identifier identify (void) const
HWIdentifier adc_HWID (void) const
Identifier adc_ID (void) const
Identifier pmt_ID (void) const
Identifier cell_ID (void) const
Identifier cell_ID_index (int &index, int &pmt) const
Identifier tt_ID (void) const
Identifier mt_ID (void) const
int frag_ID (void) const

Static Public Member Functions

static void print_to_stream (const std::vector< float > &val, const std::string &label, std::ostringstream &text)
static void print_to_stream (const std::vector< double > &val, const std::string &label, std::ostringstream &text)
static void print_to_stream (const std::vector< uint32_t > &val, const std::string &label, std::ostringstream &text)

Private Attributes

std::vector< float > m_digits
HWIdentifier m_adc_hwid

Detailed Description

Definition at line 29 of file TileDigits.h.

Constructor & Destructor Documentation

◆ TileDigits() [1/7]

TileDigits::TileDigits ( )
inline

Definition at line 35 of file TileDigits.h.

35{ }

◆ TileDigits() [2/7]

TileDigits::TileDigits ( const HWIdentifier & HWid,
const std::vector< double > & digits )

Definition at line 47 of file TileDigits.cxx.

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}
std::vector< float > m_digits
Definition TileDigits.h:84

◆ TileDigits() [3/7]

TileDigits::TileDigits ( const Identifier & id,
const std::vector< double > & digits )

Definition at line 28 of file TileDigits.cxx.

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}

◆ TileDigits() [4/7]

TileDigits::TileDigits ( const HWIdentifier & HWid,
const std::vector< short > & digits )

Definition at line 66 of file TileDigits.cxx.

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}

◆ TileDigits() [5/7]

TileDigits::TileDigits ( const HWIdentifier & HWid,
const std::vector< float > & digits )

Definition at line 91 of file TileDigits.cxx.

94 : TileRawData( HWid )
95 , m_digits ( digits )
96{
97}

◆ TileDigits() [6/7]

TileDigits::TileDigits ( const HWIdentifier & HWid,
std::vector< float > && digits )

Definition at line 100 of file TileDigits.cxx.

103 : TileRawData( HWid )
104 , m_digits ( std::move(digits) )
105{
106}

◆ TileDigits() [7/7]

TileDigits::TileDigits ( const Identifier & id,
const std::vector< float > & digits )

Definition at line 83 of file TileDigits.cxx.

86 : TileRawData( id )
87 , m_digits ( digits )
88{
89}

Member Function Documentation

◆ adc_HWID()

HWIdentifier TileRawData::adc_HWID ( void ) const
inlineinherited

Definition at line 53 of file TileRawData.h.

53{ return m_adc_hwid; }
HWIdentifier m_adc_hwid
Definition TileRawData.h:82

◆ adc_ID()

Identifier TileRawData::adc_ID ( void ) const
inherited

Definition at line 53 of file TileRawData.cxx.

53 {
54 return s_cabling->h2s_adc_id(m_adc_hwid);
55}

◆ cell_ID()

Identifier TileRawData::cell_ID ( void ) const
inherited

Definition at line 61 of file TileRawData.cxx.

61 {
62 return s_cabling->h2s_cell_id(m_adc_hwid);
63}

◆ cell_ID_index()

Identifier TileRawData::cell_ID_index ( int & index,
int & pmt ) const
inherited

Definition at line 65 of file TileRawData.cxx.

65 {
66 return s_cabling->h2s_cell_id_index(m_adc_hwid, index, pmt);
67}

◆ frag_ID()

int TileRawData::frag_ID ( void ) const
inherited

Definition at line 77 of file TileRawData.cxx.

77 {
78 return s_cabling->frag(m_adc_hwid);
79}

◆ get_digits()

std::vector< double > TileDigits::get_digits ( void ) const
inline

Definition at line 65 of file TileDigits.h.

66 {
67 std::vector<double> ddigits(m_digits.size());
68 for (unsigned int i=0; i<m_digits.size(); ++i) ddigits[i] = m_digits[i];
69 return ddigits;
70 }

◆ identify()

Identifier TileRawData::identify ( void ) const
inlineinherited

Definition at line 52 of file TileRawData.h.

52{ return adc_ID(); }
Identifier adc_ID(void) const

◆ mt_ID()

Identifier TileRawData::mt_ID ( void ) const
inherited

Definition at line 73 of file TileRawData.cxx.

73 {
74 return s_cabling->pmt2mt_id(adc_ID());
75}

◆ nsamples()

int TileDigits::nsamples ( ) const
inline
Returns
number of samples

Definition at line 55 of file TileDigits.h.

55{ return m_digits.size(); }

◆ NtimeSamples()

int TileDigits::NtimeSamples ( void ) const
inline

Definition at line 62 of file TileDigits.h.

62{ return m_digits.size(); }

◆ operator std::string()

TileDigits::operator std::string ( ) const
virtual

Reimplemented from TileRawData.

Definition at line 114 of file TileDigits.cxx.

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}
static void print_to_stream(const std::vector< float > &val, const std::string &label, std::ostringstream &text)

◆ pmt_ID()

Identifier TileRawData::pmt_ID ( void ) const
inherited

Definition at line 57 of file TileRawData.cxx.

57 {
58 return s_cabling->h2s_pmt_id(m_adc_hwid);
59}

◆ print()

void TileDigits::print ( void ) const
virtual

Reimplemented from TileRawData.

Definition at line 109 of file TileDigits.cxx.

110{
111 std::cout << (std::string) (*this) << std::endl;
112}

◆ print_to_stream() [1/3]

void TileRawData::print_to_stream ( const std::vector< double > & val,
const std::string & label,
std::ostringstream & text )
staticinherited

Definition at line 92 of file TileRawData.cxx.

95{
96 text << label;
97 for (double v : val) {
98 text << " " << v;
99 }
100}
std::string label(const std::string &format, int i)
Definition label.h:19

◆ print_to_stream() [2/3]

void TileRawData::print_to_stream ( const std::vector< float > & val,
const std::string & label,
std::ostringstream & text )
staticinherited

Definition at line 81 of file TileRawData.cxx.

84{
85 text << label;
86 for (float v : val) {
87 text << " " << v;
88 }
89}

◆ print_to_stream() [3/3]

void TileRawData::print_to_stream ( const std::vector< uint32_t > & val,
const std::string & label,
std::ostringstream & text )
staticinherited

Definition at line 102 of file TileRawData.cxx.

105{
106 text << label;
107 for (uint32_t v : val) {
108 text << " " << v;
109 }
110}

◆ samples()

const std::vector< float > & TileDigits::samples ( ) const
inline
Returns
a reference to a stl vector containing the sample values

Definition at line 58 of file TileDigits.h.

58{ return m_digits; }

◆ tt_ID()

Identifier TileRawData::tt_ID ( void ) const
inherited

Definition at line 69 of file TileRawData.cxx.

69 {
70 return s_cabling->pmt2tt_id(adc_ID());
71}

◆ whoami()

std::string TileDigits::whoami ( void ) const
inlinevirtual

Reimplemented from TileRawData.

Definition at line 75 of file TileDigits.h.

75{ return "TileDigits"; }

Member Data Documentation

◆ m_adc_hwid

HWIdentifier TileRawData::m_adc_hwid
privateinherited

Definition at line 82 of file TileRawData.h.

◆ m_digits

std::vector<float> TileDigits::m_digits
private

Definition at line 84 of file TileDigits.h.


The documentation for this class was generated from the following files: