CMS 3D CMS Logo

Classes | Functions

/data/refman/pasoursint/CMSSW_4_1_8_patch12/src/Validation/RecoJets/bin/InspectRatio_calib.cc File Reference

#include <memory>
#include <string>
#include <cstdlib>
#include <sstream>
#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/ManipHist.h"
#include "Validation/RecoJets/bin/NiceStyle.cc"

Go to the source code of this file.

Classes

class  TopInspectRatio

Functions

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

Function Documentation

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

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

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

Definition at line 32 of file InspectRatio_calib.cc.

References ExpressReco_HICollisions_FallBack::cerr, gather_cfg::cout, ManipHist::divideAndDrawEps(), ManipHist::divideAndDrawPs(), CompHist::loadHistograms(), TopInspectRatio::readConfig(), setNiceStyle(), CompHist::writeAs(), and TopInspectRatio::writeOutput().

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

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

  TopInspectRatio plots;
  try{
    plots.readConfig( argv[1] );
    plots.loadHistograms();
    
    //depending on style draw ps/eps/jpg
    if( !strcmp(plots.writeAs().c_str(), "ps") ){
      plots.divideAndDrawPs();
    } else if( !strcmp(plots.writeAs().c_str(), "eps") ){
      plots.divideAndDrawEps();
    } else{
      std::cerr << "ERROR:"
           << " Unknown file format requested: "
           << plots.writeAs() << std::endl; 
      return -1;
    }
    plots.writeOutput();
  }
  catch(char* str){
    std::cerr << "ERROR: " << str << std::endl;
    return 1;
  }
  catch(...){
    std::cerr << "ERROR: this one is new...";
      return 1;
  }
  std::cout << "Thanx and GoodBye " << std::endl;
  return 0;
}