@@ -0,0 +1,1389 @@
+#!/usr/bin/env python%0A# Tai Sakuma %3Csakuma@fnal.gov%3E%0Aimport ROOT%0Aimport sys%0Afrom optparse import OptionParser%0A%0Afrom Counter import *%0Aimport AlphaTwirl%0A%0A##____________________________________________________________________________%7C%7C%0AROOT.gROOT.SetBatch(1)%0A%0A##____________________________________________________________________________%7C%7C%0Aparser = OptionParser()%0Aparser.add_option('-i', '--inputPath', default = '/afs/cern.ch/work/a/aelwood/public/alphaT/cmgtools/PHYS14/201525_SingleMu/TTJets/treeProducerSusyAlphaT/tree.root', action = 'store', type = 'string')%0Aparser.add_option(%22-n%22, %22--nevents%22, default = -1, action = %22store%22, type = 'long', help = %22maximum number of events to process%22)%0Aparser.add_option(%22-t%22, %22--treeName%22, default = 'tree', action = %22store%22, type = 'string', help = %22the name of the tree%22)%0A(options, args) = parser.parse_args(sys.argv)%0A%0A##____________________________________________________________________________%7C%7C%0Afile = ROOT.TFile.Open(options.inputPath)%0Atree = file.Get(options.treeName)%0Aevents = AlphaTwirl.Events(tree, options.nevents)%0A%0Acounter_nvtx = Counter_nvtx()%0A%0Afor event in events:%0A    run = event.run%0A    lumi = event.lumi%0A    eventId = event.evt%0A    print '%256d %2510d %259d' %25 (run, lumi, eventId),%0A    print%0A    counter_nvtx.event(event)%0A%0Aprint counter_nvtx.results()%0A%0A##____________________________________________________________________________%7C%7C%0A

add an example loopOneTreeOneCounter.py