Changeset 7444 for trunk/MagicSoft
- Timestamp:
- 12/06/05 14:24:59 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7442 r7444 30 30 - added a function to calc upper limits 31 31 - exchaged some GetListOfFunctions()-Remove() with SetName 32 33 * mcamera/Makefile, mcamera/CameraLinkDef.h: 34 - added MCameraTD, MCameraTH and MCameraRecTemp 35 36 * showplot.cc: 37 - fixed a bug which caused trouble if only a filename was given 38 39 * mastro/MAstro.h: 40 - added conversion constant to convert parsec to meter 41 42 * mcamera/MCameraHV.h: 43 - only layout changes 44 45 * mcamera/MCameraRecTemp.[h,cc], mcamera/MCameraTD.[h,cc], 46 mcamera/MCameraTH.[h,cc]: 47 - removed weired obsolste operators (which won't work at all) 48 - fixed calculation of max and min value 49 - replaced the nonsense TArrayS by TArrayC because the contents is 50 just a byte 51 52 * ganymed.cc: 53 - fixed compilation of path to datasets 32 54 33 55 -
trunk/MagicSoft/Mars/ganymed.cc
r7432 r7444 173 173 { 174 174 const Int_t numseq = kSequences.Atoi(); 175 kSequences = Form("/magic/datasets/%0 4d/dataset%08d.txt", numseq/10000, numseq);175 kSequences = Form("/magic/datasets/%05d/dataset%08d.txt", numseq/1000, numseq); 176 176 gLog << inf << "inflated dataset file: " << kSequences << endl; 177 177 } -
trunk/MagicSoft/Mars/mastro/MAstro.h
r7432 r7444 21 21 22 22 public: 23 // Unit conversion 24 static Double_t Parsec2Meter() { return 3.0856776e+16; } 25 26 23 27 // Angle/Time conversion functions 24 28 static Double_t Hms2Sec(Int_t deg, UInt_t min, Double_t sec, char sgn='+'); -
trunk/MagicSoft/Mars/mcamera/MCameraHV.h
r7202 r7444 48 48 Float_t GetMean() const { return fHV.GetSum()/fHV.GetSize(); } 49 49 50 Double_t operator[](const UInt_t idx) { return fHV[idx]; } 51 52 void DrawPixelContent(Int_t num) const { } 50 53 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const 51 54 { … … 54 57 } 55 58 56 Double_t operator[](const UInt_t idx) { return fHV[idx]; }57 58 void DrawPixelContent(Int_t num) const59 {60 }61 62 59 ClassDef(MCameraHV, 2) // Container storing information about the Camera HV 63 60 }; -
trunk/MagicSoft/Mars/mcamera/MCameraRecTemp.cc
r7430 r7444 26 26 ///////////////////////////////////////////////////////////////////////////// 27 27 // 28 // MCameraRecTemp (PRELIMINARY)28 // MCameraRecTemp 29 29 // 30 30 ///////////////////////////////////////////////////////////////////////////// … … 59 59 *fLog << all << underline << GetDescriptor() << endl; 60 60 for (int i=0; i<fRecTemp.GetSize(); i++) 61 *fLog << " " << GetRecTemp(i);61 *fLog << " " << fRecTemp[i]; 62 62 *fLog << endl; 63 63 } … … 69 69 Float_t MCameraRecTemp::GetMin() const 70 70 { 71 Float_t val = (UInt_t)-1;71 Float_t val = FLT_MAX; 72 72 for (int i=0; i<fRecTemp.GetSize(); i++) 73 val = TMath::Min(val, GetRecTemp(i));73 val = TMath::Min(val, fRecTemp[i]); 74 74 return val; 75 75 } … … 81 81 Float_t MCameraRecTemp::GetMax() const 82 82 { 83 Float_t val = 0;83 Float_t val = -FLT_MAX; 84 84 for (int i=0; i<fRecTemp.GetSize(); i++) 85 val = TMath::Max(val, GetRecTemp(i));85 val = TMath::Max(val, fRecTemp[i]); 86 86 return val; 87 87 } -
trunk/MagicSoft/Mars/mcamera/MCameraRecTemp.h
r7430 r7444 19 19 MCameraRecTemp(Int_t size=76, const char *name=NULL, const char *title=NULL); 20 20 21 void SetRecTemp(Int_t i, Float_t val) { fRecTemp[i] = (Int_t)val; } 22 Float_t GetRecTemp(Int_t i) const { return (*this)[i]; } 23 Float_t &operator[](Int_t i) { return (Float_t&)fRecTemp[i]; } 24 const Float_t &operator[](Int_t i) const { return (*const_cast<MCameraRecTemp*>(this))[i]; } 21 Float_t operator[](Int_t i) const { return fRecTemp[i]; } 25 22 26 23 Float_t GetMin() const; -
trunk/MagicSoft/Mars/mcamera/MCameraTD.cc
r7430 r7444 26 26 ///////////////////////////////////////////////////////////////////////////// 27 27 // 28 // MCameraTD (PRELIMINARY)28 // MCameraTD 29 29 // 30 30 ///////////////////////////////////////////////////////////////////////////// … … 53 53 // -------------------------------------------------------------------------- 54 54 // 55 // Print the d c currents55 // Print the discrimintaor delays 56 56 // 57 57 void MCameraTD::Print(Option_t *) const … … 59 59 *fLog << all << underline << GetDescriptor() << endl; 60 60 for (int i=0; i<fTD.GetSize(); i++) 61 *fLog << " " << GetDelay(i);61 *fLog << " " << (int)fTD[i]; 62 62 *fLog << endl; 63 63 } … … 65 65 // -------------------------------------------------------------------------- 66 66 // 67 // Return the minimum discriminator delays67 // Return the discrimintaor delays 68 68 // 69 Float_t MCameraTD::GetMin() const69 Byte_t MCameraTD::GetMin() const 70 70 { 71 Float_t val = (UInt_t)-1;71 Byte_t val = 0xff; 72 72 for (int i=0; i<fTD.GetSize(); i++) 73 val = TMath::Min(val, GetDelay(i));73 val = TMath::Min(val, fTD[i]); 74 74 return val; 75 75 } … … 77 77 // -------------------------------------------------------------------------- 78 78 // 79 // Return the maximum discriminator delays79 // Return the discrimintaor delays 80 80 // 81 Float_t MCameraTD::GetMax() const81 Byte_t MCameraTD::GetMax() const 82 82 { 83 Float_t val = 0;83 Byte_t val = 0; 84 84 for (int i=0; i<fTD.GetSize(); i++) 85 val = TMath::Max(val, GetDelay(i));85 val = TMath::Max(val, fTD[i]); 86 86 return val; 87 87 } -
trunk/MagicSoft/Mars/mcamera/MCameraTD.h
r7430 r7444 9 9 #endif 10 10 11 #ifndef ROOT_TArray S12 #include <TArray S.h>11 #ifndef ROOT_TArrayC 12 #include <TArrayC.h> 13 13 #endif 14 14 … … 17 17 friend class MReportCC; 18 18 private: 19 TArray SfTD; // [au] discriminator delays19 TArrayC fTD; // [au] discriminator delays 20 20 21 21 public: 22 22 MCameraTD(Int_t size=577, const char *name=NULL, const char *title=NULL); 23 23 24 void SetDelay(Int_t i, Float_t val) { fTD[i] = (Int_t)val; } 25 Float_t GetDelay(Int_t i) const { return (*this)[i]; } 26 Float_t &operator[](Int_t i) { return (Float_t&)fTD[i]; } 27 const Float_t &operator[](Int_t i) const { return (*const_cast<MCameraTD*>(this))[i]; } 24 Byte_t operator[](Int_t i) { return fTD[i]; } 28 25 29 Float_t GetMin() const;30 Float_t GetMax() const;26 Byte_t GetMin() const; 27 Byte_t GetMax() const; 31 28 32 29 void Print(Option_t *opt=NULL) const; -
trunk/MagicSoft/Mars/mcamera/MCameraTH.cc
r7430 r7444 53 53 // -------------------------------------------------------------------------- 54 54 // 55 // Print the d c currents55 // Print the discriminator thresholds 56 56 // 57 57 void MCameraTH::Print(Option_t *) const … … 59 59 *fLog << all << underline << GetDescriptor() << endl; 60 60 for (int i=0; i<fTH.GetSize(); i++) 61 *fLog << " " << GetThreshold(i);61 *fLog << " " << (int)fTH[i]; 62 62 *fLog << endl; 63 63 } … … 65 65 // -------------------------------------------------------------------------- 66 66 // 67 // Return the minimum dc current67 // Return the discriminator thresholds 68 68 // 69 Float_t MCameraTH::GetMin() const69 Byte_t MCameraTH::GetMin() const 70 70 { 71 Float_t val = (UInt_t)-1;71 Byte_t val = 0xff; 72 72 for (int i=0; i<fTH.GetSize(); i++) 73 val = TMath::Min(val, GetThreshold(i));73 val = TMath::Min(val, fTH[i]); 74 74 return val; 75 75 } … … 77 77 // -------------------------------------------------------------------------- 78 78 // 79 // Return the maximum dc current79 // Return the discriminator thresholds 80 80 // 81 Float_t MCameraTH::GetMax() const81 Byte_t MCameraTH::GetMax() const 82 82 { 83 Float_t val = 0;83 Byte_t val = 0; 84 84 for (int i=0; i<fTH.GetSize(); i++) 85 val = TMath::Max(val, GetThreshold(i));85 val = TMath::Max(val, fTH[i]); 86 86 return val; 87 87 } -
trunk/MagicSoft/Mars/mcamera/MCameraTH.h
r7430 r7444 9 9 #endif 10 10 11 #ifndef ROOT_TArray S12 #include <TArray S.h>11 #ifndef ROOT_TArrayC 12 #include <TArrayC.h> 13 13 #endif 14 14 … … 17 17 friend class MReportCC; 18 18 private: 19 TArray SfTH; // [au] discriminator thresholds19 TArrayC fTH; // [au] discriminator thresholds 20 20 21 21 public: 22 22 MCameraTH(Int_t size=577, const char *name=NULL, const char *title=NULL); 23 23 24 void SetThreshold(Int_t i, Float_t val) { fTH[i] = (Int_t)val; } 25 Float_t GetThreshold(Int_t i) const { return (*this)[i]; } 26 Float_t &operator[](Int_t i) { return (Float_t&)fTH[i]; } 27 const Float_t &operator[](Int_t i) const { return (*const_cast<MCameraTH*>(this))[i]; } 24 Byte_t operator[](Int_t i) { return fTH[i]; } 28 25 29 Float_t GetMin() const;30 Float_t GetMax() const;26 Byte_t GetMin() const; 27 Byte_t GetMax() const; 31 28 32 29 void Print(Option_t *opt=NULL) const; -
trunk/MagicSoft/Mars/showplot.cc
r7436 r7444 137 137 return 3; 138 138 } 139 if (arg.GetNumArguments()<1 || arg.GetNumArguments()>2 || !arg.GetArgumentStr(1).IsDigit()) 139 if (arg.GetNumArguments()<1 || arg.GetNumArguments()>2) 140 { 141 Usage(); 142 return 2; 143 } 144 if (arg.GetNumArguments()==2 && !arg.GetArgumentStr(1).IsDigit()) 140 145 { 141 146 Usage();
Note:
See TracChangeset
for help on using the changeset viewer.