CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
SetCondition Namespace Reference

Functions

def setCondition
 

Function Documentation

def SetCondition.setCondition (   process,
  connect = "frontier://FrontierProd/CMS_CONDITIONS",
  record = None,
  tag = None,
  label = None 
)
Overrides a condition in startgeometry from globaltag.

Definition at line 7 of file SetCondition.py.

7 
8  label = None):
9  """
10  Overrides a condition in startgeometry from globaltag.
11  """
12 
13  if record is None or tag is None:
14  raise ValueError("A 'record' and a 'tag' have to be provided to 'setCondition'.")
15 
16  if not hasattr(process, "GlobalTag"):
17  process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
18 
19  args = {"connect": cms.string(connect),
20  "record": cms.string(record),
21  "tag": cms.string(tag)}
22  if label is not None:
23  args["label"] = cms.untracked.string(label)
24 
25  process.GlobalTag.toGet.append(cms.PSet(**args))