BOSS 7.0.6
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
10
11//Constructors and destructors
13{
14 fCellId.clear();
15 fADC=-1;
16 fTDC=-1;
17}
18
20 const RecEmcADC& ADC,
21 const RecEmcTDC& TDC)
22{
24 fADC=ADC;
25 fTDC=TDC;
26}
27
29{
30 //nothing to do
31}
32
33//Copy and assignment
35{
36 fCellId=aDigit.CellId();
37 fADC=aDigit.ADC();
38 fTDC=aDigit.TDC();
39}
40
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
55{
56 return fCellId;
57}
58
60{
61 return fADC;
62}
63
65{
66 return fTDC;
67}
68
69//Write
71{
73 return fCellId;
74}
75
77{
78 fADC=ADC;
79 return fADC;
80}
81
83{
84 fTDC=TDC;
85 return fTDC;
86}
87
88void RecEmcDigit::Assign(const RecEmcID& CellId,
89 const RecEmcADC& ADC,
90 const RecEmcTDC& TDC)
91{
93 fADC=ADC;
94 fTDC=TDC;
95}
96
98{
99 fCellId=aDigit.CellId();
100 fADC=aDigit.ADC();
101 fTDC=aDigit.TDC();
102}
103
104//others
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
120ostream& 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}
double RecEmcADC
double RecEmcTDC
ostream & operator<<(ostream &os, const RecEmcDigit &aDigit)
void clear()
Reset to invalid state.
Definition: Identifier.h:152
RecEmcDigit & operator=(const RecEmcDigit &aDigit)
Definition: RecEmcDigit.cxx:41
RecEmcADC ADC() const
Definition: RecEmcDigit.cxx:59
RecEmcID fCellId
Definition: RecEmcDigit.h:52
RecEmcADC fADC
Definition: RecEmcDigit.h:53
RecEmcTDC fTDC
Definition: RecEmcDigit.h:54
void Dump() const
RecEmcTDC TDC() const
Definition: RecEmcDigit.cxx:64
void Assign(const RecEmcID &CellId, const RecEmcADC &ADC, const RecEmcTDC &TDC)
Definition: RecEmcDigit.cxx:88
RecEmcID CellId() const
Definition: RecEmcDigit.cxx:54