Changeset 4553


Ignore:
Timestamp:
08/10/04 09:46:01 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mcalib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindCam.cc

    r4401 r4553  
    6767{
    6868
     69  fName  = name  ? name  : "MHCalibrationChargeBlindCam";
     70  fTitle = title ? title : "Class to fille the blind pixel histograms";
     71
    6972  fBlindPixelsArray = new TObjArray;
    7073  fBlindPixelsArray->SetOwner();
     
    107110// Deletes the TObjArray's and Clones them individually
    108111//
    109 TObject *MHCalibrationChargeBlindCam::Clone(const char *) const
     112TObject *MHCalibrationChargeBlindCam::Clone(const char *name) const
    110113{
    111114
     
    275278// Calls the Draw of the fAverageHiGainAreas and fAverageLoGainAreas objects with options
    276279//
    277 void MHCalibrationChargeBlindCam::Draw(const Option_t *opt)
     280void MHCalibrationChargeBlindCam::Draw(Option_t *opt)
    278281{
    279282
    280283  const Int_t size = fBlindPixelsArray->GetEntries();
     284
    281285  if (size == 0)
    282286    return;
     
    287291  TVirtualPad *pad = gPad ? gPad : MH::MakeDefCanvas(this); 
    288292  pad->SetBorderMode(0);
    289   pad->Divide(size/2+1,size/2+1);
     293
     294  switch (size)
     295    {
     296    case 1:
     297      break;
     298    case 2:
     299      pad->Divide(2,1);
     300      break;
     301    case 3:
     302    case 4:
     303      pad->Divide(2,2);
     304      break;
     305    default:
     306      pad->Divide(size/2+1,size/2+1);
     307      break;
     308    }
    290309
    291310  for (Int_t i=0; i<size;i++)
     
    294313      (*this)[i].Draw(option);
    295314    }
    296 }
     315
     316  pad->Modified();
     317  pad->Update();
     318
     319}
  • trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindCam.h

    r4400 r4553  
    2929  MRawRunHeader              *fRunHeader;  //!  Run Header
    3030 
    31   TObjArray *fBlindPixelsArray;          //-> Array of calibration pixels, one per pixel
     31  TObjArray *fBlindPixelsArray;            //-> Array of calibration pixels, one per pixel
    3232
    3333public:
     
    4242
    4343  // Clone
    44   TObject *Clone(const char *) const;
     44  TObject *Clone(const char *name="") const;
    4545 
    4646  // Draw
    47   void   Draw(const Option_t *opt);
     47  void   Draw(Option_t *opt="");
    4848 
    49   const Int_t    GetSize       ()    const  { return fBlindPixelsArray->GetSize(); }
     49  const Int_t GetSize() const  { return fBlindPixelsArray->GetSize(); }
    5050 
    51       MHCalibrationChargeBlindPix  &operator[]            (UInt_t i);
    52   const MHCalibrationChargeBlindPix  &operator[]            (UInt_t i)  const;
     51        MHCalibrationChargeBlindPix &operator[] (UInt_t i);
     52  const MHCalibrationChargeBlindPix &operator[] (UInt_t i)  const;
    5353 
    54   ClassDef(MHCalibrationChargeBlindCam, 0)      // Histogram class for Blind Pixel Calibration
     54  ClassDef(MHCalibrationChargeBlindCam, 1)      // Histogram class for Blind Pixel Calibration
    5555};
    5656
Note: See TracChangeset for help on using the changeset viewer.