CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes
edmPickEvents.Event Class Reference

Event helper class ##. More...

Inheritance diagram for edmPickEvents.Event:

Public Member Functions

def __getattr__
 
def __init__
 
def __str__
 

Static Public Attributes

 dataset = None
 
tuple splitRE = re.compile(r'[\s:,]+')
 

Detailed Description

Event helper class ##.

Definition at line 60 of file edmPickEvents.py.

Constructor & Destructor Documentation

def edmPickEvents.Event.__init__ (   self,
  line,
  kwargs 
)

Definition at line 64 of file edmPickEvents.py.

64 
65  def __init__ (self, line, **kwargs):
66  pieces = Event.splitRE.split (line.strip())
67  try:
68  self['run'] = int( pieces[0] )
69  self['lumi'] = int( pieces[1] )
70  self['event'] = int( pieces[2] )
71  self['dataset'] = Event.dataset
72  except:
73  raise RuntimeError, "Can not parse '%s' as Event object" \
74  % line.strip()
75  if not self['dataset']:
76  print "No dataset is defined for '%s'. Aborting." % line.strip()
77  raise RuntimeError, 'Missing dataset'

Member Function Documentation

def edmPickEvents.Event.__getattr__ (   self,
  key 
)

Definition at line 78 of file edmPickEvents.py.

78 
79  def __getattr__ (self, key):
80  return self[key]
def edmPickEvents.Event.__str__ (   self)

Definition at line 81 of file edmPickEvents.py.

81 
82  def __str__ (self):
83  return "run = %(run)i, lumi = %(lumi)i, event = %(event)i, dataset = %(dataset)s" % self
84 

Member Data Documentation

edmPickEvents.Event.dataset = None
static

Definition at line 62 of file edmPickEvents.py.

tuple edmPickEvents.Event.splitRE = re.compile(r'[\s:,]+')
static

Definition at line 63 of file edmPickEvents.py.