CMS 3D CMS Logo

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

Classes

class  VIDSelectorBase
 

Functions

def id_generator
 
def process_pset
 

Variables

string config_template
 

Function Documentation

def VIDSelectorBase.id_generator (   size = 6,
  chars = string.ascii_uppercase + string.digits 
)

Definition at line 28 of file VIDSelectorBase.py.

References join().

28 
29 def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
30  return ''.join(random.choice(chars) for _ in range(size))
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def VIDSelectorBase.process_pset (   builder,
  pythonpset 
)
turn a python cms.PSet into a VID ID 

Definition at line 20 of file VIDSelectorBase.py.

References python.rootplot.root2matplotlib.replace().

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().

20 
21 def process_pset( builder, pythonpset ):
22  """ turn a python cms.PSet into a VID ID """
23  escaped_pset = config_template%(pythonpset)
24 
25  idname = pythonpset.idName.value().replace('-','_')
26 
27  return builder(escaped_pset,idname)

Variable Documentation

string VIDSelectorBase.config_template
Initial value:
1 = """
2 import FWCore.ParameterSet.Config as cms
3 
4 from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry
5 
6 ebCutOff = 1.479
7 
8 %s
9 """

Definition at line 10 of file VIDSelectorBase.py.