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 |
|
|
|