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 harvestTrackValidationPlots.str.

12 def GetNonZeroOccNumber(histoname):
13  global nrocs
14  global fin
15  nrocs=0
16  histo=fin.Get(histoname)
17  nx=histo.GetNbinsX()
18  ny=histo.GetNbinsY()
19  for i in range(1,nx+1):
20  for j in range(1,ny+1):
21  value=histo.GetBinContent(i,j)
22  if value>0:
23  nrocs += 1
24 
25 nrocs=0
26 fname=sys.argv[1]
27 
28 runNumber="0"
29 getRunNumber(fname)
30 
31 path="DQMData/Run " + runNumber +"/Pixel/Run summary/Clusters/OnTrack/"
32 
33 labels=["BPix L1: ", "BPix L2: ", "BPix L3: ", "FPix tot: "]
34 
35 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"]
36 
37 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
38 
39 DeadROCs=[0,0,0,0]
40 
41 fin= TFile(fname)
42 
43 #print type(fname)
44 
45 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)