CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
GlobalTag.GlobalTag Class Reference

Public Member Functions

def __add__ (self, other)
 
def __init__ (self, inputGT="", inputConnect="", inputPfnPrefix="", inputPfnPostfix="", inputGTParams=[])
 
def __or__ (self, other)
 
def buildString (self, index)
 
def checkPrefix (self, inputGTParams)
 
def connect (self)
 
def gt (self)
 
def pfnPostfix (self)
 
def pfnPrefix (self)
 

Public Attributes

 gtParams
 

Detailed Description

Definition at line 13 of file GlobalTag.py.

Constructor & Destructor Documentation

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

Definition at line 14 of file GlobalTag.py.

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
34  # print self.gtParams
def __init__(self, inputGT="", inputConnect="", inputPfnPrefix="", inputPfnPostfix="", inputGTParams=[])
Definition: GlobalTag.py:14

Member Function Documentation

def GlobalTag.GlobalTag.__add__ (   self,
  other 
)

Definition at line 43 of file GlobalTag.py.

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

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

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"
53  raise GlobalTagBuilderException(exceptionString)
def __add__(self, other)
Definition: GlobalTag.py:43
def checkPrefix(self, inputGTParams)
Definition: GlobalTag.py:54
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 35 of file GlobalTag.py.

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

Referenced by LumiList.LumiList.__add__().

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])
42  return GlobalTag(inputGTParams = tempGTParams)
def checkPrefix(self, inputGTParams)
Definition: GlobalTag.py:54
double split
Definition: MVATrainer.cc:139
def __or__(self, other)
Definition: GlobalTag.py:35
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 65 of file GlobalTag.py.

References GlobalTag.GlobalTag.gtParams.

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

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
74  # return outputString.strip("|")
def buildString(self, index)
Definition: GlobalTag.py:65
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 54 of file GlobalTag.py.

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

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

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
64  return -1
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
def checkPrefix(self, inputGTParams)
Definition: GlobalTag.py:54
double split
Definition: MVATrainer.cc:139
def GlobalTag.GlobalTag.connect (   self)

Definition at line 77 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(), o2o_db_cfgmap.DbManagerDAQ.update_hashmap(), Vispa.Plugins.EdmBrowser.EdmBrowserTabController.EdmBrowserTabController.updateViewMenu(), and Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.updateViewMenu().

77  def connect(self):
78  return self.buildString(1)
def connect(self)
Definition: GlobalTag.py:77
def buildString(self, index)
Definition: GlobalTag.py:65
def GlobalTag.GlobalTag.gt (   self)

Definition at line 75 of file GlobalTag.py.

References GlobalTag.GlobalTag.buildString().

75  def gt(self):
76  return self.buildString(0)
def buildString(self, index)
Definition: GlobalTag.py:65
def GlobalTag.GlobalTag.pfnPostfix (   self)

Definition at line 81 of file GlobalTag.py.

References GlobalTag.GlobalTag.buildString().

81  def pfnPostfix(self):
82  return self.buildString(3)
83 
def buildString(self, index)
Definition: GlobalTag.py:65
def pfnPostfix(self)
Definition: GlobalTag.py:81
def GlobalTag.GlobalTag.pfnPrefix (   self)

Definition at line 79 of file GlobalTag.py.

References GlobalTag.GlobalTag.buildString().

79  def pfnPrefix(self):
80  return self.buildString(2)
def pfnPrefix(self)
Definition: GlobalTag.py:79
def buildString(self, index)
Definition: GlobalTag.py:65

Member Data Documentation