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 33 of file VIDSelectorBase.py.

References join().

33 
34 def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
35  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 25 of file VIDSelectorBase.py.

References python.rootplot.root2matplotlib.replace().

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().

25 
26 def process_pset( builder, pythonpset ):
27  """ turn a python cms.PSet into a VID ID """
28  escaped_pset = config_template%(pythonpset)
29 
30  idname = pythonpset.idName.value().replace('-','_')
31 
32  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 15 of file VIDSelectorBase.py.