CMS 3D CMS Logo

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

Public Member Functions

def __getitem__ (self, name)
 
def __init__ (self)
 
def __str__ (self)
 
def addCounter (self, name)
 
def counter (self, name)
 
def write (self, dirname)
 

Public Attributes

 counters
 
 ranks
 

Detailed Description

TODO: could be a diclist? 

Definition at line 85 of file counter.py.

Constructor & Destructor Documentation

◆ __init__()

def counter.Counters.__init__ (   self)

Definition at line 90 of file counter.py.

90  def __init__( self ):
91  self.counters = []
92  self.ranks = {}
93 
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

◆ __getitem__()

def counter.Counters.__getitem__ (   self,
  name 
)

◆ __str__()

def counter.Counters.__str__ (   self)

Definition at line 104 of file counter.py.

References cms::cuda::AtomicPairCounter::Atomic2.counters, NMaxPerLumi.counters, analyzer.Analyzer.counters, HistogramManager.counters, counter.Counters.counters, cscdqm::ChamberCounterKeyType.counters, join(), and genParticles_cff.map.

104  def __str__(self):
105  prints = map( str, self.counters )
106  return '\n'.join(prints)
107 
static std::string join(char **cmd)
Definition: RemoteFile.cc:21

◆ addCounter()

def counter.Counters.addCounter (   self,
  name 
)

Definition at line 94 of file counter.py.

References mps_setup.append, cms::cuda::AtomicPairCounter::Atomic2.counters, NMaxPerLumi.counters, analyzer.Analyzer.counters, HistogramManager.counters, counter.Counters.counters, cscdqm::ChamberCounterKeyType.counters, and counter.Counters.ranks.

94  def addCounter(self, name):
95  self.ranks[ name ] = len( self.counters )
96  self.counters.append( Counter(name) )
97 
std::function< unsigned int(align::ID)> Counter

◆ counter()

def counter.Counters.counter (   self,
  name 
)

Definition at line 98 of file counter.py.

References cms::cuda::AtomicPairCounter::Atomic2.counters, NMaxPerLumi.counters, analyzer.Analyzer.counters, HistogramManager.counters, counter.Counters.counters, cscdqm::ChamberCounterKeyType.counters, and counter.Counters.ranks.

Referenced by counter.Counters.__getitem__().

98  def counter(self, name):
99  return self.counters[ self.ranks[name] ]
100 
static std::atomic< unsigned int > counter

◆ write()

def counter.Counters.write (   self,
  dirname 
)

Member Data Documentation

◆ counters

◆ ranks

counter.Counters.ranks

Definition at line 92 of file counter.py.

Referenced by counter.Counters.addCounter(), and counter.Counters.counter().