CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
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().

33 {
34  setNiceStyle();
35  gStyle->SetOptStat( 0 );
36 
37  if( argc<2 ){
38  std::cerr << "ERROR:"
39  << " Missing argument" << std::endl;
40  return 1;
41  }
42 
43  TopInspectRatio plots;
44  try{
45  plots.readConfig( argv[1] );
46  plots.loadHistograms();
47 
48  //depending on style draw ps/eps/jpg
49  if( !strcmp(plots.writeAs().c_str(), "ps") ){
50  plots.divideAndDrawPs();
51  } else if( !strcmp(plots.writeAs().c_str(), "eps") ){
52  plots.divideAndDrawEps();
53  } else{
54  std::cerr << "ERROR:"
55  << " Unknown file format requested: "
56  << plots.writeAs() << std::endl;
57  return -1;
58  }
59  plots.writeOutput();
60  }
61  catch(char* str){
62  std::cerr << "ERROR: " << str << std::endl;
63  return 1;
64  }
65  catch(...){
66  std::cerr << "ERROR: this one is new...";
67  return 1;
68  }
69  std::cout << "Thanx and GoodBye " << std::endl;
70  return 0;
71 }
void divideAndDrawEps()
Definition: ManipHist.cc:141
virtual void readConfig(std::string)
void loadHistograms(std::vector< std::string > &, std::vector< TObjArray > &)
Definition: CompHist.cc:159
std::string writeAs()
Definition: CompHist.h:50
tuple cout
Definition: gather_cfg.py:41
void divideAndDrawPs()
Definition: ManipHist.cc:86
void setNiceStyle()
Definition: NiceStyle.cc:3