CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
rltinfo.RLTInfo Class Reference
Inheritance diagram for rltinfo.RLTInfo:

Public Member Functions

def __init__
 
def __str__
 
def add
 
def write
 

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 
19  def __init__(self):
20  self.dict = {}

Member Function Documentation

def rltinfo.RLTInfo.__str__ (   self)

Definition at line 25 of file rltinfo.py.

References join().

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

Definition at line 21 of file rltinfo.py.

Referenced by counter.Counter.register().

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

Definition at line 31 of file rltinfo.py.

References join().

31 
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.iteritems():
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()
static std::string join(char **cmd)
Definition: RemoteFile.cc:18

Member Data Documentation

rltinfo.RLTInfo.dict

Definition at line 19 of file rltinfo.py.

Referenced by weight.Weight.SetIntLumi().