Changeset 8955 for trunk/MagicSoft/Mars/mcamera
- Timestamp:
- 06/14/08 15:19:45 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mcamera
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcamera/MCameraRecTemp.cc
r7726 r8955 57 57 // -------------------------------------------------------------------------- 58 58 // 59 // Interprete the receiver board temperature part of the report 60 // 61 Bool_t MCameraRecTemp::InterpreteRecTemp(TString &str) 62 { 63 Int_t len; 64 for (Int_t i=0; i<76; i++) 65 { 66 const Int_t n=sscanf(str.Data(), "%f %n", &fRecTemp[i], &len); 67 str.Remove(0, len); 68 69 if (n==1) 70 continue; 71 72 if (n==0 && i==0) 73 { 74 *fLog << inf << "Receiver Board Temperatures empty." << endl; 75 Invalidate(); 76 break; 77 } 78 79 *fLog << warn << "WARNING - Reading Receiver Board Temperature information." << endl; 80 return kFALSE; 81 } 82 83 return kTRUE; 84 } 85 86 87 // -------------------------------------------------------------------------- 88 // 59 89 // Print the dc currents 60 90 // -
trunk/MagicSoft/Mars/mcamera/MCameraRecTemp.h
r7726 r8955 13 13 { 14 14 friend class MReportCC; 15 friend class MReportRec; 15 16 private: 16 17 TArrayF fRecTemp; // [deg C] receiver board temperatures 17 18 Bool_t fIsValid; // fRecTemp contains valid information 19 20 Bool_t InterpreteRecTemp(TString &str); 18 21 19 22 public: -
trunk/MagicSoft/Mars/mcamera/MCameraTD.cc
r7719 r8955 19 19 ! Author(s): Florian Goebel 11/2005 <mailto:fgoebel@mppmu.mpg.de> 20 20 ! 21 ! Copyright: MAGIC Software Development, 2000-200 621 ! Copyright: MAGIC Software Development, 2000-2008 22 22 ! 23 23 ! … … 57 57 // -------------------------------------------------------------------------- 58 58 // 59 // Interprete the TD (discriminator delays) part of the report 60 // 61 Bool_t MCameraTD::InterpreteTD(TString &str, Int_t ver) 62 { 63 // Skip the TD (discriminator delays) part of the report (for old 64 // CC files with wrong or nonsense number of TD-Bytes) 65 if (ver<200412210) 66 { 67 Ssiz_t pr = str.First(' '); 68 if (pr<0) 69 { 70 *fLog << warn << "WARNING - No TD information found at all." << endl; 71 return kFALSE; 72 } 73 if (pr!=1000) 74 { 75 Invalidate(); 76 77 str.Remove(0, pr); 78 str=str.Strip(TString::kLeading); 79 return kTRUE; 80 } 81 } 82 83 // Older files have less bytes (pixels) stored 84 const Int_t numpix = ver<200510250 ? 500 : 577; 85 86 const char *pos = str.Data(); 87 const char *end = str.Data()+numpix*2; 88 89 Int_t i=0; 90 while (pos<end) 91 { 92 const Char_t hex[3] = { pos[0], pos[1], 0 }; 93 pos += 2; 94 95 const Int_t n=sscanf(hex, "%2hhx", &fTD[i++]); 96 if (n==1) 97 continue; 98 99 *fLog << warn << "WARNING - Reading hexadecimal TD information." << endl; 100 return kFALSE; 101 } 102 103 SetValid(); 104 105 str.Remove(0, end-str.Data()); // Remove TD 106 str=str.Strip(TString::kLeading); 107 108 return kTRUE; 109 } 110 111 // -------------------------------------------------------------------------- 112 // 59 113 // Print the discrimintaor delays 60 114 // -
trunk/MagicSoft/Mars/mcamera/MCameraTD.h
r7719 r8955 16 16 { 17 17 friend class MReportCC; 18 friend class MReportRec; 18 19 private: 19 20 TArrayC fTD; // [au] discriminator delays 20 21 Bool_t fIsValid; // fTD contains valid information 22 23 Bool_t InterpreteTD(TString &str, Int_t ver); 21 24 22 25 public: -
trunk/MagicSoft/Mars/mcamera/MCameraTH.cc
r7719 r8955 40 40 #include "MLogManip.h" 41 41 42 #include "MCameraTD.h" 43 42 44 ClassImp(MCameraTH); 43 45 … … 53 55 fName = name ? name : "MCameraTH"; 54 56 fTitle = title ? title : "Storage container for the pixel discriminator threshold"; 57 } 58 59 // -------------------------------------------------------------------------- 60 // 61 // Interprete the TH (discriminator thresholds) part of the report 62 // 63 Bool_t MCameraTH::InterpreteTH(TString &str, Int_t ver, MCameraTD &td) 64 { 65 // Skip the TH (discriminator thresholds) part of the report (for old 66 // CC files with wrong or nonsense number of TH-Bytes) 67 if (ver<200507190) 68 { 69 Ssiz_t pr = str.First(' '); 70 if (pr<0) 71 { 72 *fLog << warn << "WARNING - No TH information found at all." << endl; 73 return kFALSE; 74 } 75 if (pr!=1154) 76 { 77 td.Invalidate(); 78 79 str.Remove(0, pr); 80 str=str.Strip(TString::kLeading); 81 return kTRUE; 82 } 83 } 84 85 const char *pos = str.Data(); 86 const char *end = str.Data()+577*2; 87 88 Int_t i=0; 89 while (pos<end) 90 { 91 const Char_t hex[3] = { pos[0], pos[1], 0 }; 92 pos += 2; 93 94 const Int_t n=sscanf(hex, "%2hhx", &fTH[i++]); 95 if (n==1) 96 continue; 97 98 *fLog << warn << "WARNING - Reading hexadecimal TH information." << endl; 99 return kFALSE; 100 } 101 102 SetValid(); 103 104 str.Remove(0, end-str.Data()); // Remove TH 105 str=str.Strip(TString::kLeading); 106 return kTRUE; 55 107 } 56 108 -
trunk/MagicSoft/Mars/mcamera/MCameraTH.h
r8287 r8955 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCameraTH.h,v 1. 7 2007-02-01 15:56:17tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MCameraTH.h,v 1.8 2008-06-14 14:19:03 tbretz Exp $ 3 3 \* ======================================================================== */ 4 4 #ifndef MARS_MCameraTH … … 16 16 #endif 17 17 18 class MCameraTD; 19 18 20 class MCameraTH : public MParContainer, public MCamEvent 19 21 { 20 22 friend class MReportCC; 23 friend class MReportRec; 21 24 private: 22 25 TArrayC fTH; // [au] discriminator thresholds 23 26 Bool_t fIsValid; // fTH contains valid information 27 28 Bool_t InterpreteTH(TString &str, Int_t ver, MCameraTD &td); 24 29 25 30 public:
Note:
See TracChangeset
for help on using the changeset viewer.