CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
rltinfo.RLTInfo Class Reference
Inheritance diagram for rltinfo.RLTInfo:

Public Member Functions

def __init__ (self)
 
def __str__ (self)
 
def add (self, trigger, run, lumi)
 
def write (self, dirName, fileName='RLTInfo.root')
 

Public Attributes

 dict
 

Detailed Description

Definition at line 18 of file rltinfo.py.

Constructor & Destructor Documentation

◆ __init__()

def rltinfo.RLTInfo.__init__ (   self)

Definition at line 19 of file rltinfo.py.

19  def __init__(self):
20  self.dict = {}
21 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ __str__()

def rltinfo.RLTInfo.__str__ (   self)

Definition at line 26 of file rltinfo.py.

References rltinfo.RLTInfo.dict, mps_monitormerge.items, join(), and str.

26  def __str__(self):
27  lines = []
28  for rlt, count in self.dict.items():
29  lines.append( ': '.join( [str(rlt), str(count)] ))
30  return '\n'.join(lines)
31 
static std::string join(char **cmd)
Definition: RemoteFile.cc:21
#define str(s)

◆ add()

def rltinfo.RLTInfo.add (   self,
  trigger,
  run,
  lumi 
)

Definition at line 22 of file rltinfo.py.

References rltinfo.RLTInfo.dict.

Referenced by counter.Counter.register().

22  def add(self, trigger, run, lumi):
23  nEv = self.dict.setdefault( (trigger, run, lumi), MyInteger(0) )
24  nEv += 1
25 
void add(std::map< std::string, TH1 *> &h, TH1 *hist)

◆ write()

def rltinfo.RLTInfo.write (   self,
  dirName,
  fileName = 'RLTInfo.root' 
)

Definition at line 32 of file rltinfo.py.

References rltinfo.RLTInfo.dict, mps_monitormerge.items, and join().

32  def write(self, dirName, fileName='RLTInfo.root'):
33  f = TFile('/'.join( [dirName, fileName]), 'RECREATE')
34  t = Tree('RLTInfo','HLT/Run/Lumi information')
35  t.var('run', int )
36  t.var('lumi', int )
37  t.var('counts', int )
38  t.var('trigger', int )
39  for rlt, count in self.dict.items():
40  t.fill('run', rlt[1])
41  t.fill('lumi', rlt[2])
42  t.fill( 'counts', count.integer)
43  t.tree.Fill()
44  f.Write()
45  f.Close()
46 
static std::string join(char **cmd)
Definition: RemoteFile.cc:21

Member Data Documentation

◆ dict

rltinfo.RLTInfo.dict