CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
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 ExpressReco_HICollisions_FallBack::cerr, gather_cfg::cout, FitHist::fillTargetHistograms(), FitHist::fitAndDrawEps(), FitHist::fitAndDrawPs(), CompHist::loadHistograms(), TopInspectFit::readConfig(), setNiceStyle(), CompHist::writeAs(), and FitHist::writeFitOutput().

31 {
32  setNiceStyle();
33  gStyle->SetOptStat( 0 );
34  gStyle->SetOptFit ( 0 );
35 
36  gStyle->SetStatColor(0);
37  gStyle->SetStatBorderSize(0);
38  gStyle->SetStatX(0.93);
39  gStyle->SetStatY(0.93);
40  gStyle->SetStatW(0.18);
41  gStyle->SetStatH(0.18);
42 
43  if( argc<2 ){
44  std::cerr << "ERROR:"
45  << " Missing argument" << std::endl;
46  return 1;
47  }
48 
49  TopInspectFit plots;
50  try{
51  plots.readConfig( argv[1] );
52  plots.loadHistograms();
53 
54  //depending on style draw ps/eps/jpg
55  if( !strcmp(plots.writeAs().c_str(), "ps") ){
56  plots.fitAndDrawPs();
57  } else if( !strcmp(plots.writeAs().c_str(), "eps") ){
58  plots.fitAndDrawEps();
59  } else{
60  std::cerr << "ERROR:"
61  << " Unknown file format requested: "
62  << plots.writeAs() << std::endl;
63  return -1;
64  }
65  plots.fillTargetHistograms();
66  plots.writeFitOutput();
67  }
68  catch(char* str){
69  std::cerr << "ERROR: " << str << std::endl;
70  return 1;
71  }
72  catch(...){
73  std::cerr << "ERROR: this one is new...";
74  return 1;
75  }
76  std::cout << "works " << "thanx and GoodBye " << std::endl;
77  return 0;
78 }
void fitAndDrawPs()
Definition: FitHist.cc:314
void fitAndDrawEps()
Definition: FitHist.cc:414
void writeFitOutput()
Definition: FitHist.cc:562
virtual void readConfig(std::string)
void fillTargetHistograms()
Definition: FitHist.cc:512
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 setNiceStyle()
Definition: NiceStyle.cc:3