- Timestamp:
- 06/02/03 13:48:05 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2147 r2150 19 19 * mgui/MCamDisplay.[h,cc]: 20 20 - added current support 21 22 * mbase/MTime.h: 23 - preliminary changes to support currents 24 25 * mhist/MH.[h,cc]: 26 - added usescreenfactor to MakeDefCanvas 27 21 28 22 29 -
trunk/MagicSoft/Mars/mbase/MTime.h
r2149 r2150 17 17 { 18 18 private: 19 UInt_t fTimeStamp[2]; // type of raw event which should be processed by this task 20 UInt_t fDuration; // time of validity 19 UInt_t fTimeStamp[2]; // type of raw event which should be processed by this task 20 UInt_t fDuration; // time of validity 21 22 Byte_t fHour; 23 Byte_t fMin; 24 Byte_t fSec; 25 UInt_t fNanoSec; 21 26 22 27 public: 23 24 28 MTime(const char *name=NULL, const char *title=NULL) 25 29 { … … 59 63 } 60 64 65 void SetCT1Time(UInt_t t1, UInt_t t0) 66 { 67 // int isecs_since_midday; // seconds passed since midday before sunset (JD of run start) 68 // int isecfrac_200ns; // fractional part of isecs_since_midday 69 // fTime->SetTime(isecfrac_200ns, isecs_since_midday); 70 fNanoSec = 200*t1; 71 fSec = t0%60; 72 t0 /= 60; 73 fMin = t0%60; 74 t0 /= 60; 75 fHour = (t0+12)%24; 76 } 77 78 void SetTime(Byte_t h, Byte_t m, Byte_t s, UShort_t ns) 79 { 80 fHour = h; 81 fMin = m; 82 fSec = s; 83 fNanoSec = ns; 84 } 85 61 86 void SetDuration(UInt_t t) 62 87 { … … 82 107 return fDuration; 83 108 } 84 85 void SetTime(int, int, int, int) {}86 109 87 110 ClassDef(MTime, 1) //A generalized MARS time stamp -
trunk/MagicSoft/Mars/mhist/MH.cc
r2109 r2150 55 55 #include <TH2.h> 56 56 #include <TH3.h> 57 #include <TStyle.h> // TStyle::GetScreenFactor 57 58 #include <TGaxis.h> 58 59 #include <TCanvas.h> … … 128 129 // number of all existing canvases plus one) 129 130 // 131 // Normally the canvas size is scaled with gStyle->GetScreenFactor() so 132 // that on all screens it looks like the same part of the screen. 133 // To suppress this scaling use usescreenfactor=kFALSE. In this case 134 // you specify directly the size of the embedded pad. 135 // 130 136 TCanvas *MH::MakeDefCanvas(TString name, const char *title, 131 const UInt_t w, const UInt_t h)137 UInt_t w, UInt_t h, Bool_t usescreenfactor) 132 138 { 133 139 const TList *list = (TList*)gROOT->GetListOfCanvases(); … … 139 145 name += Form(" <%d>", list->GetSize()+1); 140 146 147 if (!usescreenfactor) 148 { 149 const Float_t cx = gStyle->GetScreenFactor(); 150 w += 4; 151 h += 28; 152 w = (int)(w/cx+1); 153 h = (int)(h/cx+1); 154 } 155 141 156 return new TCanvas(name, title, w, h); 142 157 } … … 147 162 // and title are retrieved from the given TObject. 148 163 // 164 // Normally the canvas size is scaled with gStyle->GetScreenFactor() so 165 // that on all screens it looks like the same part of the screen. 166 // To suppress this scaling use usescreenfactor=kFALSE. In this case 167 // you specify directly the size of the embedded pad. 168 // 149 169 TCanvas *MH::MakeDefCanvas(const TObject *obj, 150 const UInt_t w, const UInt_t h) 151 { 170 UInt_t w, UInt_t h, Bool_t usescreenfactor) 171 { 172 if (!usescreenfactor) 173 { 174 const Float_t cx = gStyle->GetScreenFactor(); 175 w += 4; 176 h += 28; 177 h = (int)(h/cx+1); 178 w = (int)(w/cx+1); 179 } 180 152 181 return MakeDefCanvas(obj->GetName(), obj->GetTitle(), w, h); 153 182 } -
trunk/MagicSoft/Mars/mhist/MH.h
r2117 r2150 33 33 34 34 static TCanvas *MakeDefCanvas(TString name="", const char *title="", 35 const UInt_t w=625, const UInt_t h=440); 35 UInt_t w=625, UInt_t h=440, 36 Bool_t usescreenfactor=kTRUE); 36 37 static TCanvas *MakeDefCanvas(const TObject *obj, 37 const UInt_t w=625, const UInt_t h=440); 38 UInt_t w=625, UInt_t h=440, 39 Bool_t usescreenfactor=kFALSE); 38 40 39 41 // FIXME: * --> & !!!
Note:
See TracChangeset
for help on using the changeset viewer.