CMS 3D CMS Logo

__init__.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 from __future__ import print_function
4 import ROOT
5 import inspect
6 import sys
7 import optparse
8 from FWCore.ParameterSet.VarParsing import VarParsing
9 
10 
11 ROOT.gSystem.Load("libFWCoreFWLite")
12 ROOT.FWLiteEnabler.enable()
13 
14 # Whether warn() should print anythingg
15 quietWarn = False
16 
17 def setQuietWarn (quiet = True):
18  global quietWarn
19  quietWarn = quiet
20 
21 def warn (*args, **kwargs):
22  """print out warning with line number and rest of arguments"""
23  if quietWarn: return
24  frame = inspect.stack()[1]
25  filename = frame[1]
26  lineNum = frame[2]
27  #print "after '%s'" % filename
28  blankLines = kwargs.get('blankLines', 0)
29  if blankLines:
30  print('\n' * blankLines)
31  spaces = kwargs.get('spaces', 0)
32  if spaces:
33  print(' ' * spaces, end=' ')
34  if len (args):
35  print("%s (%s): " % (filename, lineNum), end=' ')
36  for arg in args:
37  print(arg, end=' ')
38  print()
39  else:
40  print("%s (%s):" % (filename, lineNum))
41 
42 ########################
43 ## ################## ##
44 ## ## ############ ## ##
45 ## ## ## Handle ## ## ##
46 ## ## ############ ## ##
47 ## ################## ##
48 ########################
49 
50 class Handle:
51  """Python interface to FWLite Handle class"""
52 
53  def __init__ (self,
54  typeString,
55  **kwargs):
56  """Initialize python handle wrapper """
57  # turn off warnings
58  oldWarningLevel = ROOT.gErrorIgnoreLevel
59  ROOT.gErrorIgnoreLevel = ROOT.kError
60  self._nodel = False
61  if kwargs.get ('noDelete'):
62  print("Not deleting wrapper")
63  del kwargs['noDelete']
64  else:
65  self._nodel = True
66  self._type = typeString
67  self._resetWrapper()
68  self._exception = RuntimeError ("getByLabel not called for '%s'", self)
69  # restore warning state
70  ROOT.gErrorIgnoreLevel = oldWarningLevel
71  # Since we deleted the options as we used them, that means
72  # that kwargs should be empty. If it's not, that means that
73  # somebody passed in an argument that we're not using and we
74  # should complain.
75  if len (kwargs):
76  raise RuntimeError("Unknown arguments %s" % kwargs)
77 
78  def isValid (self):
79  """Returns true if getByLabel call was successful and data is
80  present in handle."""
81  return not self._exception
82 
83 
84  def product (self):
85  """Returns product stored in handle."""
86  if self._exception:
87  raise self._exception
88  return self._wrapper.product()
89 
90 
91  def __str__ (self):
92  return "%s" % (self._type)
93 
94 
95  ## Private member functions ##
96 
97  def _resetWrapper (self):
98  """(Internal) reset the edm wrapper"""
99  self._wrapper = ROOT.edm.Wrapper (self._type)()
100  self._typeInfo = self._wrapper.typeInfo()
101  ROOT.SetOwnership (self._wrapper, False)
102  # O.k. This is a little weird. We want a pointer to an EDM
103  # wrapper, but we don't want the memory it is pointing to.
104  # So, we've created it and grabbed the type info. Since we
105  # don't want a memory leak, we destroy it.
106  if not self._nodel :
107  ROOT.TClass.GetClass("edm::Wrapper<"+self._type+">").Destructor( self._wrapper )
108 
109  def _typeInfoGetter (self):
110  """(Internal) Return the type info"""
111  return self._typeInfo
112 
113 
114  def _addressOf (self):
115  """(Internal) Return address of edm wrapper"""
116  return ROOT.AddressOf (self._wrapper)
117 
118 
119  def _setStatus (self, getByLabelSuccess, labelString):
120  """(Internal) To be called by Events.getByLabel"""
121  if not getByLabelSuccess:
122  self._exception = RuntimeError ("getByLabel (%s, %s) failed" \
123  % (self, labelString))
124  return
125  if not self._wrapper.isPresent():
126  self._exception = RuntimeError ("getByLabel (%s, %s) not present this event" \
127  % (self, labelString))
128  return
129  # if we're still here, then everything is happy. Clear the exception
130  self._exception = None
131 
132 
133 #######################
134 ## ################# ##
135 ## ## ########### ## ##
136 ## ## ## Lumis ## ## ##
137 ## ## ########### ## ##
138 ## ################# ##
139 #######################
140 
141 class Lumis:
142  """Python interface to FWLite LuminosityBlock"""
143  def __init__ (self, inputFiles = '', **kwargs):
144  self._lumi = None
145  self._lumiCounts = 0
146  self._tfile = None
147  self._maxLumis = 0
148  if isinstance (inputFiles, list):
149  # it's a list
150  self._filenames = inputFiles[:]
151  elif isinstance (inputFiles, VarParsing):
152  # it's a VarParsing object
153  options = inputFiles
154  self._maxLumis = options.maxEvents
155  self._filenames = options.inputFiles
156  else:
157  # it's probably a single string
158  self._filenames = [inputFiles]
159  ##############################
160  ## Parse optional arguments ##
161  ##############################
162  if 'maxEvents' in kwargs:
163  self._maxLumis = kwargs['maxEvents']
164  del kwargs['maxEvents']
165  if 'options' in kwargs:
166  options = kwargs ['options']
167  self._maxLumis = options.maxEvents
168  self._filenames = options.inputFiles
169  self._secondaryFilenames = options.secondaryInputFiles
170  del kwargs['options']
171  # Since we deleted the options as we used them, that means
172  # that kwargs should be empty. If it's not, that means that
173  # somebody passed in an argument that we're not using and we
174  # should complain.
175  if len (kwargs):
176  raise RuntimeError("Unknown arguments %s" % kwargs)
177  if not self._filenames:
178  raise RuntimeError("No input files given")
179  if not self._createFWLiteLumi():
180  # this shouldn't happen as you are getting nothing the
181  # very first time out, but let's at least check to
182  # avoid problems.
183  raise RuntimeError("Never and information about Lumi")
184 
185 
186  def __del__ (self):
187  """(Internal) Destructor"""
188  # print "Goodbye cruel world, I'm leaving you today."
189  del self._lumi
190  # print "Goodbye, goodbye, goodbye."
191 
192 
193  def __iter__ (self):
194  return self._next()
195 
196 
197  def aux (self):
198  try:
199  return self._lumi.luminosityBlockAuxiliary()
200  except:
201  raise RuntimeError("Lumis.aux() called on object in invalid state")
202 
203 
205  try:
206  return self._lumi.luminosityBlockAuxiliary()
207  except:
208  raise RuntimeError("Lumis.luminosityBlockAuxiliary() called on object in invalid state")
209 
210 
211  def getByLabel (self, *args):
212  """Calls FWLite's getByLabel. Called:
213  getByLabel (moduleLabel, handle)
214  getByLabel (moduleLabel, productInstanceLabel, handle),
215  getByLabel (moduleLabel, productInstanceLabel, processLabel, handle),
216  or
217  getByLabel ( (mL, pIL,pL), handle)
218  """
219  length = len (args)
220  if length < 2 or length > 4:
221  # not called correctly
222  raise RuntimeError("Incorrect number of arguments")
223  # handle is always the last argument
224  argsList = list (args)
225  handle = argsList.pop()
226  if len(argsList)==1 :
227  if( isinstance (argsList[0], tuple) or
228  isinstance (argsList[0], list) ) :
229  if len (argsList[0]) > 3:
230  raise RuntimeError("getByLabel Error: label tuple has too " \
231  "many arguments '%s'" % argsList[0])
232  argsList = list(argsList[0])
233  if( isinstance(argsList[0], str) and ":" in argsList[0] ):
234  if argsList[0].count(":") > 3:
235  raise RuntimeError("getByLabel Error: label tuple has too " \
236  "many arguments '%s'" % argsList[0].split(":"))
237  argsList = argsList[0].split(":")
238  while len(argsList) < 3:
239  argsList.append ('')
240  (moduleLabel, productInstanceLabel, processLabel) = argsList
241  labelString = "'" + "', '".join(argsList) + "'"
242  if not handle._wrapper :
243  handle._resetWrapper()
244  handle._setStatus ( self._lumi.getByLabel( handle._typeInfoGetter(),
245  moduleLabel,
246  productInstanceLabel,
247  processLabel,
248  handle._addressOf() ),
249  labelString )
250  return handle.isValid()
251 
252 
253  ##############################
254  ## Private Member Functions ##
255  ##############################
256 
257  def _createFWLiteLumi (self):
258  """(Internal) Creates an FWLite Lumi"""
259  # are there any files left?
260  if not self._filenames:
261  return False
262  if self._lumi:
263  del self._lumi
264  self._lumi = None
265  self._veryFirstTime = False
266  self._currFilename = self._filenames.pop(0)
267  #print "Opening file", self._currFilename
268  if self._tfile:
269  del self._tfile
270  self._tfile = ROOT.TFile.Open (self._currFilename)
271  self._lumi = ROOT.fwlite.LuminosityBlock (self._tfile);
272  self._lumi.toBegin()
273  return True
274 
275 
276  def _next (self):
277  """(Internal) Iterator internals"""
278  while True:
279  if self._lumi.atEnd():
280  if not self._createFWLiteLumi():
281  # there are no more files here, so we are done
282  break
283  yield self
284  self._lumiCounts += 1
285  if self._maxLumis > 0 and self._lumiCounts >= self._maxLumis:
286  break
287  self._lumi.__preinc__()
288 
289 
290 
291 ######################
292 ## ################ ##
293 ## ## ########## ## ##
294 ## ## ## Runs ## ## ##
295 ## ## ########## ## ##
296 ## ################ ##
297 ######################
298 
299 class Runs:
300  """Python interface to FWLite LuminosityBlock"""
301  def __init__ (self, inputFiles = '', **kwargs):
302  self._run = None
303  self._runCounts = 0
304  self._tfile = None
305  self._maxRuns = 0
306  if isinstance (inputFiles, list):
307  # it's a list
308  self._filenames = inputFiles[:]
309  elif isinstance (inputFiles, VarParsing):
310  # it's a VarParsing object
311  options = inputFiles
312  self._maxRuns = options.maxEvents
313  self._filenames = options.inputFiles
314  else:
315  # it's probably a single string
316  self._filenames = [inputFiles]
317  ##############################
318  ## Parse optional arguments ##
319  ##############################
320  if 'maxEvents' in kwargs:
321  self._maxRuns = kwargs['maxEvents']
322  del kwargs['maxEvents']
323  if 'options' in kwargs:
324  options = kwargs ['options']
325  self._maxRuns = options.maxEvents
326  self._filenames = options.inputFiles
327  self._secondaryFilenames = options.secondaryInputFiles
328  del kwargs['options']
329  # Since we deleted the options as we used them, that means
330  # that kwargs should be empty. If it's not, that means that
331  # somebody passed in an argument that we're not using and we
332  # should complain.
333  if len (kwargs):
334  raise RuntimeError("Unknown arguments %s" % kwargs)
335  if not self._filenames:
336  raise RuntimeError("No input files given")
337  if not self._createFWLiteRun():
338  # this shouldn't happen as you are getting nothing the
339  # very first time out, but let's at least check to
340  # avoid problems.
341  raise RuntimeError("Never and information about Run")
342 
343 
344  def __del__ (self):
345  """(Internal) Destructor"""
346  # print "Goodbye cruel world, I'm leaving you today."
347  del self._run
348  # print "Goodbye, goodbye, goodbye."
349 
350 
351  def __iter__ (self):
352  return self._next()
353 
354 
355  def aux (self):
356  try:
357  return self._run.runAuxiliary()
358  except:
359  raise RuntimeError("Runs.aux() called on object in invalid state")
360 
361 
362  def runAuxiliary (self):
363  try:
364  return self._run.runAuxiliary()
365  except:
366  raise RuntimeError("Runs.runAuxiliary() called on object in invalid state")
367 
368 
369  def getByLabel (self, *args):
370  """Calls FWLite's getByLabel. Called:
371  getByLabel (moduleLabel, handle)
372  getByLabel (moduleLabel, productInstanceLabel, handle),
373  getByLabel (moduleLabel, productInstanceLabel, processLabel, handle),
374  or
375  getByLabel ( (mL, pIL,pL), handle)
376  """
377  length = len (args)
378  if length < 2 or length > 4:
379  # not called correctly
380  raise RuntimeError("Incorrect number of arguments")
381  # handle is always the last argument
382  argsList = list (args)
383  handle = argsList.pop()
384  if len(argsList)==1 :
385  if( isinstance (argsList[0], tuple) or
386  isinstance (argsList[0], list) ) :
387  if len (argsList[0]) > 3:
388  raise RuntimeError("getByLabel Error: label tuple has too " \
389  "many arguments '%s'" % argsList[0])
390  argsList = list(argsList[0])
391  if( isinstance(argsList[0], str) and ":" in argsList[0] ):
392  if argsList[0].count(":") > 3:
393  raise RuntimeError("getByLabel Error: label tuple has too " \
394  "many arguments '%s'" % argsList[0].split(":"))
395  argsList = argsList[0].split(":")
396  while len(argsList) < 3:
397  argsList.append ('')
398  (moduleLabel, productInstanceLabel, processLabel) = argsList
399  labelString = "'" + "', '".join(argsList) + "'"
400  if not handle._wrapper :
401  handle._resetWrapper()
402  handle._setStatus ( self._run.getByLabel( handle._typeInfoGetter(),
403  moduleLabel,
404  productInstanceLabel,
405  processLabel,
406  handle._addressOf() ),
407  labelString )
408  return handle.isValid()
409 
410 
411 
412 
413  ##############################
414  ## Private Member Functions ##
415  ##############################
416 
417  def _createFWLiteRun (self):
418  """(Internal) Creates an FWLite Run"""
419  # are there any files left?
420  if not self._filenames:
421  return False
422  if self._run:
423  del self._run
424  self._run = None
425  self._veryFirstTime = False
426  self._currFilename = self._filenames.pop(0)
427  #print "Opening file", self._currFilename
428  if self._tfile:
429  del self._tfile
430  self._tfile = ROOT.TFile.Open (self._currFilename)
431  self._run = ROOT.fwlite.Run (self._tfile);
432  self._run.toBegin()
433  return True
434 
435 
436  def _next (self):
437  """(Internal) Iterator internals"""
438  while True:
439  if self._run.atEnd():
440  if not self._createFWLiteRun():
441  # there are no more files here, so we are done
442  break
443  yield self
444  self._runCounts += 1
445  if self._maxRuns > 0 and self._runCounts >= self._maxRuns:
446  break
447  self._run.__preinc__()
448 
449 
450 ########################
451 ## ################## ##
452 ## ## ############ ## ##
453 ## ## ## Events ## ## ##
454 ## ## ############ ## ##
455 ## ################## ##
456 ########################
457 
458 class Events:
459  """Python interface to FWLite ChainEvent class"""
460 
461  def __init__(self, inputFiles = '', **kwargs):
462  """inputFiles => Either a single filename or a list of filenames
463  Optional arguments:
464  forceEvent => Use fwlite::Event IF there is only one file
465  maxEvents => Maximum number of events to process
466  """
467  self._veryFirstTime = True
468  self._event = 0
469  self._eventCounts = 0
470  self._maxEvents = 0
471  self._forceEvent = False
472  self._mode = None
474  if isinstance (inputFiles, list):
475  # it's a list
476  self._filenames = inputFiles[:]
477  elif isinstance (inputFiles, VarParsing):
478  # it's a VarParsing object
479  options = inputFiles
480  self._maxEvents = options.maxEvents
481  self._filenames = options.inputFiles
482  self._secondaryFilenames = options.secondaryInputFiles
483  else:
484  # it's probably a single string
485  self._filenames = [inputFiles]
486  ##############################
487  ## Parse optional arguments ##
488  ##############################
489  if 'maxEvents' in kwargs:
490  self._maxEvents = kwargs['maxEvents']
491  del kwargs['maxEvents']
492  if 'forceEvent' in kwargs:
493  self._forceEvent = kwargs['forceEvent']
494  del kwargs['forceEvent']
495  if 'options' in kwargs:
496  options = kwargs ['options']
497  self._maxEvents = options.maxEvents
498  self._filenames = options.inputFiles
499  self._secondaryFilenames = options.secondaryInputFiles
500  del kwargs['options']
501  # Since we deleted the options as we used them, that means
502  # that kwargs should be empty. If it's not, that means that
503  # somebody passed in an argument that we're not using and we
504  # should complain.
505  if len (kwargs):
506  raise RuntimeError("Unknown arguments %s" % kwargs)
507  if not self._filenames:
508  raise RuntimeError("No input files given")
509 
510 
511  def to (self, entryIndex):
512  """Jumps to event entryIndex"""
513  if self._veryFirstTime:
514  self._createFWLiteEvent()
515  return self._event.to ( long(entryIndex) )
516 
517 
518  def toBegin (self):
519  """Called to reset event loop to first event."""
520  self._toBegin = True
521 
522 
523  def size (self):
524  """Returns number of events"""
525  if self._veryFirstTime:
526  self._createFWLiteEvent()
527  return self._event.size()
528 
529 
530  def eventAuxiliary (self):
531  """Returns eventAuxiliary object"""
532  if self._veryFirstTime:
533  raise RuntimeError("eventAuxiliary() called before "\
534  "toBegin() or to()")
535  return self._event.eventAuxiliary()
536 
537 
538  def object (self):
539  """Returns event object"""
540  return self._event
541 
542 
543  def getByLabel (self, *args):
544  """Calls FWLite's getByLabel. Called:
545  getByLabel (moduleLabel, handle)
546  getByLabel (moduleLabel, productInstanceLabel, handle),
547  getByLabel (moduleLabel, productInstanceLabel, processLabel, handle),
548  or
549  getByLabel ( (mL, pIL,pL), handle)
550  """
551  if self._veryFirstTime:
552  self._createFWLiteEvent()
553  length = len (args)
554  if length < 2 or length > 4:
555  # not called correctly
556  raise RuntimeError("Incorrect number of arguments")
557  # handle is always the last argument
558  argsList = list (args)
559  handle = argsList.pop()
560  if len(argsList)==1 :
561  if( isinstance (argsList[0], tuple) or
562  isinstance (argsList[0], list) ) :
563  if len (argsList[0]) > 3:
564  raise RuntimeError("getByLabel Error: label tuple has too " \
565  "many arguments '%s'" % argsList[0])
566  argsList = list(argsList[0])
567  if( isinstance(argsList[0], str) and ":" in argsList[0] ):
568  if argsList[0].count(":") > 3:
569  raise RuntimeError("getByLabel Error: label tuple has too " \
570  "many arguments '%s'" % argsList[0].split(":"))
571  argsList = argsList[0].split(":")
572  while len(argsList) < 3:
573  argsList.append ('')
574  (moduleLabel, productInstanceLabel, processLabel) = argsList
575  labelString = "'" + "', '".join(argsList) + "'"
576  if not handle._wrapper :
577  handle._resetWrapper()
578  handle._setStatus ( self._event.getByLabel( handle._typeInfoGetter(),
579  moduleLabel,
580  productInstanceLabel,
581  processLabel,
582  handle._addressOf() ),
583  labelString )
584  return handle.isValid()
585 
586 
587  def __iter__ (self):
588  return self._next()
589 
590 
591  def fileIndex (self):
592  if self._event:
593  return self._event.fileIndex()
594  else:
595  # default non-existant value is -1. Return something else
596  return -2
597 
598 
599  def secondaryFileIndex (self):
600  if self._event:
601  return self._event.secondaryFileIndex()
602  else:
603  # default non-existant value is -1. Return something else
604  return -2
605 
606 
607  def fileIndicies (self):
608  return (self.fileIndex(), self.secondaryFileIndex())
609 
610 
611  ## Private Member Functions ##
612 
613 
614  def _parseOptions (self, options):
615  """(Internal) Parse options"""
616 
617 
618  def _toBeginCode (self):
619  """(Internal) Does actual work of toBegin() call"""
620  self._toBegin = False
621  self._event.toBegin()
622  self._eventCounts = 0
623 
624 
625  def __del__ (self):
626  """(Internal) Destructor"""
627  # print "Goodbye cruel world, I'm leaving you today."
628  del self._event
629  # print "Goodbye, goodbye, goodbye."
630 
631 
632  def _createFWLiteEvent (self):
633  """(Internal) Creates an FWLite Event"""
634  self._veryFirstTime = False
635  self._toBegin = True
636  if isinstance (self._filenames[0], ROOT.TFile):
637  self._event = ROOT.fwlite.Event (self._filenames[0])
638  self._mode = 'single'
639  return self._mode
640  if len (self._filenames) == 1 and self._forceEvent:
641  self._tfile = ROOT.TFile.Open (self._filenames[0])
642  self._event = ROOT.fwlite.Event (self._tfile)
643  self._mode = 'single'
644  return self._mode
645  filenamesSVec = ROOT.vector("string") ()
646  for name in self._filenames:
647  filenamesSVec.push_back (name)
648  if self._secondaryFilenames:
649  secondarySVec = ROOT.vector("string") ()
650  for name in self._secondaryFilenames:
651  secondarySVec.push_back (name)
652  self._event = ROOT.fwlite.MultiChainEvent (filenamesSVec,
653  secondarySVec)
654  self._mode = 'multi'
655  else:
656  self._event = ROOT.fwlite.ChainEvent (filenamesSVec)
657  self._mode = 'chain'
658  return self._mode
659 
660 
661  def _next (self):
662  """(Internal) Iterator internals"""
663  if self._veryFirstTime:
664  self._createFWLiteEvent()
665  if self._toBegin:
666  self._toBeginCode()
667  while not self._event.atEnd() :
668  yield self
669  self._eventCounts += 1
670  if self._maxEvents > 0 and self._eventCounts >= self._maxEvents:
671  break
672  # Have we been asked to go to the first event?
673  if self._toBegin:
674  self._toBeginCode()
675  else:
676  # if not, lets go to the next event
677  self._event.__preinc__()
678 
679 
680 
681 if __name__ == "__main__":
682  # test code can go here
683  pass
_secondaryFilenames
Definition: __init__.py:327
def _resetWrapper(self)
Private member functions ##.
Definition: __init__.py:97
def size(self)
Definition: __init__.py:523
def setQuietWarn(quiet=True)
Definition: __init__.py:17
## Events
Definition: __init__.py:458
def getByLabel(self, args)
Definition: __init__.py:543
def fileIndex(self)
Definition: __init__.py:591
def __init__(self, typeString, kwargs)
Definition: __init__.py:55
def __str__(self)
Definition: __init__.py:91
def __del__(self)
Definition: __init__.py:344
## Runs
Definition: __init__.py:299
def _addressOf(self)
Definition: __init__.py:114
def aux(self)
Definition: __init__.py:355
def warn(args, kwargs)
Definition: __init__.py:21
def eventAuxiliary(self)
Definition: __init__.py:530
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def _createFWLiteEvent(self)
Definition: __init__.py:632
def secondaryFileIndex(self)
Definition: __init__.py:599
def __init__(self, inputFiles='', kwargs)
Definition: __init__.py:143
def _createFWLiteRun(self)
Private Member Functions ##.
Definition: __init__.py:417
_maxRuns
Parse optional arguments ##.
Definition: __init__.py:305
def _setStatus(self, getByLabelSuccess, labelString)
Definition: __init__.py:119
def _next(self)
Definition: __init__.py:661
def runAuxiliary(self)
Definition: __init__.py:362
def __init__(self, inputFiles='', kwargs)
Definition: __init__.py:461
def _next(self)
Definition: __init__.py:276
def product(self)
Definition: __init__.py:84
## Handle
Definition: __init__.py:50
def getByLabel(self, args)
Definition: __init__.py:211
def __iter__(self)
Definition: __init__.py:193
def fileIndicies(self)
Definition: __init__.py:607
def __iter__(self)
Definition: __init__.py:587
def toBegin(self)
Definition: __init__.py:518
def _toBeginCode(self)
Definition: __init__.py:618
def getByLabel(self, args)
Definition: __init__.py:369
def object(self)
Definition: __init__.py:538
_maxLumis
Parse optional arguments ##.
Definition: __init__.py:147
## Lumis
Definition: __init__.py:141
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def _createFWLiteLumi(self)
Private Member Functions ##.
Definition: __init__.py:257
def __init__(self, inputFiles='', kwargs)
Definition: __init__.py:301
def _typeInfoGetter(self)
Definition: __init__.py:109
def to(self, entryIndex)
Definition: __init__.py:511
def _next(self)
Definition: __init__.py:436
def _parseOptions(self, options)
Private Member Functions ##.
Definition: __init__.py:614
def __iter__(self)
Definition: __init__.py:351
_maxEvents
Parse optional arguments ##.
Definition: __init__.py:470
def isValid(self)
Definition: __init__.py:78
double split
Definition: MVATrainer.cc:139
def luminosityBlockAuxiliary(self)
Definition: __init__.py:204
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def __del__(self)
Definition: __init__.py:186
def aux(self)
Definition: __init__.py:197
def __del__(self)
Definition: __init__.py:625