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.

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