CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
Inspect_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/CompHist.h"
#include "Validation/RecoJets/bin/NiceStyle.cc"

Go to the source code of this file.

Classes

class  TopInspect
 

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 Inspect_calib.cc.

References ExpressReco_HICollisions_FallBack::cerr, gather_cfg::cout, CompHist::drawEps(), CompHist::drawPs(), CompHist::loadHistograms(), TopInspect::readConfig(), setNiceStyle(), and CompHist::writeAs().

31 {
32  setNiceStyle();
33  gStyle->SetOptStat( 0 );
34 
35  if( argc<2 ){
36  std::cerr << "ERROR:"
37  << " Missing argument" << std::endl;
38  return 1;
39  }
40 
41  TopInspect plots;
42  try{
43  plots.readConfig( argv[1] );
44  plots.loadHistograms();
45 
46  //depending on style draw ps/eps/jpg
47  if( !strcmp(plots.writeAs().c_str(), "ps") ){
48  plots.drawPs();
49  } else if( !strcmp(plots.writeAs().c_str(), "eps") ){
50  plots.drawEps();
51  } else{
52  std::cerr << "ERROR:"
53  << " Unknown file format requested: "
54  << plots.writeAs() << std::endl;
55  return -1;
56  }
57  }
58  catch(char* str){
59  std::cerr << "ERROR: " << str << std::endl;
60  return 1;
61  }
62  catch(...){
63  std::cerr << "ERROR: this one is new...";
64  return 1;
65  }
66  std::cout << "Thanx and GoodBye " << std::endl;
67  return 0;
68 }
virtual void readConfig(std::string)
void drawPs()
Definition: CompHist.cc:351
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 drawEps()
Definition: CompHist.cc:404
void setNiceStyle()
Definition: NiceStyle.cc:3