CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
DeadROCCounter Namespace Reference

Functions

def GetNonZeroOccNumber
 
def getRunNumber
 

Variables

int bpixtot = 0
 
string clusstr = path+"charge_siPixelClusters"
 
tuple nclust = fin.Get(clusstr)
 
tuple nent = nclust.GetEntries()
 
tuple out_file = open(outname, "w")
 
list tmpstr = labels[k]
 

Function Documentation

def DeadROCCounter.GetNonZeroOccNumber (   histoname)

Definition at line 13 of file DeadROCCounter.py.

References getRunNumber(), print(), and sistrip::SpyUtilities.range().

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

Variable Documentation

int DeadROCCounter.bpixtot = 0

Definition at line 53 of file DeadROCCounter.py.

string DeadROCCounter.clusstr = path+"charge_siPixelClusters"

Definition at line 65 of file DeadROCCounter.py.

tuple DeadROCCounter.nclust = fin.Get(clusstr)

Definition at line 66 of file DeadROCCounter.py.

Referenced by ClusterizingHistogram.clusterize(), L1TrackJetProducer.L1_cluster(), L1TrackJetProducer.L2_cluster(), PFClusterWidthAlgo.PFClusterWidthAlgo(), and l1tpf_calo::FlatCaloLinker.run().

tuple DeadROCCounter.nent = nclust.GetEntries()

Definition at line 67 of file DeadROCCounter.py.

Referenced by FittedEntriesSet.FillCorrelations(), and ErrorCorrelationMgr.readFromReportFile().

tuple DeadROCCounter.out_file = open(outname, "w")

Definition at line 50 of file DeadROCCounter.py.

Referenced by HcalQIEManager.generateQieTable(), HcalLutManager.get_xml_files_from_db(), HcalQIEManager.getHfQieTable(), HcalQIEManager.getTableFromDb(), JsonOutputProducer.write(), SummaryOutputProducer.writeCSV_module(), SummaryOutputProducer.writeCSV_trigger(), and SummaryOutputProducer.writeHistograms().

list DeadROCCounter.tmpstr = labels[k]

Definition at line 60 of file DeadROCCounter.py.