BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
RecEmcDigit.cxx
Go to the documentation of this file.
1//
2// Bes EMC Rec Hit
3//
4// Created by Wang.Zhe 2003, 12, 15
5//
6
7#include <iostream>
8
9#include "EmcRecEventModel/RecEmcDigit.h"
10
11// Constructors and destructors
13 fCellId.clear();
14 fADC = -1;
15 fTDC = -1;
16}
17
19 const RecEmcTDC& TDC ) {
21 fADC = ADC;
22 fTDC = TDC;
23}
24
26 // nothing to do
27}
28
29// Copy and assignment
31 fCellId = aDigit.CellId();
32 fADC = aDigit.ADC();
33 fTDC = aDigit.TDC();
34}
35
37 if ( this != &aDigit )
38 {
39 fCellId = aDigit.CellId();
40 fADC = aDigit.ADC();
41 fTDC = aDigit.TDC();
42 }
43 return *this;
44}
45
46// Access
47// Read
49
50RecEmcADC RecEmcDigit::ADC() const { return fADC; }
51
52RecEmcTDC RecEmcDigit::TDC() const { return fTDC; }
53
54// Write
59
61 fADC = ADC;
62 return fADC;
63}
64
66 fTDC = TDC;
67 return fTDC;
68}
69
71 const RecEmcTDC& TDC ) {
73 fADC = ADC;
74 fTDC = TDC;
75}
76
77void RecEmcDigit::Assign( const RecEmcDigit& aDigit ) {
78 fCellId = aDigit.CellId();
79 fADC = aDigit.ADC();
80 fTDC = aDigit.TDC();
81}
82
83// others
84void RecEmcDigit::Dump() const {
85 cout << "Digit: ";
86
87 cout << fCellId << ", ";
88
89 cout.width( 12 );
90 cout.setf( ios::right );
91 cout << fADC << ", ";
92
93 cout.width( 12 );
94 cout.setf( ios::right );
95 cout << fTDC << endl;
96}
97
98ostream& operator<<( ostream& os, const RecEmcDigit& aDigit ) {
99 os << "Digit: ";
100
101 os << aDigit.CellId() << ", ";
102
103 os.width( 12 );
104 os.setf( ios::right );
105 os << aDigit.ADC() << ", ";
106
107 os.width( 12 );
108 os.setf( ios::right );
109 os << aDigit.TDC() << endl;
110
111 return os;
112}
ostream & operator<<(ostream &os, const RecEmcDigit &aDigit)
RecEmcDigit & operator=(const RecEmcDigit &aDigit)
RecEmcADC ADC() const
void Dump() const
RecEmcTDC TDC() const
void Assign(const RecEmcID &CellId, const RecEmcADC &ADC, const RecEmcTDC &TDC)
RecEmcID CellId() const