CMS 3D CMS Logo

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

Public Member Functions

def __init__ (self, iEv, input_data=None, setup=None, eventWeight=1)
 
def __str__ (self)
 

Public Attributes

 eventWeight
 
 iEv
 
 input
 
 setup
 

Detailed Description

Event class.

The Looper passes the Event object to each of its Analyzers,
which in turn can:
- read some information
- add more information
- modify existing information.

Attributes:
  iEv = event processing index, starting at 0
  eventWeight = a weight, set to 1 at the beginning of the processing
  input = input, as determined by the looper
#TODO: provide a clear interface for access control (put, get, del products) - we should keep track of the name and id of the analyzer.

Definition at line 4 of file event.py.

Constructor & Destructor Documentation

◆ __init__()

def event.Event.__init__ (   self,
  iEv,
  input_data = None,
  setup = None,
  eventWeight = 1 
)

Definition at line 20 of file event.py.

20  def __init__(self, iEv, input_data=None, setup=None, eventWeight=1 ):
21  self.iEv = iEv
22  self.input = input_data
23  self.setup = setup
24  self.eventWeight = eventWeight
25 
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

◆ __str__()

def event.Event.__str__ (   self)

Definition at line 26 of file event.py.

References __class__< T >.__class__(), event.Event.iEv, PixelDCSObject< T >.items, EcalContainer< DetId, T >.items(), EcalContainer< EcalTrigTowerDetId, Item >.items(), EcalContainer< DetIdT, T >.items(), EcalContainer< EBDetId, Item >.items(), Items.items(), DictTypes.SortedKeysDict.items(), EcalContainer< ESDetId, Item >.items(), EcalContainer< EcalScDetId, Item >.items(), EcalContainer< EEDetId, Item >.items(), AlignmentSurfaceDeformations.items(), betterConfigParser.AdaptedDict.items(), edm::ErrorObj.items(), FWTableViewManager.items(), betterConfigParser.BetterConfigParser.items(), svgfig.SVG.items(), join(), and genParticles_cff.map.

26  def __str__(self):
27  header = '{type}: {iEv}'.format( type=self.__class__.__name__,
28  iEv = self.iEv)
29  varlines = []
30  for var,value in sorted(vars(self.items())):
31  tmp = value
32  # check for recursivity
33  recursive = False
34  if hasattr(value, '__getitem__') and \
35  not isinstance(value, collections.Mapping) and \
36  (len(value)>0 and value[0].__class__ == value.__class__):
37  recursive = True
38  if hasattr(value, '__contains__') and \
39  not isinstance(value, (str,unicode)) and \
40  not isinstance(value, TChain) and \
41  not recursive :
42  tmp = map(str, value)
43 
44  varlines.append( '\t{var:<15}: {value}'.format(var=var, value=tmp) )
45  all = [ header ]
46  all.extend(varlines)
47  return '\n'.join( all )
48 
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

Member Data Documentation

◆ eventWeight

event.Event.eventWeight

Definition at line 24 of file event.py.

◆ iEv

event.Event.iEv

Definition at line 21 of file event.py.

Referenced by event.Event.__str__().

◆ input

event.Event.input

Definition at line 22 of file event.py.

Referenced by collectionMerger.collectionMerger.analyze().

◆ setup

event.Event.setup