ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/L1RpcTriggerAnalysis/macros/makePressureGraph.py
(Generate patch)

Comparing UserCode/L1RpcTriggerAnalysis/macros/makePressureGraph.py (file contents):
Revision 1.2 by cwiok, Sat Sep 10 15:14:22 2011 UTC vs.
Revision 1.3 by cwiok, Mon Aug 27 10:26:40 2012 UTC

# Line 19 | Line 19 | if __name__ == "__main__":
19      pressure = []
20      for line in file:
21          print line.split()
22 <        runs.append(float(line.split()[0]))
23 <        if(len(line.split())>1):              
24 <               pressure.append(float(line.split()[1]))
25 <        else:
26 <               pressure.append(0.0)              
27 <               counter+=1
22 >        if(len(line.split())>0):            
23 >            runs.append(float(line.split()[0]))
24 >            if(len(line.split())>1):              
25 >                pressure.append(float(line.split()[1]))
26 >            else:
27 >                pressure.append(0.0)              
28 >                counter+=1
29  
30      x = array("d",runs)
31      y = array("d",pressure)
# Line 32 | Line 33 | if __name__ == "__main__":
33      ###Define efficiency map histogram
34      myFile = ROOT.TFile("PressureGraph.root","RECREATE")
35      myGraph = ROOT.TGraph(len(runs),x,y)
36 +    myGraph.SetName("Graph")
37  
38      myGraph.Write()
39      myFile.Write()

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines