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

Constructor & Destructor Documentation

◆ __init__()

def rltinfo.RLTInfo.__init__ (   self)

Definition at line 20 of file rltinfo.py.

20  def __init__(self):
21  self.dict = {}
22 

Member Function Documentation

◆ __str__()

def rltinfo.RLTInfo.__str__ (   self)

Definition at line 27 of file rltinfo.py.

27  def __str__(self):
28  lines = []
29  for rlt, count in six.iteritems(self.dict):
30  lines.append( ': '.join( [str(rlt), str(count)] ))
31  return '\n'.join(lines)
32 

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

◆ add()

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

Definition at line 23 of file rltinfo.py.

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

References rltinfo.RLTInfo.dict.

Referenced by counter.Counter.register().

◆ write()

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

Definition at line 33 of file rltinfo.py.

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

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

Member Data Documentation

◆ dict

rltinfo.RLTInfo.dict
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
str
#define str(s)
Definition: TestProcessor.cc:48
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