source: fact/tools/pyscripts/sandbox/kraehenb/CalFitsTest.py@ 13408

Last change on this file since 13408 was 13401, checked in by kraehenb, 13 years ago
Commented the loop over all events in CalFitsTest.py.
File size: 1.5 KB
Line 
1#!/usr/bin/python -tt
2# ********************************
3# Test script for the CalFits class
4#
5# written by Thomas Kraehenbuehl, ETH Zurich
6# tpk@phys.ethz.ch, +41 44 633 3973
7# April 2012
8# ********************************
9
10datafilename = '/fact/raw/2012/04/17/20120417_004.fits.gz'
11calibfilename = '/fact/raw/2012/04/17/20120417_003.drs.fits.gz'
12
13from ROOT import gSystem
14gSystem.Load("calfits_h.so")
15from ROOT import *
16print "Testing object creation: "
17caltest = CalFits(datafilename,calibfilename)
18
19print "Common variables:"
20print "ROI: ", caltest.nroi
21print "#Pix: ", caltest.npix
22print "Number of events: ", caltest.nevents
23print
24
25print "Information per Event:"
26caltest.GetCalEvent()
27print "Event ID: ", caltest.event_id
28print "Trigger type: ", caltest.event_triggertype
29print "Uncalibrated data: ", caltest.event_data
30print "Calibrated data: ", caltest.event_caldata
31print "Board times: ", caltest.event_boardtimes
32print "Trigger offsets: ", caltest.event_offset
33print
34
35print "Examples of other information"
36print "Calibfile ROI: ", caltest.calib_nroi
37print "Column size BaselineMean: ", caltest.calibfile.GetN("BaselineMean")
38print "Datafile ROI: ", caltest.data_nroi
39print "Data: ", caltest.datafile.GetN("Data")
40print "StartCellData: ", caltest.datafile.GetN("StartCellData")
41print "Direct datafile access: ", caltest.datafile.GetN("StartCellData")
42print
43print "Columns of the datafile: "
44caltest.datafile.PrintColumns()
45
46#while caltest.GetCalEvent():
47# print caltest.event_id, caltest.event_triggertype, caltest.event_caldata[0]
48#print
49
50del caltest
Note: See TracBrowser for help on using the repository browser.