BOSS
7.1.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
{
14
fCellId
.
clear
();
15
fADC
=-1;
16
fTDC
=-1;
17
}
18
19
RecEmcDigit::RecEmcDigit
(
const
RecEmcID
& CellId,
20
const
RecEmcADC
& ADC,
21
const
RecEmcTDC
& TDC)
22
{
23
fCellId
=
CellId
;
24
fADC
=
ADC
;
25
fTDC
=
TDC
;
26
}
27
28
RecEmcDigit::~RecEmcDigit
()
29
{
30
//nothing to do
31
}
32
33
//Copy and assignment
34
RecEmcDigit::RecEmcDigit
(
const
RecEmcDigit
& aDigit)
35
{
36
fCellId
=aDigit.
CellId
();
37
fADC
=aDigit.
ADC
();
38
fTDC
=aDigit.
TDC
();
39
}
40
41
RecEmcDigit
&
RecEmcDigit::operator=
(
const
RecEmcDigit
& aDigit)
42
{
43
if
(
this
!=&aDigit)
44
{
45
fCellId
=aDigit.
CellId
();
46
fADC
=aDigit.
ADC
();
47
fTDC
=aDigit.
TDC
();
48
}
49
return
*
this
;
50
}
51
52
//Access
53
//Read
54
RecEmcID
RecEmcDigit::CellId
()
const
55
{
56
return
fCellId
;
57
}
58
59
RecEmcADC
RecEmcDigit::ADC
()
const
60
{
61
return
fADC
;
62
}
63
64
RecEmcTDC
RecEmcDigit::TDC
()
const
65
{
66
return
fTDC
;
67
}
68
69
//Write
70
RecEmcID
RecEmcDigit::CellId
(
const
RecEmcID
& CellId)
71
{
72
fCellId
=
CellId
;
73
return
fCellId
;
74
}
75
76
RecEmcADC
RecEmcDigit::ADC
(
const
RecEmcADC
& ADC)
77
{
78
fADC
=
ADC
;
79
return
fADC
;
80
}
81
82
RecEmcTDC
RecEmcDigit::TDC
(
const
RecEmcTDC
& TDC)
83
{
84
fTDC
=
TDC
;
85
return
fTDC
;
86
}
87
88
void
RecEmcDigit::Assign
(
const
RecEmcID
& CellId,
89
const
RecEmcADC
& ADC,
90
const
RecEmcTDC
& TDC)
91
{
92
fCellId
=
CellId
;
93
fADC
=
ADC
;
94
fTDC
=
TDC
;
95
}
96
97
void
RecEmcDigit::Assign
(
const
RecEmcDigit
& aDigit)
98
{
99
fCellId
=aDigit.
CellId
();
100
fADC
=aDigit.
ADC
();
101
fTDC
=aDigit.
TDC
();
102
}
103
104
//others
105
void
RecEmcDigit::Dump
()
const
106
{
107
cout<<
"Digit: "
;
108
109
cout<<
fCellId
<<
", "
;
110
111
cout.width(12);
112
cout.setf(ios::right);
113
cout<<
fADC
<<
", "
;
114
115
cout.width(12);
116
cout.setf(ios::right);
117
cout<<
fTDC
<<endl;
118
}
119
120
ostream&
operator<<
(ostream & os,
const
RecEmcDigit
& aDigit)
121
{
122
os<<
"Digit: "
;
123
124
os<<aDigit.
CellId
()<<
", "
;
125
126
os.width(12);
127
os.setf(ios::right);
128
os<<aDigit.
ADC
()<<
", "
;
129
130
os.width(12);
131
os.setf(ios::right);
132
os<<aDigit.
TDC
()<<endl;
133
134
return
os;
135
}
RecEmcADC
double RecEmcADC
Definition:
RecEmcDataType.h:25
RecEmcTDC
double RecEmcTDC
Definition:
RecEmcDataType.h:26
operator<<
ostream & operator<<(ostream &os, const RecEmcDigit &aDigit)
Definition:
RecEmcDigit.cxx:120
RecEmcDigit.h
Identifier
Definition:
Identifier.h:20
Identifier::clear
void clear()
Reset to invalid state.
Definition:
Identifier.h:152
RecEmcDigit
Definition:
RecEmcDigit.h:17
RecEmcDigit::operator=
RecEmcDigit & operator=(const RecEmcDigit &aDigit)
Definition:
RecEmcDigit.cxx:41
RecEmcDigit::ADC
RecEmcADC ADC() const
Definition:
RecEmcDigit.cxx:59
RecEmcDigit::~RecEmcDigit
~RecEmcDigit()
Definition:
RecEmcDigit.cxx:28
RecEmcDigit::fCellId
RecEmcID fCellId
Definition:
RecEmcDigit.h:52
RecEmcDigit::fADC
RecEmcADC fADC
Definition:
RecEmcDigit.h:53
RecEmcDigit::fTDC
RecEmcTDC fTDC
Definition:
RecEmcDigit.h:54
RecEmcDigit::Dump
void Dump() const
Definition:
RecEmcDigit.cxx:105
RecEmcDigit::RecEmcDigit
RecEmcDigit()
Definition:
RecEmcDigit.cxx:12
RecEmcDigit::TDC
RecEmcTDC TDC() const
Definition:
RecEmcDigit.cxx:64
RecEmcDigit::Assign
void Assign(const RecEmcID &CellId, const RecEmcADC &ADC, const RecEmcTDC &TDC)
Definition:
RecEmcDigit.cxx:88
RecEmcDigit::CellId
RecEmcID CellId() const
Definition:
RecEmcDigit.cxx:54
source
Emc
EmcRecEventModel
EmcRecEventModel-01-01-18
src
RecEmcDigit.cxx
Generated by
1.9.6