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

References join().

32 
33 def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
34  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,
  suffix 
)
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, suffix ):
27  """ turn a python cms.PSet into a VID ID """
28  idname = pythonpset.idName.value().replace('-','_') + suffix
29  escaped_pset = config_template%(idname, pythonpset)
30 
31  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 = %s
9 """

Definition at line 15 of file VIDSelectorBase.py.