CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor Class Reference
Inheritance diagram for Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor:
Vispa.Share.BasicDataAccessor.BasicDataAccessor

Public Member Functions

def __init__
 
def addBranches
 
def addConfig
 
def addContentFile
 
def addContents
 
def applyCommands
 
def children
 
def clear
 
def compareEntry
 
def eventContentsList
 
def inContent
 
def isContainer
 
def label
 
def properties
 
def topLevelObjects
 
- Public Member Functions inherited from Vispa.Share.BasicDataAccessor.BasicDataAccessor
def addProperty
 
def allChildren
 
def children
 
def isContainer
 
def label
 
def properties
 
def property
 
def propertyValue
 
def removeProperty
 
def setProperty
 
def topLevelObjects
 

Private Attributes

 _configAccessors
 
 _eventContents
 

Detailed Description

Definition at line 8 of file EventContentDataAccessor.py.

Constructor & Destructor Documentation

def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.__init__ (   self)

Member Function Documentation

def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addBranches (   self,
  name,
  branches 
)

Definition at line 68 of file EventContentDataAccessor.py.

References Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor._eventContents.

Referenced by Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addContentFile().

68 
69  def addBranches(self,name,branches):
70  content = []
71  for branch in branches:
72  type = branch[0]
73  label = branch[1]
74  product = branch[2]
75  process = branch[3]
76  content += [(type,label,product,process)]
77  self._eventContents += [(name, content, False, {})]
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addConfig (   self,
  accessor 
)

Definition at line 45 of file EventContentDataAccessor.py.

References Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor._eventContents, Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addContents(), and Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.applyCommands().

45 
46  def addConfig(self, accessor):
47  if not accessor:
48  return
49  configName=os.path.splitext(os.path.basename(accessor.configFile()))[0]
50  name = "Input: " + configName
51  inputContent=accessor.inputEventContent()
52  self._eventContents += [(name, inputContent[0], True, inputContent[1])]
53  output_content=[]
54  if len(self._eventContents)>1:
55  self.addContents(output_content,self._eventContents[-2][1])
56  output_content=self.applyCommands(output_content,accessor.inputCommands())
57  self.addContents(output_content,accessor.outputEventContent())
58  output_content=self.applyCommands(output_content,accessor.outputCommands())
59  name = "Output: " + configName
60  self._eventContents += [(name, output_content, False, {})]
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addContentFile (   self,
  filename 
)

Definition at line 61 of file EventContentDataAccessor.py.

