HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hrichcal.cc
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // $Id: $
4 //
5 //*-- Author : RICH team member
6 //*-- Revised : Martin Jurkovic <martin.jurkovic@ph.tum.de> 2010
7 //
8 //_HADES_CLASS_DESCRIPTION
9 //////////////////////////////////////////////////////////////////////////////
10 //
11 // HRichCal
12 //
13 // This class contains one hit in one cell of the RICH.
14 //
15 //////////////////////////////////////////////////////////////////////////////
16 
17 
18 #include "hrichcal.h"
19 #include "TBuffer.h"
20 
21 using namespace std;
22 
24 
26  : HLocatedDataObject()
27 {
28  fCharge = 0.0;
29  fTime = 0.0;
30  fSector = -1;
31  fRow = -1;
32  fCol = -1;
33  fEventNr = -1;
34  isCleanedSingle = kFALSE;
35  isCleanedHigh = kFALSE;
36  isCleanedSector = kFALSE;
37 }
38 
40  : HLocatedDataObject()
41 {
42  fCharge = q;
43  fTime = 0.;
44  fSector = -1;
45  fRow = -1;
46  fCol = -1;
47  fEventNr = -1;
48  isCleanedSingle = kFALSE;
49  isCleanedHigh = kFALSE;
50  isCleanedSector = kFALSE;
51 }
52 
53 HRichCal::HRichCal(Int_t s, Int_t r, Int_t c)
54  : HLocatedDataObject()
55 {
56  fCharge = 0.0;
57  fTime = 0.0;
58  fSector = s;
59  fRow = r;
60  fCol = c;
61  fEventNr = -1;
62  isCleanedSingle = kFALSE;
63  isCleanedHigh = kFALSE;
64  isCleanedSector = kFALSE;
65 }
66 
67 void HRichCal::Streamer(TBuffer &R__b)
68 {
69  // Stream an object of class HRichCal.
70 
71  UInt_t R__s, R__c;
72  if (R__b.IsReading()) {
73  Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
74  HLocatedDataObject::Streamer(R__b);
75  R__b >> fCharge;
76  R__b >> fSector;
77  R__b >> fRow;
78  R__b >> fCol;
79  R__b >> fEventNr;
80  R__b >> isCleanedSingle;
81  R__b >> isCleanedHigh;
82  R__b >> isCleanedSector;
83  if(R__v > 1){
84  R__b >> fTime;
85  } else {
86  fTime = 0;
87  }
88  R__b.CheckByteCount(R__s, R__c, HRichCal::IsA());
89  } else {
90  R__c = R__b.WriteVersion(HRichCal::IsA(), kTRUE);
91  HLocatedDataObject::Streamer(R__b);
92  R__b << fCharge;
93  R__b << fSector;
94  R__b << fRow;
95  R__b << fCol;
96  R__b << fEventNr;
97  R__b << isCleanedSingle;
98  R__b << isCleanedHigh;
99  R__b << isCleanedSector;
100  R__b << fTime;
101  R__b.SetByteCount(R__c, kTRUE);
102  }
103 }
ClassImp(HRichCal) HRichCal
Definition: hrichcal.cc:23
Float_t fTime
Definition: hrichcal.h:34
Int_t fSector
Definition: hrichcal.h:27
Int_t fRow
Definition: hrichcal.h:28
Int_t fCol
Definition: hrichcal.h:29
Bool_t isCleanedSingle
Definition: hrichcal.h:31
Int_t fEventNr
Definition: hrichcal.h:30
Bool_t isCleanedSector
Definition: hrichcal.h:33
Bool_t isCleanedHigh
Definition: hrichcal.h:32
Float_t fCharge
Definition: hrichcal.h:26