Changeset 8398
- Timestamp:
- 04/12/07 12:47:20 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mbase/MArrayB.h
r7808 r8398 111 111 } 112 112 113 void Reset(Byte_t v) 114 { 115 for (Byte_t *b=fArray; b<fArray+fN; b++) 116 *b = v; 117 } 118 119 113 120 void Set(UInt_t n) 114 121 { -
trunk/MagicSoft/Mars/mbase/MArrayD.h
r8129 r8398 96 96 } 97 97 98 void Reset(Double_t v) 99 { 100 for (Double_t *d=fArray; d<fArray+fN; d++) 101 *d = v; 102 } 103 98 104 void Set(UInt_t n) 99 105 { -
trunk/MagicSoft/Mars/mbase/MArrayF.h
r8129 r8398 96 96 } 97 97 98 void Reset(Float_t f)98 void Reset(Float_t v) 99 99 { 100 for ( UInt_t i=0; i<fN; i++)101 fArray[i] = f;100 for (Float_t *f=fArray; f<fArray+fN; f++) 101 *f = v; 102 102 } 103 103 -
trunk/MagicSoft/Mars/mbase/MArrayI.h
r7808 r8398 95 95 } 96 96 97 void Reset(Int_t v) 98 { 99 for (Int_t *i=fArray; i<fArray+fN; i++) 100 *i = v; 101 } 102 97 103 void Set(UInt_t n) 98 104 { -
trunk/MagicSoft/Mars/mbase/MArrayS.h
r7808 r8398 103 103 } 104 104 105 void Reset(UShort_t v) 106 { 107 for (UShort_t *s=fArray; s<fArray+fN; s++) 108 *s = v; 109 } 110 105 111 void Set(UInt_t n) 106 112 { -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r8217 r8398 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.17 1 2006-12-04 14:22:29 tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.172 2007-04-12 11:47:19 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 1886 1886 } 1887 1887 1888 *fLog << inf << "Area 1888 *fLog << inf << "Area " << setw(4) << i <<": Mean F-Factor :" 1889 1889 << Form("%4.2f+-%4.2f",mean,sigma) << endl; 1890 1890 -
trunk/MagicSoft/Mars/mhbase/MBinning.h
r7804 r8398 96 96 const TArrayD &GetEdgesD() const { return fEdges; } 97 97 98 Double_t operator[](Int_t i) const { return fEdges[i]; } 99 98 100 void AddEdge(Axis_t up); 99 101 void RemoveFirstEdge(); -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r8286 r8398 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.10 1 2007-02-01 15:14:28tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.102 2007-04-12 11:47:19 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 22 22 ! Author(s): Markus Gaug, 03/2004 <mailto:markus@ifae.es> 23 23 ! 24 ! Copyright: MAGIC Software Development, 2000-200 424 ! Copyright: MAGIC Software Development, 2000-2007 25 25 ! 26 26 ! … … 1194 1194 { 1195 1195 gStyle->SetPalette(51, NULL); 1196 TArrayI c(kItemsLegend); 1197 for (int i=0; i<kItemsLegend; i++) 1198 c[kItemsLegend-i-1] = gStyle->GetColorPalette(i); 1199 gStyle->SetPalette(kItemsLegend, c.GetArray()); 1196 1197 const Int_t n = GetContour()==0?50:GetContour(); 1198 1199 TArrayI c(n); 1200 for (int i=0; i<n; i++) 1201 c[n-i-1] = gStyle->GetColorPalette(i); 1202 gStyle->SetPalette(n, c.GetArray()); 1200 1203 } 1201 1204 else … … 1721 1724 // first treat the over- and under-flows 1722 1725 // 1723 const Int_t maxcolidx = kItemsLegend-1; 1726 const Int_t ncol = GetContour()==0?50:GetContour(); 1727 1728 const Int_t maxcolidx = ncol-1; 1724 1729 1725 1730 if (!TMath::Finite(val)) // FIXME: gLog! … … 1741 1746 ratio = (val-min) / (max-min); 1742 1747 1743 const Int_t colidx = (Int_t)(ratio*maxcolidx + .5);1748 const Int_t colidx = TMath::FloorNint(ratio*ncol); 1744 1749 return gStyle->GetColorPalette(colidx); 1745 1750 } … … 1796 1801 const Float_t offset = hndc*range; 1797 1802 1798 const Float_t h = 2./kItemsLegend; 1803 const Int_t ncol = GetContour()==0 ? 50 : GetContour(); 1804 1805 const Float_t h = 2./ncol; 1799 1806 const Float_t w = range/sqrt((float)(fNcells-2)); 1800 1807 … … 1808 1815 #endif 1809 1816 1810 const Float_t step = (islog && min>0 ? log10(max/min) : max-min) / kItemsLegend;1811 const Int_t firsts = step *3 < 1e-8 ? 8 : (Int_t)floor(log10(step*3));1817 const Float_t step = (islog && min>0 ? log10(max/min) : max-min); 1818 const Int_t firsts = step/48*3 < 1e-8 ? 8 : (Int_t)floor(log10(step/48*3)); 1812 1819 const TString opt = Form("%%.%if", firsts>0 ? 0 : TMath::Abs(firsts)); 1813 1814 for (Int_t i=0; i< kItemsLegend+1; i+=3)1820 /* 1821 for (Int_t i=0; i<ncol+1; i+=3) 1815 1822 { 1816 1823 Float_t val; … … 1822 1829 //const bool dispexp = max-min>1.5 && fabs(val)>0.1 && fabs(val)<1e6; 1823 1830 newtxt.PaintText(range+1.5*w, H*(i*h-1)-offset, Form(opt, val)); 1824 } 1825 1826 for (Int_t i=0; i<kItemsLegend; i++) 1831 } 1832 */ 1833 const MBinning bins(25, min, max, islog&&min>0?"log":"lin"); 1834 1835 for (Int_t i=0; i<=25; i++) 1836 newtxt.PaintText(range+1.5*w, H*(i*ncol/25*h-1)-offset, Form(opt, bins[i])); 1837 1838 for (Int_t i=0; i<ncol; i++) 1827 1839 { 1828 1840 newbox.SetFillColor(gStyle->GetColorPalette(i)); -
trunk/MagicSoft/Mars/mjobs/MDataSet.h
r8244 r8398 142 142 143 143 // TObject 144 void Print(Option_t *o="") const; 144 void Print(Option_t *o="") const; //*MENU* 145 145 146 ClassDef(MDataSet, 0)146 ClassDef(MDataSet, 1) 147 147 }; 148 148 -
trunk/MagicSoft/Mars/mjobs/MSequence.h
r8256 r8398 76 76 77 77 // TObject 78 void Print(Option_t *o="") const; 78 void Print(Option_t *o="") const; //*MENU* 79 79 80 80 // Genaral interface … … 133 133 UInt_t AddDatRuns(UInt_t num) { return AddDatRuns(num, num); } 134 134 135 ClassDef(MSequence, 0)135 ClassDef(MSequence, 1) 136 136 }; 137 137
Note:
See TracChangeset
for help on using the changeset viewer.