User Tools

Site Tools


itk:extracting_channels_from_root_files

This is an old revision of the document!


Extracting channels from ROOT files

Overview: The TestAnalysis.py script allows the user of the HSIO to print off specific problematic channels after running a test. The user inputs the root file from the test, the specific histogram they would like to analyze, and must put the maximum number of hits possible in a given channel.

Instructions:

Script:

#This script allows the user to see the specific ouput for specific pixels on different electronic tests <code> from ROOT import * #The user must input the root file, histogram, and the maximum number for bin content fileName = “” histogramName = “” maxValBin = 50 #Do not modify the rest of the code, it should work given what the user has place above. test = TFile.Open(fileName) h = test.Get(histogramName) h.Draw(“colz”) for i in range(1, h.GetNbinsX()): for j in range(1, h.GetNbinsY()): binContent = h.GetBinContent(i, j) if binContent < maxValBin: print “*” print “Pixel column (x): ”, i print “Pixel row (y): ”, j print “Number of hits: ”, binContent print “*” </code>

itk/extracting_channels_from_root_files.1473963378.txt.gz · Last modified: 2016/09/15 18:16 by mbeydler