ATLAS Offline Software
TileDigits.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //***************************************************************************
6 // Filename : TileDigits.h
7 // Author : Frank Merritt
8 // Created : May 16, 2002
9 //
10 // DESCRIPTION:
11 // A TileDigits is the data class corresponding to the amplitude information
12 // transmitted from the digitizers to the ROD's. It contains a hardware
13 // identifier (including pmt and adc info) and nsample amplitudes corresponding
14 // to the time slices read out. Optimal filtering must be applied to these
15 // amplitudes (including pedestal subtractioin) to produce a TileRawChannel.
16 //
17 // HISTORY:
18 // 14May02 First created for DC1 phase-1 and HLT studies.
19 // 02Oct02 Now sub-class of TileRawData (A.Solodkov)
20 // 14Sep09 TileDigits changed from double to float (M.Soares)
21 //
22 // ***************************************************************************
23 
24 #ifndef TILEEVENT_TILEDIGITS_H
25 #define TILEEVENT_TILEDIGITS_H
26 
27 #include "TileEvent/TileRawData.h"
28 
29 class TileDigits : public TileRawData
30 {
31 public:
32 
33  /* Constructors */
34 
35  TileDigits() { }
36 
37  TileDigits(const HWIdentifier& HWid, const std::vector<double>& digits );
38 
39  // Needs to come after HWIdentifier for proper overload resolution
40  // with pyroot.
41  TileDigits(const Identifier& id, const std::vector<double>& digits );
42 
43  TileDigits(const HWIdentifier& HWid, const std::vector<short>& digits );
44 
45  TileDigits(const HWIdentifier& HWid, const std::vector<float>& digits );
46 
47  TileDigits(const HWIdentifier& HWid, std::vector<float>&& digits );
48 
49  // Needs to come after HWIdentifier for proper overload resolution
50  // with pyroot.
51  TileDigits(const Identifier& id, const std::vector<float>& digits );
52 
53 
55  int nsamples() const { return m_digits.size(); }
56 
58  const std::vector < float > & samples() const { return m_digits; }
59 
60  /* Inline access methods */
61 
62  inline int NtimeSamples(void) const { return m_digits.size(); }
63 
64  // inline std::vector<double> TileDigits::get_digits(void) const
65  std::vector<double> get_digits(void) const
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  }
71 
72  // inline std::vector<int> get_Idigits(void) const { return m_digits; }
73  // inline const std::vector<double> * get_digits_ptr(void) const { return &m_digits; }
74 
75  std::string whoami (void) const { return "TileDigits"; }
76  void print (void) const;
77  // Convertion operator to a std::string
78  // Can be used in a cast operation : (std::string) TileRawChannel
79  operator std::string() const;
80 
81 private:
82 
83  /* Member variables: */
84  std::vector<float> m_digits;
85 };
86 
87 #endif //TILEEVENT_TILEDIGITS_H
88 
TileDigits::TileDigits
TileDigits()
Definition: TileDigits.h:35
TileDigits::m_digits
std::vector< float > m_digits
Definition: TileDigits.h:84
TileDigits::nsamples
int nsamples() const
Definition: TileDigits.h:55
TileDigits::NtimeSamples
int NtimeSamples(void) const
Definition: TileDigits.h:62
TileDigits::print
void print(void) const
Definition: TileDigits.cxx:109
HWIdentifier
Definition: HWIdentifier.h:13
TileDigits::get_digits
std::vector< double > get_digits(void) const
Definition: TileDigits.h:65
TileRawData.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileDigits::whoami
std::string whoami(void) const
Definition: TileDigits.h:75
TileDigits::samples
const std::vector< float > & samples() const
Definition: TileDigits.h:58
TileDigits
Definition: TileDigits.h:30
TileRawData
Definition: TileRawData.h:34
Identifier
Definition: IdentifierFieldParser.cxx:14