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
12
RecEmcDigit::RecEmcDigit
() {
13
fCellId
.clear();
14
fADC
= -1;
15
fTDC
= -1;
16
}
17
18
RecEmcDigit::RecEmcDigit
(
const
RecEmcID
&
CellId
,
const
RecEmcADC
&
ADC
,
19
const
RecEmcTDC
&
TDC
) {
20
fCellId
=
CellId
;
21
fADC
=
ADC
;
22
fTDC
=
TDC
;
23
}
24
25
RecEmcDigit::~RecEmcDigit
() {
26
// nothing to do
27
}
28
29
// Copy and assignment
30
RecEmcDigit::RecEmcDigit
(
const
RecEmcDigit
& aDigit ) {
31
fCellId
= aDigit.
CellId
();
32
fADC
= aDigit.
ADC
();
33
fTDC
= aDigit.
TDC
();
34
}
35
36
RecEmcDigit
&
RecEmcDigit::operator=
(
const
RecEmcDigit
& aDigit ) {
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
48
RecEmcID
RecEmcDigit::CellId
()
const
{
return
fCellId
; }
49
50
RecEmcADC
RecEmcDigit::ADC
()
const
{
return
fADC
; }
51
52
RecEmcTDC
RecEmcDigit::TDC
()
const
{
return
fTDC
; }
53
54
// Write
55
RecEmcID
RecEmcDigit::CellId
(
const
RecEmcID
&
CellId
) {
56
fCellId
=
CellId
;
57
return
fCellId
;
58
}
59
60
RecEmcADC
RecEmcDigit::ADC
(
const
RecEmcADC
&
ADC
) {
61
fADC
=
ADC
;
62
return
fADC
;
63
}
64
65
RecEmcTDC
RecEmcDigit::TDC
(
const
RecEmcTDC
&
TDC
) {
66
fTDC
=
TDC
;
67
return
fTDC
;
68
}
69
70
void
RecEmcDigit::Assign
(
const
RecEmcID
&
CellId
,
const
RecEmcADC
&
ADC
,
71
const
RecEmcTDC
&
TDC
) {
72
fCellId
=
CellId
;
73
fADC
=
ADC
;
74
fTDC
=
TDC
;
75
}
76
77
void
RecEmcDigit::Assign
(
const
RecEmcDigit
& aDigit ) {
78
fCellId
= aDigit.
CellId
();
79
fADC
= aDigit.
ADC
();
80
fTDC
= aDigit.
TDC
();
81
}
82
83
// others
84
void
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
98
ostream&
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
}
RecEmcADC
double RecEmcADC
Definition
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcDataType.h:25
RecEmcTDC
double RecEmcTDC
Definition
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcDataType.h:26
RecEmcID
Identifier RecEmcID
Definition
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcDataType.h:24
operator<<
ostream & operator<<(ostream &os, const RecEmcDigit &aDigit)
Definition
RecEmcDigit.cxx:98
RecEmcDigit
Definition
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcDigit.h:16
RecEmcDigit::operator=
RecEmcDigit & operator=(const RecEmcDigit &aDigit)
Definition
RecEmcDigit.cxx:36
RecEmcDigit::ADC
RecEmcADC ADC() const
Definition
RecEmcDigit.cxx:50
RecEmcDigit::~RecEmcDigit
~RecEmcDigit()
Definition
RecEmcDigit.cxx:25
RecEmcDigit::fCellId
RecEmcID fCellId
Definition
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcDigit.h:47
RecEmcDigit::fADC
RecEmcADC fADC
Definition
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcDigit.h:48
RecEmcDigit::fTDC
RecEmcTDC fTDC
Definition
Emc/EmcRecEventModel/include/EmcRecEventModel/RecEmcDigit.h:49
RecEmcDigit::Dump
void Dump() const
Definition
RecEmcDigit.cxx:84
RecEmcDigit::RecEmcDigit
RecEmcDigit()
Definition
RecEmcDigit.cxx:12
RecEmcDigit::TDC
RecEmcTDC TDC() const
Definition
RecEmcDigit.cxx:52
RecEmcDigit::Assign
void Assign(const RecEmcID &CellId, const RecEmcADC &ADC, const RecEmcTDC &TDC)
Definition
RecEmcDigit.cxx:70
RecEmcDigit::CellId
RecEmcID CellId() const
Definition
RecEmcDigit.cxx:48
8.0.0
BOSS_Source
Emc
EmcRecEventModel
src
RecEmcDigit.cxx
Generated by
1.16.1