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 17 of file rltinfo.py.

Constructor & Destructor Documentation

def rltinfo.RLTInfo.__init__ (   self)

Definition at line 18 of file rltinfo.py.

18  def __init__(self):
19  self.dict = {}
20 
def __init__(self)
Definition: rltinfo.py:18

Member Function Documentation

def rltinfo.RLTInfo.__str__ (   self)

Definition at line 25 of file rltinfo.py.

References join(), and harvestTrackValidationPlots.str.

25  def __str__(self):
26  lines = []
27  for rlt, count in self.dict.iteritems():
28  lines.append( ': '.join( [str(rlt), str(count)] ))
29  return '\n'.join(lines)
30 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def __str__(self)
Definition: rltinfo.py:25
def rltinfo.RLTInfo.add (   self,
  trigger,
  run,
  lumi 
)

Definition at line 21 of file rltinfo.py.

Referenced by counter.Counter.register().

21  def add(self, trigger, run, lumi):
22  nEv = self.dict.setdefault( (trigger, run, lumi), MyInteger(0) )
23  nEv += 1
24 
def add(self, trigger, run, lumi)
Definition: rltinfo.py:21
def rltinfo.RLTInfo.write (   self,
  dirName,
  fileName = 'RLTInfo.root' 
)

Definition at line 31 of file rltinfo.py.

References join().

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

Member Data Documentation

rltinfo.RLTInfo.dict

Definition at line 19 of file rltinfo.py.

Referenced by weight.Weight.SetIntLumi().