1 from DataFormats.FWLite
import Events
as FWLiteEvents
3 from ROOT
import gROOT, gSystem, AutoLibraryLoader
5 print "Loading FW Lite" 6 gSystem.Load(
"libFWCoreFWLite");
7 gROOT.ProcessLine(
'FWLiteEnabler::enable();')
9 gSystem.Load(
"libFWCoreFWLite");
10 gSystem.Load(
"libDataFormatsPatCandidates");
12 from ROOT
import gInterpreter
13 gInterpreter.ProcessLine(
"using namespace reco;")
14 gInterpreter.ProcessLine(
"using edm::refhelper::FindUsingAdvance;")
17 def __init__(self, files, tree_name, options=None):
18 if options
is not None :
19 if not hasattr(options,
"inputFiles"):
20 options.inputFiles=files
21 if not hasattr(options,
"maxEvents"):
23 if not hasattr(options,
"secondaryInputFiles"):
24 options.secondaryInputFiles = []
25 self.
events = FWLiteEvents(options=options)
27 self.
events = FWLiteEvents(files)
30 return self.events.size()
33 return getattr(self.
events, key)
def __getitem__(self, iEv)
def __init__(self, files, tree_name, options=None)
def __getattr__(self, key)