CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
NewTree Namespace Reference

Functions

def runme
 
def runme2
 

Variables

list fid = sys.argv[1]
 
list infile = sys.argv[2]
 
list outfile = fid+Parameters.parameters['view']
 

Function Documentation

def NewTree.runme (   fid,
  infile,
  outfile 
)

Definition at line 24 of file NewTree.py.

24 
25 def runme(fid,infile,outfile):
26  fin = open(infile,'r')
27  fout = open(outfile,'w')
28  tot_up = Parameters.parameters['view']['levels_up']
29  tot_down = Parameters.parameters['view']['levels_down']
30  print "up=",tot_up," down=",tot_down
31  # trigger too difficult for now
32  trigger = Parameters.parameters['find']['immediate_children_threshold']
33 
34  for line in fin.xreadlines():
35  a=line.split()
36  b=a[2:]
37  # find fid in a
38  try:
39  i=operator.indexOf(b,fid)
40  # write out stuff according to tot_up and tot_down
41  if i < tot_up: c = i
42  else: c = tot_up
43  print >>fout,"%s %s %s"%(a[0],a[1],string.join(b[i-c:i+1+tot_down]))
44  except ValueError:
45  pass
def runme
Definition: NewTree.py:24
def NewTree.runme2 (   fid,
  infile,
  outfile 
)

Definition at line 12 of file NewTree.py.

12 
13 def runme2(fid,infile,outfile):
14  fin = open(infile,'r')
15  fout = open(outfile,'w')
16  sub = ' ' + fid + '[ $]'
17  r = re.compile(sub)
18 
19  for line in fin.xreadlines():
20  i = line.index(' ')+1
21  s = r.search(line[i:])
22  if s != None:
23  print >>fout,line[0:i+s.end()-1]
def runme2
Definition: NewTree.py:12

Variable Documentation

list NewTree.fid = sys.argv[1]

Definition at line 51 of file NewTree.py.

Referenced by CondDBESSource.fillTagCollectionFromDB(), SiPixelInformationExtractor.findNoisyPixels(), edm.getUuid(), and edm.printUuids().

list NewTree.infile = sys.argv[2]

Definition at line 52 of file NewTree.py.

list NewTree.outfile = fid+Parameters.parameters['view']

Definition at line 53 of file NewTree.py.