CMS 3D CMS Logo

Functions | Variables
DeadROCCounter Namespace Reference

Functions

def GetNonZeroOccNumber (histoname)
 
def getRunNumber (filename)
 

Variables

 bpixtot
 
 clusstr
 
 nclust
 
 nent
 
 nrocs
 
 out_file
 
 tmpstr
 

Function Documentation

◆ GetNonZeroOccNumber()

def DeadROCCounter.GetNonZeroOccNumber (   histoname)

Definition at line 13 of file DeadROCCounter.py.

References getRunNumber(), print(), and FastTimerService_cff.range.

13 def GetNonZeroOccNumber(histoname):
14  global nrocs
15  global fin
16  nrocs=0
17  histo=fin.Get(histoname)
18  if not histo:
19  print("null histo")
20  return
21  nx=histo.GetNbinsX()
22  ny=histo.GetNbinsY()
23  for i in range(1,nx+1):
24  for j in range(1,ny+1):
25  value=histo.GetBinContent(i,j)
26  if value>0:
27  nrocs += 1
28 
29 nrocs=0
30 fname=sys.argv[1]
31 
32 runNumber="0"
33 getRunNumber(fname)
34 
35 path="DQMData/Run " + runNumber +"/Pixel/Run summary/Clusters/OnTrack/"
36 
37 labels=["BPix L1: ", "BPix L2: ", "BPix L3: ", "FPix tot: "]
38 
39 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"]
40 
41 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
42 
43 DeadROCs=[0,0,0,0]
44 
45 fin= TFile(fname)
46 
47 #print type(fname)
48 
49 outname="PixZeroOccROCs_run" + runNumber + ".txt"
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def getRunNumber(filename)
def GetNonZeroOccNumber(histoname)

◆ getRunNumber()

def DeadROCCounter.getRunNumber (   filename)

Definition at line 7 of file DeadROCCounter.py.

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

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

Variable Documentation

◆ bpixtot

DeadROCCounter.bpixtot

Definition at line 53 of file DeadROCCounter.py.

◆ clusstr

DeadROCCounter.clusstr

Definition at line 65 of file DeadROCCounter.py.

◆ nclust

DeadROCCounter.nclust

◆ nent

DeadROCCounter.nent

◆ nrocs

DeadROCCounter.nrocs

◆ out_file

DeadROCCounter.out_file

◆ tmpstr

DeadROCCounter.tmpstr

Definition at line 60 of file DeadROCCounter.py.