CMS 3D CMS Logo

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

Public Member Functions

def __add__
 
def __init__
 
def __or__
 
def buildString
 
def checkPrefix
 
def connect
 
def gt
 
def pfnPostfix
 
def pfnPrefix
 

Public Attributes

 gtParams
 

Detailed Description

Definition at line 12 of file GlobalTag.py.

Constructor & Destructor Documentation

def GlobalTag.GlobalTag.__init__ (   self,
  inputGT = "",
  inputConnect = "",
  inputPfnPrefix = "",
  inputPfnPostfix = "",
  inputGTParams = [] 
)

Definition at line 13 of file GlobalTag.py.

13 
14  def __init__(self, inputGT = "", inputConnect = "", inputPfnPrefix = "", inputPfnPostfix = "", inputGTParams = []):
15  if inputGTParams == []:
16  self.gtParams = []
17  localConnect = inputConnect
18  if localConnect == "":
19  # print "No connection string specified for the GT. Using the default one:", Configuration.StandardSequences.FrontierConditions_GlobalTag_cff.GlobalTag.connect
20  localConnect = Configuration.StandardSequences.FrontierConditions_GlobalTag_cff.GlobalTag.connect.value()
21  # raise GlobalTagBuilderException("Error: no connection string specified.")
22  localGT = inputGT
23  # Expand the alias name
24  if localGT in aliases:
25  localGT = aliases[localGT]
26  if localGT.find("|") != -1 and localConnect.find("|") == -1:
27  # Fill a connection string for each GT
28  connect = localConnect
29  for i in range(1,len(localGT.split("|"))):
30  localConnect += "|"+connect
31  self.gtParams.append([localGT, localConnect, inputPfnPrefix, inputPfnPostfix])
32  else:
33  self.gtParams = inputGTParams
# print self.gtParams

Member Function Documentation

def GlobalTag.GlobalTag.__add__ (   self,
  other 
)

Definition at line 42 of file GlobalTag.py.

References GlobalTag.GlobalTag.checkPrefix(), GlobalTag.GlobalTag.gtParams, and list().

Referenced by counter.Counter.__iadd__(), and average.Average.__iadd__().

42 
43  def __add__(self, other):
44  index = self.checkPrefix(other.gtParams)
45  if index != -1:
46  tempGTParams = list(self.gtParams)
47  tempGTParams[index] = other.gtParams[0]
48  return GlobalTag(inputGTParams = tempGTParams)
49  else:
50  exceptionString = "Error: replacement of GT "+other.gtParams[0][0]+" not allowed. No matching prefix found in existing GT components. Available components are:\n"
51  for comp in self.gtParams:
52  exceptionString += comp[0] + "\n"
raise GlobalTagBuilderException(exceptionString)
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 GlobalTag.GlobalTag.__or__ (   self,
  other 
)

Definition at line 34 of file GlobalTag.py.

References GlobalTag.GlobalTag.checkPrefix(), GlobalTag.GlobalTag.gtParams, list(), and split.

Referenced by LumiList.LumiList.__add__().

34 
35  def __or__(self, other):
36  if self.checkPrefix(other.gtParams) != -1:
37  raise GlobalTagBuilderException("Error: trying to add the same GT component type \""+other.gtParams[0][0].split("_")[0]+"\" twice. This is not supported.")
38  if len(other.gtParams) > 1:
39  raise GlobalTagBuilderException("Error: the second GT has already a list. This is not supported.")
40  tempGTParams = list(self.gtParams)
41  tempGTParams.append(other.gtParams[0])
return GlobalTag(inputGTParams = tempGTParams)
double split
Definition: MVATrainer.cc:139
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 GlobalTag.GlobalTag.buildString (   self,
  index 
)

Definition at line 64 of file GlobalTag.py.

References GlobalTag.GlobalTag.gtParams.

Referenced by GlobalTag.GlobalTag.connect(), GlobalTag.GlobalTag.gt(), GlobalTag.GlobalTag.pfnPostfix(), and GlobalTag.GlobalTag.pfnPrefix().

