CMS 3D CMS Logo

TriggerObject.py
Go to the documentation of this file.
2 import fnmatch
3 
5  '''With a nice printout, and functions to investigate the path and filters in the trigger object.'''
6 
7  def hasPath( self, path ):
8  '''Returns true if this trigger object was used in path
9  (path can contain a wildcard).
10  '''
11  selNames = fnmatch.filter( self.getSelectionNames(), path )
12  if len(selNames)>0:
13  return True
14  else:
15  return False
16 
17  def __str__(self):
18  base = super(TriggerObject, self).__str__()
19  specific = []
20  theStrs = [base]
21  for name in self.getSelectionNames():
22  hasSel = self.getSelection( name )
23  if hasSel:
24  specific.append( ''.join(['\t', name]) )
25  if len(specific)>0:
26  specific.insert(0,'Paths:')
27  theStrs.extend( specific )
28  return '\n'.join(theStrs)
29 
static std::string join(char **cmd)
Definition: RemoteFile.cc:17