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 

Member Function Documentation

◆ __str__()

def rltinfo.RLTInfo.__str__ (   self)

Definition at line 26 of file rltinfo.py.

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 

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

◆ add()

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

Definition at line 22 of file rltinfo.py.

22  def add(self, trigger, run, lumi):
23  nEv = self.dict.setdefault( (trigger, run, lumi), MyInteger(0) )
24  nEv += 1
25 

References rltinfo.RLTInfo.dict.

Referenced by counter.Counter.register().

◆ write()

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

Definition at line 32 of file rltinfo.py.

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 

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

Member Data Documentation

◆ dict

rltinfo.RLTInfo.dict
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
str
#define str(s)
Definition: TestProcessor.cc:53
PVValHelper::add
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
Definition: PVValidationHelpers.cc:12
TriggerAnalyzer.__str__
def __str__(self)
Definition: TriggerAnalyzer.py:103
writeEcalDQMStatus.write
write
Definition: writeEcalDQMStatus.py:48