64 
65  def buildString(self, index):
66  outputString = ""
67  # print "index =", index
68  # print self.gtParams
69  for elem in self.gtParams:
70  outputString += elem[index]
71  if elem != self.gtParams[len(self.gtParams)-1]:
72  outputString += "|"
73  return outputString
# return outputString.strip("|")
def GlobalTag.GlobalTag.checkPrefix (   self,
  inputGTParams 
)
Compares two input GTs to see if they have the same prefix. Returns the index in the internal list of GTs of the match
or -1 in case of no match. 

Definition at line 53 of file GlobalTag.py.

References spr.find(), GlobalTag.GlobalTag.gtParams, and split.

Referenced by GlobalTag.GlobalTag.__add__(), and GlobalTag.GlobalTag.__or__().

53 
54  def checkPrefix(self, inputGTParams):
55  """ Compares two input GTs to see if they have the same prefix. Returns the index in the internal list of GTs of the match
56  or -1 in case of no match. """
57  if inputGTParams[0][0].find("_") == -1:
58  print "Invalid GT name. It does not contain an _, it cannot be used for replacements."
59  sys.exit(1)
60  prefix = inputGTParams[0][0].split("_")[0]
61  for i in range(0, len(self.gtParams)):
62  if self.gtParams[i][0].split("_")[0] == prefix:
63  return i
return -1
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
double split
Definition: MVATrainer.cc:139
def GlobalTag.GlobalTag.connect (   self)

Definition at line 76 of file GlobalTag.py.

References GlobalTag.GlobalTag.buildString().

Referenced by Vispa.Gui.ZoomableScrollArea.ZoomableScrollArea.__init__(), Vispa.Views.PropertyView.BooleanProperty.__init__(), Vispa.Gui.FindDialog.FindDialog._addScript(), Vispa.Gui.FindDialog.FindDialog._addStringProperty(), Vispa.Main.Application.Application._connectSignals(), Vispa.Plugins.ConfigEditor.CodeTableView.CodeTableView._createItem(), Vispa.Gui.BoxContentDialog.BoxContentDialog.addButton(), Vispa.Gui.ToolBoxContainer.ToolBoxContainer.addWidget(), Vispa.Views.PropertyView.PropertyView.append(), Vispa.Views.PropertyView.PropertyView.appendAddRow(), Vispa.Main.Application.Application.createAction(), Vispa.Views.PropertyView.TextEditWithButtonProperty.createButton(), Vispa.Views.LineDecayView.LineDecayView.createLineDecayContainer(), Vispa.Views.PropertyView.TextEditWithButtonProperty.createLineEdit(), Vispa.Views.LineDecayView.LineDecayContainer.createObject(), Vispa.Views.PropertyView.TextEditWithButtonProperty.createTextEdit(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.filterDialog(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.find(), Vispa.Gui.PortWidget.PortWidget.mouseMoveEvent(), Vispa.Views.PropertyView.BooleanProperty.setChecked(), Vispa.Main.SplitterTab.SplitterTab.setController(), Vispa.Plugins.Browser.BrowserTab.BrowserTab.setController(), Vispa.Views.PropertyView.BooleanProperty.setReadOnly(), Vispa.Views.PropertyView.DropDownProperty.setReadOnly(), Vispa.Views.PropertyView.TextEditWithButtonProperty.setReadOnly(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.setTab(), Vispa.Views.PropertyView.IntegerProperty.setValue(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController.switchCenterView(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController.updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateViewMenu().

76 
77  def connect(self):
return self.buildString(1)
def GlobalTag.GlobalTag.gt (   self)

Definition at line 74 of file GlobalTag.py.

References GlobalTag.GlobalTag.buildString().

74 
75  def gt(self):
return self.buildString(0)
def GlobalTag.GlobalTag.pfnPostfix (   self)

Definition at line 80 of file GlobalTag.py.

References GlobalTag.GlobalTag.buildString().

80 
81  def pfnPostfix(self):
82  return self.buildString(3)
def GlobalTag.GlobalTag.pfnPrefix (   self)

Definition at line 78 of file GlobalTag.py.

References GlobalTag.GlobalTag.buildString().

78 
79  def pfnPrefix(self):
return self.buildString(2)

Member Data Documentation

GlobalTag.GlobalTag.gtParams

Definition at line 15 of file GlobalTag.py.

Referenced by GlobalTag.GlobalTag.__add__(), GlobalTag.GlobalTag.__or__(), GlobalTag.GlobalTag.buildString(), and GlobalTag.GlobalTag.checkPrefix().