Commits

Anonymous committed 2cac6ad

updated test to check the perfmon-tuple

  • Participants
  • Parent commits 9703c71

Comments (0)

Files changed (2)

+2007-04-06  Sebastien Binet  <binet@lblbox>
+
+	* tagging PerfMonEvent-00-00-08
+	* updated test to check the perfmon-tuple
+
 2007-04-05  Sebastien Binet  <binet@lblbox>
 
 	* tagging PerfMonEvent-00-00-07

File python/PerfMon.py

 #
 #
 
-__version__ = "$Revision: 1.2 $"
+__version__ = "$Revision: 1.3 $"
 __author__  = "Sebastien Binet <binet@cern.ch>"
 
 __all__ = [ 'File',
 ## del _perfMonRepr
 
 if __name__ == '__main__':
+
+    print ":"*80
+    print "::: testing perfmon-ASCII..."
     import PyCintex
     from PerfMonEvent import PerfMon
     f = PerfMon.File( 'perfmon.dat', 'r' )
 
-    name = f.name()
-    print "name:",name,type(name)
-    print "entries:",f.dataHeader().nEntries()
+    print "name:",f.name()
+    print "## entries:",f.dataHeader().nEntries()
     print "loading PerfMon::Data from file..."
     data = f.loadData()
     print "data:",data.size(),type(data)
     print "writeTimings:",d.io().writeTimings()
     print "readTimings: ",d.io().readTimings()
     
+    print ":"*80
+    print "::: testing perfmon-tuple..."
+    import ROOT
+    import PyCintex
+    PyCintex.Cintex.Enable()
+
+    f = ROOT.TFile( "perfmon.root", "READ" )
+    tuple = f.Get( "perfmon" )
+    print "## entries:",tuple.GetEntriesFast()
+    tuple.Scan( "data.m_cpu.m_utime", "", "", 10, 0 )
+
+    print "## bye"