CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 61 of file VIDSelectorBase.py.

References join(), and sistrip::SpyUtilities.range().

61 
62 def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
63  return ''.join(random.choice(chars) for _ in range(size))
const uint16_t range(const Frame &aFrame)
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def VIDSelectorBase.process_pset (   builder,
  pythonpset,
  suffix 
)
turn a python cms.PSet into a VID ID 

Definition at line 54 of file VIDSelectorBase.py.

References python.rootplot.root2matplotlib.replace().

Referenced by VIDSelectorBase.VIDSelectorBase.initialize().

54 
55 def process_pset( builder, pythonpset, suffix ):
56  """ turn a python cms.PSet into a VID ID """
57  idname = pythonpset.idName.value().replace('-','_') + suffix
58  escaped_pset = config_template%(idname, pythonpset)
59 
60  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 44 of file VIDSelectorBase.py.