Classes | Functions
ParserArtEvents Namespace Reference

Classes

class  ArtEvents
 Parsed metric. More...
 

Functions

def parseLine (line, usage)
 
def parseLines (lines, verbose=False)
 Parse output file. More...
 
def parseSTDOUT (file_name, verbose=True)
 Parse output file. More...
 

Function Documentation

def ParserArtEvents.parseLine (   line,
  usage 
)

Definition at line 40 of file ParserArtEvents.py.

References ana.assert(), check_time_usage.float, and split().

Referenced by parseLines().

40 def parseLine(line, usage):
41  tokens = line.strip().split()
42  #print tokens
43  if len(tokens) == 0: return
44 
45  if tokens[0] == "TimeMarker:":
46  assert(len(tokens)==2)
47  usage.time_markers.append(float(tokens[1]))
48 
49  if "Begin processing the " in line: usage.addEvent(line)
50  if "processing event:run:" in line: usage.addEvent(line)
51  if "query" in line: usage.addQuery(line)
52  if "parsing" in line: usage.addParsing(line)
void split(double tt, double *fr)
def parseLine(line, usage)
assert(nhit_max >=nhit_nbins)
def ParserArtEvents.parseLines (   lines,
  verbose = False 
)

Parse output file.

Definition at line 55 of file ParserArtEvents.py.

References parseLine().

Referenced by ViewBokeh.drawChain(), ViewBokeh.drawTier(), parseSTDOUT(), and ViewBokeh.tierToHTML().

55 def parseLines(lines, verbose=False):
56  if type(lines) != list: lines = lines.split("\n")
57  if verbose: print "prsAT: read %i lines"%len(lines)
58  usage = ArtEvents()
59 
60  # loop over the lines
61  for line in lines:
62  parseLine(line, usage)
63 
64  #print usage
65  return usage
def parseLine(line, usage)
def parseLines(lines, verbose=False)
Parse output file.
def ParserArtEvents.parseSTDOUT (   file_name,
  verbose = True 
)

Parse output file.

Definition at line 68 of file ParserArtEvents.py.

References open(), and parseLines().

68 def parseSTDOUT(file_name, verbose=True):
69  if verbose: print "prsAT: --- Parsed STDOUT from file: %s"%file_name
70 
71  lines = open(file_name, "r").readlines()
72  usage = parseLines(lines,verbose=verbose)
73 
74  #print usage
75  return usage
76 
def parseSTDOUT(file_name, verbose=True)
Parse output file.
procfile open("FD_BRL_v0.txt")
def parseLines(lines, verbose=False)
Parse output file.