Changeset 2748
- Timestamp:
- 12/23/03 14:00:54 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2746 r2748 5 5 -*-*- END OF LINE -*-*- 6 6 7 2003/12/23: Thomas Bretz 8 9 * manalysis/MPedCalcPedRun.[h,cc]: 10 - removed fCounter 11 - replaced by GetNumExecutions() 12 13 * mraw/MRaw*: 14 - some changes and debug output for the upcomming time-stamp 15 - a fix to broken reading 16 17 18 7 19 2003/12/23: Wolfgang Wittek 8 20 … … 22 34 - put zenith angle into MMcEvt 23 35 24 * manalysis/Makefile 25 AnalysisLinkDef.h 36 * manalysis/Makefile, manalysis/AnalysisLinkDef.h 26 37 - added MPadON 27 38 -
trunk/MagicSoft/Mars/mraw/MRawCrateData.cc
r2645 r2748 60 60 fin.read((char*)&fFADCClockTick, 4); 61 61 if (ver>1) 62 62 fin.read((char*)&fABFlags, 1); 63 63 } 64 64 -
trunk/MagicSoft/Mars/mraw/MRawEvtHeader.cc
r2728 r2748 239 239 { 240 240 // BADC|1032 --> DCBA|3210 (Byte swap - exchange MSB and LSB) 241 *fLog << hex << all << endl << abstime[0] << " " << abstime[1] << endl; 242 241 243 abstime[0] = (abstime[0]<<16) | (abstime[0]>>16); 242 abstime[1] = (abstime[1]<<16) | (abstime[1]>>16); 243 244 const Byte_t h = (abstime[0]>>18 & 0x30)*10 + (abstime[0]>>14 & 0x0f); 245 const Byte_t m = (abstime[0]>>11 & 0x70)*10 + (abstime[0]>> 7 & 0x0f); 246 const Byte_t s = (abstime[0]>> 4 & 0x70)*10 + (abstime[0]>> 0 & 0x0f); 244 // abstime[1] = (abstime[1]<<16) | (abstime[1]>>16); 245 // *fLog << hex << abstime[0] << " " << abstime[1] << endl; 246 // *fLog << dec; 247 248 abstime[0] = abstime[0]<<8&0xff00 | abstime[0]>>8&0x00ff | abstime[0]&0xffff0000; 249 abstime[1] = abstime[1]<<8&0xff00 | abstime[1]>>8&0x00ff | abstime[1]&0xffff0000; 250 251 for (int i=4*8-1; i>=0; i--) 252 *fLog << (int)(abstime[0]&BIT(i)?1:0); 253 *fLog << " "; 254 for (int i=4*8-1; i>=0; i--) 255 *fLog << (int)(abstime[1]&BIT(i)?1:0); 256 *fLog << endl; 257 258 /* *fLog << hex << abstime[0] << " " << abstime[1] << endl; 259 */ 260 261 // Strange thing! 262 Char_t t = abstime[0]>>8 &0xf; 263 abstime[0] &= 0xfffff0ff; 264 265 // *fLog << abstime[0]<< " " << (int)t << endl; 266 267 268 for (int i=0; i<4; i++) 269 { 270 abstime[0] |= (t&BIT(i) ? 1 : 0)<<(11-i); 271 //*fLog << ((t&BIT(i) ? 1 : 0)<<(11-i)) << " "; 272 } 273 274 //*fLog << endl << abstime[0]<< endl; 275 276 // Decode 277 const Byte_t h = (abstime[0]>>18 & 0x3)*10 + (abstime[0]>>14 & 0xf); 278 const Byte_t m = (abstime[0]>>11 & 0x7)*10 + (abstime[0]>> 7 & 0xf); 279 const Byte_t s = (abstime[0]>> 4 & 0x7)*10 + (abstime[0]>> 0 & 0xf); 247 280 const Int_t ms = 248 ((abstime[ 1]>>16)&0xf)*1000 +249 ((abstime[ 1]>> 8)&0xf)* 100 +250 ((abstime[ 1]>> 4)&0xf)* 10 +251 ((abstime[ 1]>> 0)&0xf)* 1;281 ((abstime[0]>>12)&0xf)*1000 + 282 ((abstime[0]>> 8)&0xf)* 100 + 283 ((abstime[0]>> 4)&0xf)* 10 + 284 ((abstime[0]>> 0)&0xf)* 1; 252 285 253 286 // hms =3210 --> h=2:4 m=3:4 s=3:4 254 287 // subsec=DCBA --> subsec? 255 *fLog << dbg << dec; 256 *fLog << (int)(abstime[0]>>18 & 0x30); // h 257 *fLog << (int)(abstime[0]>>14 & 0x0f); // h 258 *fLog << ":"; 259 *fLog << (int)(abstime[0]>>11 & 0x70); // m 260 *fLog << (int)(abstime[0]>> 7 & 0x0f); // m 261 *fLog << ":"; 262 *fLog << (int)(abstime[0]>> 4 & 0x70); // s 263 *fLog << (int)(abstime[0]>> 0 & 0x0f); // s 264 *fLog << " "; 265 *fLog << (int)(abstime[1]>>16 & 0xf) << "."; 266 *fLog << (int)(abstime[1]>> 8 & 0xf) << "."; 267 *fLog << (int)(abstime[1]>> 4 & 0xf) << "."; 268 *fLog << (int)(abstime[1]>> 0 & 0xf); 288 *fLog << all << dec << setfill('0') << setw(2) << (int)h << ":" << setw(2) << (int)m << ":" << setw(2) << (int)s; 289 *fLog << " " << hex; 290 *fLog << (int)(abstime[0]>>12 & 0xf) << "."; 291 *fLog << (int)(abstime[0]>> 8 & 0xf) << "."; 292 *fLog << (int)(abstime[0]>> 4 & 0xf) << "."; 293 *fLog << (int)(abstime[0]>> 0 & 0xf); 269 294 *fLog << endl; 270 295 … … 274 299 // 275 300 // Here the nanosec precision is ignored... (FIXME!) 276 return fTime->UpdMagicTime(h, m, s, ms); 301 302 static int i=0; 303 i++; 304 fTime->Print(); 305 fTime->UpdMagicTime(h, m, s, 0/*ms*/); 306 fTime->Print(); 307 return i<5; 308 //return fTime->UpdMagicTime(h, m, s, ms); 277 309 } 278 310 … … 291 323 { 292 324 fin.read((char*)&fDAQEvtNumber, 4); // Total=4 325 326 *fLog << "N: " << fDAQEvtNumber << endl; 293 327 294 328 UInt_t abstime[2]; // BADC|1032 … … 308 342 fin.read((char*)fPixLoGainOn->GetArray(), fPixLoGainOn->GetSize()); 309 343 344 *fLog << "T: " << fTrigType << endl; 345 310 346 fNumLoGainOn = 0; 311 347 for (unsigned int i=0; i<fPixLoGainOn->GetSize(); i++) -
trunk/MagicSoft/Mars/mraw/MRawFileRead.cc
r2728 r2748 156 156 *fRawEvtTime = fRawRunHeader->GetRunStart(); 157 157 158 // 159 // Give the run header information to the 'sub-classes' 160 // Run header must be valid! 161 // 162 fRawEvtHeader->Init(fRawRunHeader, fRawEvtTime); 163 fRawEvtData ->Init(fRawRunHeader, fRawCrateArray); 164 158 165 return kTRUE; 159 166 } -
trunk/MagicSoft/Mars/mraw/MRawRead.cc
r2728 r2748 116 116 return kFALSE; 117 117 118 //119 // Give the run header information to the 'sub-classes'120 //121 fRawEvtHeader->Init(fRawRunHeader, fRawEvtTime);122 fRawEvtData ->Init(fRawRunHeader, fRawCrateArray);123 124 118 return kTRUE; 125 119 } -
trunk/MagicSoft/Mars/mraw/MRawSocketRead.cc
r2728 r2748 254 254 *fRawEvtTime = fRawRunHeader->GetRunStart(); 255 255 256 // 257 // Give the run header information to the 'sub-classes' 258 // Run header must be valid! 259 // 260 fRawEvtHeader->Init(fRawRunHeader, fRawEvtTime); 261 fRawEvtData ->Init(fRawRunHeader, fRawCrateArray); 262 256 263 if (!ReadEvent(*fIn)) 257 264 return kFALSE;
Note:
See TracChangeset
for help on using the changeset viewer.