CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
config.CFG Class Reference
Inheritance diagram for config.CFG:
config.Analyzer config.Component config.Service config.DataComponent config.MCComponent

Public Member Functions

def __init__
 
def __str__
 
def clone
 

Detailed Description

Base configuration class. The attributes are used to store parameters of any type

Definition at line 33 of file config.py.

Constructor & Destructor Documentation

def config.CFG.__init__ (   self,
  kwargs 
)
All keyword arguments are added as attributes.

Definition at line 35 of file config.py.

Member Function Documentation

def config.CFG.__str__ (   self)
A useful printout

Definition at line 39 of file config.py.

def config.CFG.clone (   self,
  kwargs 
)
Make a copy of this object, redefining (or adding) some parameters, just
   like in the CMSSW python configuration files. 

   For example, you can do
      module1 = cfg.Analyzer(SomeClass, 
          param1 = value1, 
          param2 = value2, 
          param3 = value3, 
          ...)
      module2 = module1.clone(
         param2 = othervalue,
         newparam = newvalue)
   and module2 will inherit the configuration of module2 except for
   the value of param2, and for having an extra newparam of value newvalue
   (the latter may be useful if e.g. newparam were optional, and needed
   only when param2 == othervalue)

   Note that, just like in CMSSW, this is a shallow copy and not a deep copy,
   i.e. if in the example above value1 were to be an object, them module1 and
   module2 will share the same instance of value1, and not have two copies.

Definition at line 50 of file config.py.