CMS 3D CMS Logo

Classes | Functions

/data/refman/pasoursint/CMSSW_5_3_3/src/Validation/RecoJets/bin/InspectFit_calib.cc File Reference

#include <memory>
#include <string>
#include <fstream>
#include <iostream>
#include "Validation/RecoJets/interface/RootSystem.h"
#include "Validation/RecoJets/interface/RootHistograms.h"
#include "Validation/RecoJets/interface/RootPostScript.h"
#include "Validation/RecoJets/interface/FitHist.h"
#include "Validation/RecoJets/bin/NiceStyle.cc"

Go to the source code of this file.

Classes

class  TopInspectFit

Functions

int main (int argc, char *argv[])

Function Documentation

int main ( int  argc,
char *  argv[] 
)

------------------ CALO JETS ------------------

------------------ PF JETS ------------------

Definition at line 30 of file InspectFit_calib.cc.

References dtNoiseDBValidation_cfg::cerr, gather_cfg::cout, FitHist::fillTargetHistograms(), FitHist::fitAndDrawEps(), FitHist::fitAndDrawPs(), CompHist::loadHistograms(), RecoTauValidation_cfi::plots, TopInspectFit::readConfig(), setNiceStyle(), CompHist::writeAs(), and FitHist::writeFitOutput().

{
  setNiceStyle();
  gStyle->SetOptStat( 0 );
  gStyle->SetOptFit ( 0 );

  gStyle->SetStatColor(0);
  gStyle->SetStatBorderSize(0);
  gStyle->SetStatX(0.93);
  gStyle->SetStatY(0.93);
  gStyle->SetStatW(0.18);
  gStyle->SetStatH(0.18);

  if( argc<2 ){
    std::cerr << "ERROR:" 
         << " Missing argument" << std::endl;
    return 1;
  }

  TopInspectFit plots;
  try{
    plots.readConfig( argv[1] );
    plots.loadHistograms();

    //depending on style draw ps/eps/jpg
    if( !strcmp(plots.writeAs().c_str(), "ps") ){
      plots.fitAndDrawPs();
    } else if( !strcmp(plots.writeAs().c_str(), "eps") ){
      plots.fitAndDrawEps();
    } else{
      std::cerr << "ERROR:"
           << " Unknown file format requested: "
           << plots.writeAs() << std::endl; 
      return -1;
    }
    plots.fillTargetHistograms();
    plots.writeFitOutput();
  }
  catch(char* str){
    std::cerr << "ERROR: " << str << std::endl;
    return 1;
  }
  catch(...){
    std::cerr << "ERROR: this one is new...";
      return 1;
  }
  std::cout << "works " << "thanx and GoodBye " << std::endl; 
  return 0;
}