References Tracker_OldtoNewConverter.addBranches(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addBranches(), TrackerGeometryIntoNtuples.addBranches(), and split.

61 
62  def addContentFile(self, filename):
63  accessor=EdmDataAccessor()
64  accessor.open(filename)
65  branches=[branch[0].split("_") for branch in accessor.filteredBranches()]
66  name = os.path.splitext(os.path.basename(filename))[0]
67  self.addBranches(name,branches)
double split
Definition: MVATrainer.cc:139
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addContents (   self,
  content,
  content2 
)

Definition at line 33 of file EventContentDataAccessor.py.

References Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.inContent().

Referenced by Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addConfig().

33 
34  def addContents(self,content,content2):
35  for object in content2:
36  if not self.inContent(object,content):
37  content+=[object]
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.applyCommands (   self,
  content,
  outputCommands 
)

Definition at line 87 of file EventContentDataAccessor.py.

Referenced by Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addConfig().

87 
88  def applyCommands(self, content, outputCommands):
89  keep = {}
90  if len(outputCommands)>0 and outputCommands[0]!="keep *":
91  for object in content:
92  keep[object] = False
93  else:
94  for object in content:
95  keep[object] = True
96  for o in outputCommands:
97  command, filter = o.split(" ")
98  if len(filter.split("_")) > 1:
99  module = filter.split("_")[1]
100  product = filter.split("_")[2]
101  process = filter.split("_")[3]
102  else:
103  module = filter
104  product = "*"
105  process = "*"
106  for object in content:
107  if "*" in module:
108  match = module.strip("*") in object[1]
109  else:
110  match = module == object[1]
111  if "*" in product:
112  match = match and product.strip("*") in object[2]
113  else:
114  match = match and product == object[2]
115  if "*" in process:
116  match = match and process.strip("*") in object[3]
117  else:
118  match = match and process == object[3]
119  if match:
120  keep[object] = command == "keep"
121  return [object for object in content if keep[object]]
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.children (   self,
  object 
)

Definition at line 13 of file EventContentDataAccessor.py.

Referenced by Vispa.Share.BasicDataAccessor.BasicDataAccessor.allChildren(), Vispa.Views.LineDecayView.LineDecayView.autolayout(), Vispa.Views.BoxDecayView.BoxDecayContainer.autolayoutAlgorithm(), Vispa.Gui.WidgetContainer.WidgetContainer.autolayoutChildren(), Vispa.Gui.WidgetContainer.WidgetContainer.autosize(), Vispa.Views.LineDecayView.LineDecayContainer.childContainer(), Vispa.Views.WidgetView.WidgetView.clear(), Vispa.Views.LineDecayView.LineDecayContainer.createDecayObjectsFromPxlObject(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner.deleteSelectedConnections(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.deselectAllWidgets(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner.getWidgetByName(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner.hideMenuWidgets(), Vispa.Views.LineDecayView.LineDecayView.lineDecayContainer(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.mouseReleaseEvent(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner.portConnection(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner.propagateEventUnderConnectionWidget(), Vispa.Views.LineDecayView.LineDecayContainer.scheduleUpdateVisibleList(), Vispa.Views.LineDecayView.LineDecayView.scrollBarValueChanged(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.selectedWidgets(), Vispa.Views.LineDecayView.LineDecayContainer.setAcceptDrops(), Vispa.Gui.VispaWidget.VispaWidget.setDragable(), Vispa.Views.LineDecayView.LineDecayView.setEditable(), Vispa.Gui.ZoomableWidget.ZoomableWidget.setZoom(), Vispa.Gui.WidgetContainer.WidgetContainer.toggleCollapse(), Vispa.Gui.ConnectableWidgetOwner.ConnectableWidgetOwner.updateConnections(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDragged().

13 
14  def children(self, object):
15  return []
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.clear (   self)

Definition at line 122 of file EventContentDataAccessor.py.

References Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor._eventContents.

Referenced by Vispa.Views.WidgetView.WidgetView.closeEvent(), Vispa.Views.BoxDecayView.BoxDecayView.closeEvent(), Vispa.Share.FindAlgorithm.FindAlgorithm.findUsingFindDialog(), Vispa.Views.LineDecayView.LineDecayView.setDataObjects(), Vispa.Views.WidgetView.WidgetView.setDataObjects(), Vispa.Views.TreeView.TreeView.updateContent(), Vispa.Views.TableView.TableView.updateContent(), Vispa.Views.BoxDecayView.BoxDecayView.updateContent(), and Vispa.Views.PropertyView.PropertyView.updateContent().

def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.compareEntry (   self,
  entry1,
  entry2 
)

Definition at line 78 of file EventContentDataAccessor.py.

Referenced by Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.inContent().

78 
79  def compareEntry(self, entry1, entry2):
80  result=True
81  for i in range(4):
82  result=result and (entry1[i]==entry2[i] or entry1[i]=="*" or entry2[i]=="*")
83  return result
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.eventContentsList (   self)
return top level objects from file, e.g. the event.

Definition at line 22 of file EventContentDataAccessor.py.

References Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor._eventContents.

22 
23  def eventContentsList(self):
24  """ return top level objects from file, e.g. the event.
25  """
26  return self._eventContents
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.inContent (   self,
  entry,
  content 
)

Definition at line 84 of file EventContentDataAccessor.py.

References Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.compareEntry().

Referenced by Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addContents().

84 
85  def inContent(self, entry, content):
86  return True in [self.compareEntry(entry,c) for c in content]
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.isContainer (   self,
  object 
)

Definition at line 16 of file EventContentDataAccessor.py.

16 
17  def isContainer(self, object):
18  return False
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.label (   self,
  object 
)

Definition at line 19 of file EventContentDataAccessor.py.

References join().

19 
20  def label(self, object):
21  return "_".join(object)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.properties (   self,
  object 
)
Make list of all properties 

Definition at line 38 of file EventContentDataAccessor.py.

Referenced by Vispa.Share.BasicDataAccessor.BasicDataAccessor.property().

38 
39  def properties(self, object):
40  """ Make list of all properties """
41  properties = []
42  properties += [("Category", "Object info", "")]
43  properties += [("String", "Label", object)]
44  return properties
def Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.topLevelObjects (   self)

Definition at line 27 of file EventContentDataAccessor.py.

References Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor._eventContents, and list().

27 
28  def topLevelObjects(self):
29  objects = []
30  for name, content, input, comment in self._eventContents:
31  objects += list(content)
32  return objects
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

Member Data Documentation

Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor._configAccessors
private

Definition at line 11 of file EventContentDataAccessor.py.

Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor._eventContents
private

Definition at line 10 of file EventContentDataAccessor.py.

Referenced by Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addBranches(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.addConfig(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.clear(), Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.eventContentsList(), and Vispa.Plugins.EdmBrowser.EventContentDataAccessor.EventContentDataAccessor.topLevelObjects().