Changeset 761 for trunk/MagicSoft/Mars/mraw
- Timestamp:
- 04/23/01 14:37:08 (24 years ago)
- Location:
- trunk/MagicSoft/Mars/mraw
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mraw/MRawEvtData.cc
r749 r761 65 65 ClassImp(MRawEvtData) 66 66 67 // -------------------------------------------------------------------------- 68 // 69 // Default constructor. It initializes all arrays with zero size. 70 // 67 71 MRawEvtData::MRawEvtData(const char *name, const char *title) 68 72 { … … 73 77 } 74 78 79 // -------------------------------------------------------------------------- 80 // 81 // Destructor. Deletes all the arrays. 82 // 75 83 MRawEvtData::~MRawEvtData() 76 84 { … … 78 86 } 79 87 88 // -------------------------------------------------------------------------- 89 // 90 // reset all arrays 91 // 80 92 void MRawEvtData::Clear(Option_t *) 81 93 { 82 //83 // reset all arrays84 //85 86 94 /* 87 95 FIXME: … … 95 103 } 96 104 105 // -------------------------------------------------------------------------- 106 // 107 // return the number of hi gain samples per pixel 108 // 97 109 Byte_t MRawEvtData::GetNumHiGainSamples() const 98 110 { … … 100 112 } 101 113 114 // -------------------------------------------------------------------------- 115 // 116 // return the number of lo gain samples per pixel 117 // 102 118 Byte_t MRawEvtData::GetNumLoGainSamples() const 103 119 { … … 105 121 } 106 122 123 // -------------------------------------------------------------------------- 124 // 125 // return the number of stored pixel 126 // 107 127 UShort_t MRawEvtData::GetNumPixels() const 108 128 { … … 111 131 112 132 133 // -------------------------------------------------------------------------- 134 // 135 // Print out the onformation to *fLog. 136 // Options: 137 // "hex" Prints the time slices hexadecimal (default) 138 // "dec" Prints the time slices decimal 139 // 113 140 void MRawEvtData::Print(Option_t *opt) 114 141 { … … 171 198 } 172 199 200 // -------------------------------------------------------------------------- 201 // 202 // Draw a pixel. A Histogram or Graph is created and it's draw function is 203 // called. 204 // Options: 205 // "GRAPH" A graph is drawn 206 // "HIST" A histogram is drawn 207 // number The pixel with the given number is drawn 208 // 173 209 void MRawEvtData::Draw(Option_t *opt) 174 210 { … … 176 212 177 213 // 178 // FIXME: BIG MEMORY LEAK! 214 // FIXME: BIG MEMORY LEAK! (( How and when are the objects deleted?) 179 215 // 180 216 … … 244 280 } 245 281 282 // -------------------------------------------------------------------------- 283 // 284 // Deletes all arrays describing the pixel Id and Samples in pixels. 285 // The flag is for future usage. 286 // 246 287 void MRawEvtData::DeletePixels(Bool_t flag) 247 288 { 248 //249 // Deletes all arrays describing the pixel Id and Samples in pixels250 //251 289 DeleteArrays(); 252 290 InitArrays(flag); 253 291 } 254 292 293 // -------------------------------------------------------------------------- 294 // 295 // Deletes all the arrays 296 // 255 297 void MRawEvtData::DeleteArrays() 256 298 { … … 261 303 } 262 304 305 // -------------------------------------------------------------------------- 306 // 307 // Deletes all the arrays 308 // The flag is for future usage. 309 // 263 310 void MRawEvtData::InitArrays(Bool_t flag) 264 311 { … … 271 318 } 272 319 320 // -------------------------------------------------------------------------- 321 // 322 // This is to fill the data of one pixel to the MRawEvtHeader Class. 323 // The parameters are the pixelnumber and the FADC_SLICES values of ADCs 324 // Add to lo gains if lflag = 1 325 // 273 326 void MRawEvtData::AddPixel(UShort_t nOfPixel, TArrayC *data, Bool_t lflag) 274 327 { 275 //276 // This is to fill the data of one pixel to the MRawEvtHeader Class.277 // The parameters are the pixelnumber and the FADC_SLICES values of ADCs278 // Add to lo gains if lflag = 1279 //280 328 MArrayS *arrpix = lflag ? fLoGainPixId : fHiGainPixId; 281 329 MArrayB *arrsam = lflag ? fLoGainFadcSamples : fHiGainFadcSamples; … … 315 363 } 316 364 365 // -------------------------------------------------------------------------- 366 // 367 // Fills members with information from a magic binary file. 368 // WARNING: you have to use Init() before you can do this 369 // 317 370 void MRawEvtData::ReadEvt(istream &fin) 318 371 { 319 //320 // Fills members with information from a magic binary file.321 // WARNING: you have to use Init() before you can do this322 //323 372 const UShort_t nlo = fRunHeader->GetNumSamplesLoGain(); 324 373 const UShort_t nhi = fRunHeader->GetNumSamplesHiGain(); -
trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc
r749 r761 105 105 ClassImp(MRawEvtHeader) 106 106 107 MRawEvtHeader::MRawEvtHeader(const char *name, const char *title) 107 // -------------------------------------------------------------------------- 108 // 109 // Default constructor. Create the array to store the data. 110 // 111 MRawEvtHeader::MRawEvtHeader(const char *name, const char *title) 108 112 { 109 113 *fName = name ? name : "MRawEvtHeader"; … … 120 124 121 125 126 // -------------------------------------------------------------------------- 127 // 128 // Destructor. Deletes the array to store pixlogainon 129 // 122 130 MRawEvtHeader::~MRawEvtHeader() 123 131 { 124 } 125 132 delete fPixLoGainOn; 133 } 134 135 // -------------------------------------------------------------------------- 136 // 137 // you have to init the conatainer before you can read from 138 // a raw binary file 139 // 126 140 void MRawEvtHeader::Init(MRawRunHeader *rh, MTime *t) 127 141 { 128 //129 // you have to init the conatainer before you can read from130 // a raw binary file131 //132 133 142 // 134 143 // this is the number of entries in the array like specification … … 148 157 } 149 158 159 // -------------------------------------------------------------------------- 160 // 161 // Implementation of the Clear function 162 // 163 // Resets all members to zero, clear the list of Pixels 164 // 150 165 void MRawEvtHeader::Clear(Option_t *) 151 166 { 152 //153 // Implementation of the Clear function154 //155 // Resets all members to zero, clear the list of Pixels156 //157 167 fDAQEvtNumber = 0; 158 168 fNumTrigLvl1 = 0; … … 164 174 } 165 175 176 // -------------------------------------------------------------------------- 177 // 178 // This member function prints all Data of one Event to *fLog. 179 // 166 180 void MRawEvtHeader::Print(Option_t *o) 167 181 { 168 //169 // This member function prints all Data of one Event on screen.170 //171 182 *fLog << "DAQEvtNr: " << dec << fDAQEvtNumber << " ("; 172 183 *fLog << "Trigger: "; … … 208 219 } 209 220 221 // -------------------------------------------------------------------------- 222 // 223 // used to set the header information (eg. from MC) 224 // 210 225 void MRawEvtHeader::FillHeader(UInt_t uiN, Float_t ulTP) 211 226 { 212 //213 // used to set the header information (eg. from MC)214 //215 227 fDAQEvtNumber = uiN; 216 228 fTrigPattern[0] = (UInt_t) (ulTP/4294967296.0) ; … … 218 230 } 219 231 232 // -------------------------------------------------------------------------- 233 // 234 // read the EVENT HEADER information from the input stream 235 // return FALSE if there is now header anymore, else TRUE 236 // 220 237 int MRawEvtHeader::ReadEvt(istream &fin) 221 238 { 222 //223 // read the EVENT HEADER information from the input stream224 // return FALSE if there is now header anymore, else TRUE225 //226 239 fin.read((Byte_t*)&fDAQEvtNumber, 4); 227 240 -
trunk/MagicSoft/Mars/mraw/MRawEvtPixelIter.cc
r749 r761 56 56 ClassImp(MRawEvtPixelIter) 57 57 58 // -------------------------------------------------------------------------- 59 // 60 // Return the number of stored pixels 61 // 58 62 Byte_t MRawEvtPixelIter::GetNumPixels() const 59 63 { … … 61 65 } 62 66 67 // -------------------------------------------------------------------------- 68 // 69 // It steps to the next pixel. If there is no next pixel NULL is returned. 70 // If a next pixel where found, a pointer to the primary given (constructor) 71 // data structur is returned. 72 // 63 73 MRawEvtData *MRawEvtPixelIter::Next() 64 74 { … … 98 108 } 99 109 110 // -------------------------------------------------------------------------- 111 // 112 // Reset the iteration. Jump to the first pixel. 113 // 100 114 void MRawEvtPixelIter::Reset() 101 115 { … … 115 129 } 116 130 131 // -------------------------------------------------------------------------- 132 // 133 // Calls the draw-function of the actual pixel (see MRawEvtData::Draw) 134 // 117 135 void MRawEvtPixelIter::Draw(Option_t *t) 118 136 { 119 //120 // Draw the actual pixel (for options see: MRawEvtData::Draw)121 //122 137 char *txt = new char[6+strlen(t)]; 123 138 sprintf(txt, "%s%d", t, *fHiGainId); … … 126 141 } 127 142 143 // -------------------------------------------------------------------------- 144 // 145 // returns the sum of all hi gain fadc samples of the actual pixel 146 // 128 147 ULong_t MRawEvtPixelIter::GetSumHiGainFadcSamples() const 129 148 { … … 142 161 } 143 162 163 // -------------------------------------------------------------------------- 164 // 165 // returns the sum of all lo gain fadc samples of the actual pixel. 166 // if no lo gain information is available 0 is returned. 167 // 144 168 ULong_t MRawEvtPixelIter::GetSumLoGainFadcSamples() const 145 169 {
Note:
See TracChangeset
for help on using the changeset viewer.