CMS 3D CMS Logo

printConversionInfo.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 from __future__ import print_function
4 import ROOT
5 import sys
6 from DataFormats.FWLite import Events, Handle
7 
8 from FWCore.ParameterSet.VarParsing import VarParsing
9 options = VarParsing ('python')
10 options.parseArguments()
11 
12 print("maxEvents", options.maxEvents)
13 
14 events = Events (options)
15 conversionHandle = Handle ('vector<reco::Conversion>')
16 conversionLabel = ("conversions")
17 
18 for event in events:
19  aux = event.object().eventAuxiliary()
20  print("run %6d event %d" % (aux.run(), aux.event()))
21  event.getByLabel (conversionLabel, conversionHandle)
22  conversionVector = conversionHandle.product()
23  for index, conversion in enumerate (conversionVector):
24  print(" %2d %8.4f" % (index, conversion.EoverP()))
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65