Ignore:
Timestamp:
09/14/04 15:56:16 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationPix.cc

    r4962 r5004  
    6262//
    6363MHCalibrationPix::MHCalibrationPix(const char *name, const char *title)
    64     : fEventFrequency(0), fPixId(-1)
     64    : fPixId(-1)
    6565{
    6666
     
    7474}
    7575
    76 
    77      
    7876// --------------------------------------------------------------------------
    7977//
     
    8280// Sets:
    8381// - all other pointers to NULL
    84 // - all variables to 0., except fPixId to -1 and keep fEventFrequency
     82// - all variables to 0., except fPixId to -1
    8583// - all flags to kFALSE
    8684//
    87 // Deletes (if not NULL):
    8885// - all pointers
    8986//
     
    152149  // Copy data members
    153150  //
    154   pix.fEventFrequency       = fEventFrequency;
    155151  pix.fBlackoutLimit        = fBlackoutLimit;
    156152  pix.fSaturated            = fSaturated;     
     
    206202  fTitle = Form("%s%d", fTitle.Data(), id);
    207203
    208 }
    209 
    210 
    211 // -----------------------------------------------------------------------------
    212 //
    213 // Create the x-axis for the event graph
    214 //
    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   else
    224     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 graph
    234 //
    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   else
    244     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 fEvents
    254 // 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 fPowerSpectrum
    266 // 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");
    274204}
    275205
Note: See TracChangeset for help on using the changeset viewer.