ATLAS Offline Software
TileRawData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //***************************************************************************
6 // Filename : TileRawData.h
7 // Author : Alexandre Solodkov
8 // Created : Oct, 2002
9 //
10 // DESCRIPTION:
11 // A TileRawData is the base class for raw data classes,
12 // such as TileDigits and TileRawChannels
13 // It has only one member element - HWIdentifier
14 //
15 // HISTORY:
16 // 02Oct02
17 // 14Sep09 changed to print_to_stream to accomodate float TileDigits (M.Soares)
18 //
19 // BUGS:
20 //
21 // ***************************************************************************
22 
23 #ifndef TILEEVENT_TILERAWDATA_H
24 #define TILEEVENT_TILERAWDATA_H
25 
27 
28 #include <string>
29 #include <vector>
30 
31 #include <inttypes.h>
32 
34 {
35 public:
36 
37  /* Constructor: */
39 
40  // nb. Overload for HWIdentifier should come before that for Identifier;
41  // otherwise, pyroot gets overload resolution wrong.
43  : m_adc_hwid (HWid)
44  {
45  }
46  TileRawData(const Identifier& id);
47 
48  /* Destructor */
49  virtual ~TileRawData() = default;
50 
51  /* Inline accessor methods: */
52  inline Identifier identify(void) const { return adc_ID(); }
53  inline HWIdentifier adc_HWID(void) const { return m_adc_hwid; }
54 
55  Identifier adc_ID (void) const;
56  Identifier pmt_ID (void) const;
57  Identifier cell_ID (void) const;
58  Identifier cell_ID_index (int & index, int & pmt) const;
59  Identifier tt_ID (void) const;
60  Identifier mt_ID (void) const;
61  int frag_ID (void) const;
62 
63  virtual std::string whoami (void) const { return "TileRawData"; }
64  virtual void print (void) const;
65  // Convertion operator to a std::string
66  // Can be used in a cast operation : (std::string) TileRawData
67  virtual operator std::string() const;
68 
69  static void print_to_stream ( const std::vector<float>& val,
70  const std::string & label,
71  std::ostringstream & text);
72 
73  static void print_to_stream ( const std::vector<double>& val,
74  const std::string & label,
75  std::ostringstream & text);
76 
77  static void print_to_stream ( const std::vector<uint32_t>& val,
78  const std::string & label,
79  std::ostringstream & text);
80 private:
81 
82  HWIdentifier m_adc_hwid; // Hardware (online) ID of the adc
83 };
84 
85 #endif //TILEEVENT_TILERAWDATA_H
86 
index
Definition: index.py:1
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
ReadBchFromCool.pmt
pmt
Definition: ReadBchFromCool.py:62
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
TileRawData::frag_ID
int frag_ID(void) const
Definition: TileRawData.cxx:77
TileRawData::TileRawData
TileRawData(const HWIdentifier &HWid)
Definition: TileRawData.h:42
TileRawData::print
virtual void print(void) const
Definition: TileRawData.cxx:41
TileRawData::TileRawData
TileRawData()
Definition: TileRawData.h:38
TileRawData::adc_HWID
HWIdentifier adc_HWID(void) const
Definition: TileRawData.h:53
HWIdentifier
Definition: HWIdentifier.h:13
TileRawData::mt_ID
Identifier mt_ID(void) const
Definition: TileRawData.cxx:73
TileRawData::m_adc_hwid
HWIdentifier m_adc_hwid
Definition: TileRawData.h:82
TileRawData::tt_ID
Identifier tt_ID(void) const
Definition: TileRawData.cxx:69
TileRawData::cell_ID
Identifier cell_ID(void) const
Definition: TileRawData.cxx:61
HWIdentifier.h
TileRawData::whoami
virtual std::string whoami(void) const
Definition: TileRawData.h:63
TileRawData::identify
Identifier identify(void) const
Definition: TileRawData.h:52
TileRawData::pmt_ID
Identifier pmt_ID(void) const
Definition: TileRawData.cxx:57
TileRawData::adc_ID
Identifier adc_ID(void) const
Definition: TileRawData.cxx:53
TileRawData::cell_ID_index
Identifier cell_ID_index(int &index, int &pmt) const
Definition: TileRawData.cxx:65
TileRawData::~TileRawData
virtual ~TileRawData()=default
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
TileRawData
Definition: TileRawData.h:34
makeTransCanvas.text
text
Definition: makeTransCanvas.py:11
Identifier
Definition: IdentifierFieldParser.cxx:14