Changeset 9010 for trunk/MagicSoft/Mars/mcamera
- Timestamp:
- 07/17/08 19:15:35 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcamera/MCameraDC.cc
r2893 r9010 18 18 ! Author(s): Thomas Bretz, 5/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 19 19 ! 20 ! Copyright: MAGIC Software Development, 2000-200 320 ! Copyright: MAGIC Software Development, 2000-2008 21 21 ! 22 22 ! … … 26 26 // 27 27 // MCameraDC (PRELIMINARY) 28 // 29 // 30 // Version 2: 31 // ---------- 32 // + fStatus 33 // 28 34 // 29 35 ///////////////////////////////////////////////////////////////////////////// … … 44 50 // 45 51 MCameraDC::MCameraDC(Int_t size, const char *name, const char *title) 46 : f Array(size)52 : fStatus(0), fArray(size) 47 53 { 48 54 fName = name ? name : "MCameraDC"; 49 55 fTitle = title ? title : "Storage container for the pixel currents"; 56 } 57 58 // -------------------------------------------------------------------------- 59 // 60 // Interprete a DC report context 61 // 62 Int_t MCameraDC::Interprete(TString &str, Int_t len) 63 { 64 const char *pos = str.Data()+len; 65 const char *end = pos+577*4; 66 67 Int_t i=0; 68 while (pos<end) 69 { 70 Int_t c; 71 const Char_t hex[5] = { pos[0], pos[1], pos[2], pos[3], 0 }; 72 pos += 4; 73 74 const Int_t nn=sscanf(hex, "%4x", &c); 75 if (nn!=1) 76 { 77 *fLog << warn << "WARNING - Reading hexadecimal DC information." << endl; 78 return kCONTINUE; 79 } 80 81 fArray[i++] = 0.001*c; 82 } 83 84 str.Remove(0, pos-str.Data()); // Remove DC currents 85 str=str.Strip(TString::kLeading); 86 87 return str.IsNull() ? kTRUE : kCONTINUE; 50 88 } 51 89
Note:
See TracChangeset
for help on using the changeset viewer.