Changeset 4367 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
06/30/04 15:42:27 (20 years ago)
Author:
rico
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtemp/mifae
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mifae/Changelog

    r4356 r4367  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21  2004/06/30: Javier Rico
     22
     23    * mifae/library/MDisp.cc
     24      - Remove include of deprecated library
     25      - Define namespace
     26
     27    * mifae/library/MControlPlots.cc
     28      - Define style
     29      - Add projection
     30      - Plot 3rd plot correctly
     31      - Search for "MIsland" instead of "MIsland1" container
    2032
    2133  2004/06/26: Eva Domingo - Pepe Flix
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MControlPlots.cc

    r4364 r4367  
    3131#include <fstream>
    3232
     33#include "TStyle.h"
     34
    3335#include "MParList.h"
    3436#include "MControlPlots.h"
     
    8688
    8789  // look for MIslands object
    88   fIslands = (MIslands*)pList->FindObject("MIslands1");
     90  fIslands = (MIslands*)pList->FindObject("MIslands");
    8991  if (!fIslands)
    9092    *fLog << warn << AddSerialNumber("MIslands") << " [MIslands] not found... Some control plots will not be produced" << endl;
     
    129131    }
    130132
     133  // Canvas style
     134  gStyle->SetCanvasColor(0);
     135  gStyle->SetCanvasBorderMode(0);
     136  gStyle->SetPadBorderMode(0);
     137  gStyle->SetFrameBorderMode(0);
     138  gStyle->SetStatColor(0);
     139  gStyle->SetTitleFillColor(0);
     140
    131141  TCanvas* c = new TCanvas("survivals","Pixels surviving Image Cleaning",800,800);
     142  MHCamera* diff=NULL;
    132143
    133144  // in case both on and off histos are present, print both and the difference between them
    134145  if(fCameraHisto[kOn] && fCameraHisto[kOff])
    135146    {     
    136       MHCamera diff(*fGeomCam,"Diff","Pixels surviving Image Cleaning");
     147      diff = new MHCamera(*fGeomCam,"Diff","Pixels surviving Image Cleaning");
    137148 
    138       for(Int_t i=1;i<=diff.GetSize()-2;i++)
     149      for(Int_t i=1;i<diff->GetSize()-2;i++)
    139150        {
    140           diff.SetBinContent(i,(Double_t)fCameraHisto[kOn]->GetBinContent(i)-fCameraHisto[kOff]->GetBinContent(i));
    141           diff.SetUsed(i);
     151          diff->SetBinContent(i,(Double_t)fCameraHisto[kOn]->GetBinContent(i)-fCameraHisto[kOff]->GetBinContent(i));
     152          diff->SetUsed(i);
    142153        }     
    143154      fCameraHisto[kOn]->SetPrettyPalette();
    144155      fCameraHisto[kOff]->SetPrettyPalette();
    145       diff.SetPrettyPalette();
     156      diff->SetPrettyPalette();
    146157
    147158      c->Divide(2,2);
    148          
     159
     160      Float_t max = TMath::Max(fCameraHisto[kOn]->GetMaximum(),fCameraHisto[kOff]->GetMaximum());
     161      Float_t min = TMath::Min(fCameraHisto[kOn]->GetMinimum(),fCameraHisto[kOff]->GetMinimum());
     162      fCameraHisto[kOn]->SetMaximum(max);
     163      fCameraHisto[kOn]->SetMinimum(min);
     164      fCameraHisto[kOff]->SetMaximum(max);
     165      fCameraHisto[kOff]->SetMinimum(min);
     166     
    149167      c->cd(1);
    150168      fCameraHisto[kOn]->Draw();
     
    158176
    159177      c->cd(3);
    160       diff.Draw();
     178      diff->Draw();
    161179      gPad->Modified();
    162180      gPad->Update();     
     181
     182      c->cd(4);
     183      diff->DrawProjection();
     184      gPad->Modified();
     185      gPad->Update();
    163186    }
    164187  // plot the existing histo
     
    173196  c->SaveAs(fFileName);
    174197  delete c; 
     198  if(diff)
     199    delete diff;
    175200  return kTRUE;
    176201}
  • trunk/MagicSoft/Mars/mtemp/mifae/library/MDisp.cc

    r4316 r4367  
    4444#include "MDisp.h"
    4545
    46 #include <iostream.h>
     46#include <iostream>
    4747//#include <TArrayF.h>
    4848
     
    5050#include "MLogManip.h"
    5151
     52using namespace std;
    5253ClassImp(MDisp);
    5354
Note: See TracChangeset for help on using the changeset viewer.