CMS 3D CMS Logo

Functions
DeadROCCounter Namespace Reference

Functions

def GetNonZeroOccNumber (histoname)
 
def getRunNumber (filename)
 

Function Documentation

def DeadROCCounter.GetNonZeroOccNumber (   histoname)

Definition at line 12 of file DeadROCCounter.py.

References getRunNumber(), and str.

12 def GetNonZeroOccNumber(histoname):
13  global nrocs
14  global fin
15  nrocs=0
16  histo=fin.Get(histoname)
17  if not histo:
18  print "null histo"
19  return
20  nx=histo.GetNbinsX()
21  ny=histo.GetNbinsY()
22  for i in range(1,nx+1):
23  for j in range(1,ny+1):
24  value=histo.GetBinContent(i,j)
25  if value>0:
26  nrocs += 1
27 
28 nrocs=0
29 fname=sys.argv[1]
30 
31 runNumber="0"
32 getRunNumber(fname)
33 
34 path="DQMData/Run " + runNumber +"/Pixel/Run summary/Clusters/OnTrack/"
35 
36 labels=["BPix L1: ", "BPix L2: ", "BPix L3: ", "FPix tot: "]
37 
38 histonames=[path + "pix_bar Occ_roc_ontracksiPixelDigis_layer_1",path + "pix_bar Occ_roc_ontracksiPixelDigis_layer_2",path + "pix_bar Occ_roc_ontracksiPixelDigis_layer_3",path + "ROC_endcap_occupancy"]
39 
40 TotROCs=[2560-256,4096-256,5632-256,4320] #total number of ROCs in the Pixel detector layers and the FPix, the factor 256 for BPix Layer derive by half modules, left there as a reminder
41 
42 DeadROCs=[0,0,0,0]
43 
44 fin= TFile(fname)
45 
46 #print type(fname)
47 
48 outname="PixZeroOccROCs_run" + runNumber + ".txt"
def getRunNumber(filename)
def GetNonZeroOccNumber(histoname)
def DeadROCCounter.getRunNumber (   filename)

Definition at line 6 of file DeadROCCounter.py.

Referenced by ODCond2ConfInfo.fetchID(), popcon::EcalSRPHandler.getNewObjects(), popcon::EcalDAQHandler.getNewObjects(), GetNonZeroOccNumber(), and ODCond2ConfInfo.writeDB().

6 def getRunNumber(filename):
7  global runNumber
8  pos=filename.find("__")
9  runNumber=filename[pos-6:pos]
10  #print runNumber
11 
def getRunNumber(filename)