ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/LEP3/auxiliar.py
Revision: 1.1
Committed: Sun May 27 21:18:51 2012 UTC (12 years, 11 months ago) by mzanetti
Content type: text/x-python
Branch: MAIN
Log Message:
set of py macros to fill trees for LEP3 analysis

File Contents

# User Rev Content
1 mzanetti 1.1 #!/usr/bin/env python
2    
3     from DataFormats.FWLite import Events, Handle
4    
5     def edmObjects() :
6     handles = {}
7     handles['muons'] = Handle ("std::vector<reco::Muon>")
8     labels = {}
9     labels['muons'] = ("muons")
10     return handles, labels
11    
12     def getDataset(name='WW', eosPath='/store/user/klute/LEP3/'):
13     import subprocess
14     inputFilesSet = []
15     eosFolderContent = subprocess.Popen('cmsLs '+eosPath+name, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
16     for line in eosFolderContent.stdout.readlines():
17     filename = ''
18     if len(line)>1:
19     filename = line.split()[4]
20     #print filename
21     if filename.find('.root')>-1 and filename.find('aod')>-1:
22     inputFilesSet.append('root://eoscms.cern.ch//eos/cms/'+filename)
23     return inputFilesSet
24    
25