Changeset 434 for trunk/MagicSoft/include-Classes/MRawPixel.cxx
- Timestamp:
- 09/21/00 12:35:27 (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/include-Classes/MRawPixel.cxx
r371 r434 1 1 #include <iostream.h> 2 2 3 #include "TClonesArray.h"4 3 #include "TString.h" 5 4 #include "TRandom.h" … … 26 25 // --------- 27 26 // 28 // UShort_t PixelId ;27 // Short_t PixelId ; 29 28 // 30 29 // This is to identify the Pixel. … … 35 34 // low-gain-branch of the Fadc´s only if there is a signal in. Then the 36 35 // PixelId is: 37 // PixelId = 10000 + PixelId . 36 // PixelId = - PixelId . 37 // if there is an entry in the low gain list. 38 38 // 39 // For the high gainFadc values the rule is:39 // Otherwise Fadc values the rule is: 40 40 // PixelId = PixelId . 41 41 // … … 43 43 // --------- 44 44 // 45 // UChar_t PixelStatus ; 46 // 47 // The PixelStatus may contain information if the Pixel has triggered 48 // this event. Also the kind of gain-branch (high or low) may be indicated 49 // by one bit of the PixelStatus. etc 50 // 51 // --------- 52 // 53 // UChar_t Fadc[ FADC_SLICES ] ; 45 // Byte_t FADCSamples[FADC_SLICES] ; 54 46 // 55 47 // The values of FADC_SLICES fadc-slices. This is the information of the 56 48 // measured ADC values for one branch (high gain or low gain). The typ of 57 49 // branch is indicated in the usPixelNumber and in the PixelStatus. 50 // In this first version the number of FADC_SLICES is going to be fixed 58 51 59 52 ClassImp(MRawPixel) … … 66 59 // 67 60 68 69 PixelStatus = 0 ; 70 71 for (Int_t i = 0; i<FADC_SLICES; i++)72 Fadc[i] = 0 ; 61 PixelId = 0 ; 62 63 for (Int_t i = 0; i<FADC_SLICES; i++) 64 FADCSamples[i] = 0 ; 65 73 66 } 74 67 75 68 76 MRawPixel::MRawPixel( UShort_t PId) {69 MRawPixel::MRawPixel(Short_t PId) { 77 70 // 78 71 // constructor II overloaded … … 81 74 82 75 PixelId = PId ; 83 PixelStatus = 0 ;84 85 76 for (Int_t i = 0; i<FADC_SLICES; i++) 86 Fadc[i] = 0 ; 77 FADCSamples[i] = 0 ; 78 87 79 } 88 80 89 81 90 MRawPixel::MRawPixel( UShort_t usPId, UChar_t ucSt, UChar_t ucF[]) {82 MRawPixel::MRawPixel(Short_t usPId, Byte_t ucF[]) { 91 83 // 92 84 // constructor III overloaded 93 85 // 94 // parameters are PixelId , Status and an array with Fadc numbers.86 // parameters are PixelId and an array with Fadc values. 95 87 96 88 PixelId = usPId ; 97 PixelStatus = ucSt ;98 89 99 for (Int_t i = 0; i<FADC_SLICES; i++)100 F adc[i] = ucF[i] ;90 for (Int_t i = 0; i<FADC_SLICES; i++) 91 FADCSamples[i] = ucF[i] ; 101 92 } 93 102 94 MRawPixel::~MRawPixel(){ 103 95 // … … 111 103 // 112 104 PixelId = 0 ; 113 PixelStatus = 0 ; 114 115 for (Int_t i = 0; i<FADC_SLICES; i++)116 Fadc[i] = 0 ;105 106 for (Int_t i=0;i<FADC_SLICES; i++){ 107 FADCSamples[i] = 0; 108 } 117 109 } 118 119 110 120 111 void MRawPixel::Print() … … 125 116 126 117 cout << endl << "PixId " << PixelId ; 127 cout << " Stat " << (Int_t) PixelStatus << " --> " ;128 118 129 119 for (Int_t i=0 ; i<FADC_SLICES ; i++ ) { 130 cout<<" / " << (int) Fadc[i];120 cout<<" / " << FADCSamples[i]; 131 121 } 132 122 } 133 134 UShort_t MRawPixel::GetPixelId() { 123 124 void MRawPixel::FillPixel (Short_t usPId, Byte_t ucF[]){ 125 // 126 // Fills the event information 127 // 128 129 PixelId= usPId; 130 131 for (Int_t i = 0; i<FADC_SLICES; i++){ 132 FADCSamples[i]= ucF[i]; 133 } 134 135 } 136 137 Short_t MRawPixel::GetPixelId() { 135 138 // 136 139 // returns back the PixelId of the Pixel … … 139 142 } 140 143 141 UChar_t MRawPixel::GetFadcSlice( Int_t iSli ) {144 Byte_t MRawPixel::GetFadcSlice( Int_t iSli ) { 142 145 // 143 146 // returns back the fadc content of the slice iSli 144 147 // 145 return ( Fadc[iSli] ) ; 148 149 return (FADCSamples[iSli]) ; 146 150 } 147 148 149 150 151 152
Note:
See TracChangeset
for help on using the changeset viewer.