CMS 3D CMS Logo

Macros | Functions
MuScleFitTreeProvenance.cc File Reference
#include <iostream>
#include <TH1F.h>
#include <TROOT.h>
#include <TFile.h>
#include <TSystem.h>
#include "FWCore/FWLite/interface/FWLiteEnabler.h"
#include "PhysicsTools/FWLite/interface/TFileService.h"
#include "MuonAnalysis/MomentumScaleCalibration/interface/MuScleFitProvenance.h"

Go to the source code of this file.

Macros

#define MuScleFitTreeProvenance_cc
 

Functions

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

Macro Definition Documentation

#define MuScleFitTreeProvenance_cc

Definition at line 2 of file MuScleFitTreeProvenance.cc.

Function Documentation

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

Definition at line 15 of file MuScleFitTreeProvenance.cc.

References gather_cfg::cout, MillePedeFileConverter_cfg::fileName, and AlCaHLTBitMon_QueryRunRegistry::string.

16 {
17  if( argc != 2 ) {
18  std::cout << "Please provide the name of the file with file: or rfio: as needed" << std::endl;
19  return 1;
20  }
22  if( fileName.find("file:") != 0 && fileName.find("rfio:") != 0 ) {
23  std::cout << "Please provide the name of the file with file: or rfio: as needed" << std::endl;
24  return 1;
25  }
26 
27  std::cout << "Reading provenance information from the tree:" << std::endl;
28 
29  // open input file (can be located on castor)
30  TFile* inFile = TFile::Open(fileName.c_str());
31 
32  MuScleFitProvenance * provenance = (MuScleFitProvenance*)(inFile->Get("MuScleFitProvenance"));
33  std::cout << "MuonType = " << provenance->muonType << std::endl;
34 
35  return 0;
36 }