CMS 3D CMS Logo

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.

00024                              :
00025     fin = open(infile,'r')
00026     fout = open(outfile,'w')
00027     tot_up = Parameters.parameters['view']['levels_up']
00028     tot_down = Parameters.parameters['view']['levels_down']
00029     print "up=",tot_up," down=",tot_down
00030     # trigger too difficult for now
00031     trigger = Parameters.parameters['find']['immediate_children_threshold']
00032     
00033     for line in fin.xreadlines():
00034         a=line.split()
00035         b=a[2:]
00036         # find fid in a
00037         try:
00038             i=operator.indexOf(b,fid)
00039             # write out stuff according to tot_up and tot_down
00040             if i < tot_up: c = i
00041             else: c = tot_up
00042             print >>fout,"%s %s %s"%(a[0],a[1],string.join(b[i-c:i+1+tot_down]))
00043         except ValueError:
00044             pass
00045 
if __name__ == "__main__":

def NewTree::runme2 (   fid,
  infile,
  outfile 
)

Definition at line 12 of file NewTree.py.

00012                               :
00013     fin = open(infile,'r')
00014     fout = open(outfile,'w')
00015     sub = ' ' + fid + '[ $]'
00016     r = re.compile(sub)
00017     
00018     for line in fin.xreadlines():
00019         i = line.index(' ')+1
00020         s = r.search(line[i:])
00021         if s != None:
00022             print >>fout,line[0:i+s.end()-1]
00023 
def runme(fid,infile,outfile):


Variable Documentation

list NewTree::fid = sys.argv[1] [static]

Definition at line 51 of file NewTree.py.

Referenced by PoolDBESSource::fillTagCollectionFromDB(), edm::InputFileCatalog::findFile(), and edm::printUuids().

list NewTree::infile = sys.argv[2] [static]

Definition at line 52 of file NewTree.py.

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

Definition at line 53 of file NewTree.py.


Generated on Tue Jun 9 18:49:14 2009 for CMSSW by  doxygen 1.5.4