Changeset 5004
- Timestamp:
- 09/14/04 15:56:16 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhcalib/MHCalibrationPix.cc
r4962 r5004 62 62 // 63 63 MHCalibrationPix::MHCalibrationPix(const char *name, const char *title) 64 : f EventFrequency(0), fPixId(-1)64 : fPixId(-1) 65 65 { 66 66 … … 74 74 } 75 75 76 77 78 76 // -------------------------------------------------------------------------- 79 77 // … … 82 80 // Sets: 83 81 // - all other pointers to NULL 84 // - all variables to 0., except fPixId to -1 and keep fEventFrequency82 // - all variables to 0., except fPixId to -1 85 83 // - all flags to kFALSE 86 84 // 87 // Deletes (if not NULL):88 85 // - all pointers 89 86 // … … 152 149 // Copy data members 153 150 // 154 pix.fEventFrequency = fEventFrequency;155 151 pix.fBlackoutLimit = fBlackoutLimit; 156 152 pix.fSaturated = fSaturated; … … 206 202 fTitle = Form("%s%d", fTitle.Data(), id); 207 203 208 }209 210 211 // -----------------------------------------------------------------------------212 //213 // Create the x-axis for the event graph214 //215 Float_t *MHCalibrationPix::CreateEventXaxis(Int_t n)216 {217 218 Float_t *xaxis = new Float_t[n];219 220 if (fEventFrequency)221 for (Int_t i=0;i<n;i++)222 xaxis[i] = (Float_t)i/fEventFrequency;223 else224 for (Int_t i=0;i<n;i++)225 xaxis[i] = (Float_t)i;226 227 return xaxis;228 229 }230 231 // -----------------------------------------------------------------------------232 //233 // Create the x-axis for the event graph234 //235 Float_t *MHCalibrationPix::CreatePSDXaxis(Int_t n)236 {237 238 Float_t *xaxis = new Float_t[n];239 240 if (fEventFrequency)241 for (Int_t i=0;i<n;i++)242 xaxis[i] = 0.5*(Float_t)i*fEventFrequency/n;243 else244 for (Int_t i=0;i<n;i++)245 xaxis[i] = 0.5*(Float_t)i/n;246 247 return xaxis;248 249 }250 251 // ----------------------------------------------------------------------------------252 //253 // Create a graph to display the array fEvents254 // If the variable fEventFrequency is set, the x-axis is transformed into real time.255 //256 void MHCalibrationPix::CreateGraphEvents()257 {258 259 MHGausEvents::CreateGraphEvents();260 fGraphEvents->GetXaxis()->SetTitle((fEventFrequency) ? "Time [s]" : "Event Nr.");261 }262 263 // ----------------------------------------------------------------------------------264 //265 // Create a graph to display the array fPowerSpectrum266 // If the variable fEventFrequency is set, the x-axis is transformed into real frequency.267 //268 void MHCalibrationPix::CreateGraphPowerSpectrum()269 {270 271 MHGausEvents::CreateGraphPowerSpectrum();272 273 fGraphPowerSpectrum->GetXaxis()->SetTitle((fEventFrequency) ? "Frequency [Hz]" : "Frequency");274 204 } 275 205
Note:
See TracChangeset
for help on using the changeset viewer.