CMS 3D CMS Logo

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

Public Member Functions

def __init__
 
def __setattr__
 
def build_name
 
def clone
 
- Public Member Functions inherited from config.CFG
def __init__
 
def __str__
 
def clone
 

Public Attributes

 class_object
 
 instance_label
 
 name
 
 verbose
 

Static Public Attributes

int num_instance = 0
 

Detailed Description

Base analyzer configuration, see constructor

Definition at line 79 of file config.py.

Constructor & Destructor Documentation

def config.Analyzer.__init__ (   self,
  class_object,
  instance_label = None,
  verbose = False,
  kwargs 
)
One could for example define the analyzer configuration for a
di-muon framework.Analyzer.Analyzer in the following way:

ZMuMuAna = cfg.Analyzer(
"ZMuMuAnalyzer",
pt1 = 20,
pt2 = 20,
iso1 = 0.1,
iso2 = 0.1,
eta1 = 2,
eta2 = 2,
m_min = 0,
m_max = 200
)

Any kinds of keyword arguments can be added.
The name must be present, and must be well chosen, as it will be used
by the Looper to find the module containing the Analyzer class.
This module should be in your PYTHONPATH. If not, modify your python path
accordingly in your script.

Definition at line 85 of file config.py.

85 
86  verbose=False, **kwargs):
87  '''
88  One could for example define the analyzer configuration for a
89  di-muon framework.Analyzer.Analyzer in the following way:
90 
91  ZMuMuAna = cfg.Analyzer(
92  "ZMuMuAnalyzer",
93  pt1 = 20,
94  pt2 = 20,
95  iso1 = 0.1,
96  iso2 = 0.1,
97  eta1 = 2,
98  eta2 = 2,
99  m_min = 0,
100  m_max = 200
101  )
102 
103  Any kinds of keyword arguments can be added.
104  The name must be present, and must be well chosen, as it will be used
105  by the Looper to find the module containing the Analyzer class.
106  This module should be in your PYTHONPATH. If not, modify your python path
107  accordingly in your script.
108  '''
110  self.class_object = class_object
111  self.__class__.num_instance += 1
112  if instance_label is None:
113  instance_label = str(self.__class__.num_instance)
114  self.instance_label = instance_label
115  self.verbose = verbose
116  super(Analyzer, self).__init__(**kwargs)
#define str(s)
def __init__
Definition: config.py:85

Member Function Documentation

def config.Analyzer.__setattr__ (   self,
  name,
  value 
)
You may decide to copy an existing analyzer and change
its instance_label. In that case, one must stay consistent.

Definition at line 117 of file config.py.

118  def __setattr__(self, name, value):
119  '''You may decide to copy an existing analyzer and change
120  its instance_label. In that case, one must stay consistent.'''
121  self.__dict__[name] = value
122  if name == 'instance_label':
123  self.name = self.build_name()
def __setattr__
Definition: config.py:117
def build_name
Definition: config.py:124
def config.Analyzer.build_name (   self)

Definition at line 124 of file config.py.

References analyzer.Analyzer.instance_label, config.Analyzer.instance_label, and join().

Referenced by config.Service.__setattr__().

125  def build_name(self):
126  class_name = '.'.join([self.class_object.__module__,
127  self.class_object.__name__])
128  name = '_'.join([class_name, self.instance_label])
129  return name
def build_name
Definition: config.py:124
static std::string join(char **cmd)
Definition: RemoteFile.cc:19
def config.Analyzer.clone (   self,
  kwargs 
)

Definition at line 130 of file config.py.

131  def clone(self, **kwargs):
132  other = super(Analyzer, self).clone(**kwargs)
133  if 'class_object' in kwargs and 'name' not in kwargs:
134  other.name = other.build_name()
135  return other

Member Data Documentation

config.Analyzer.class_object

Definition at line 109 of file config.py.

config.Analyzer.instance_label

Definition at line 113 of file config.py.

Referenced by config.Analyzer.build_name(), config.Service.build_name(), Filter.Filter.process(), SimpleJetAnalyzer.SimpleJetAnalyzer.process(), and ResonanceBuilder.ResonanceBuilder.process().

config.Analyzer.name

Definition at line 122 of file config.py.

Referenced by FWLite.ElectronMVAID.__call__(), dirstructure.Directory.__create_pie_image(), DisplayManager.DisplayManager.__del__(), dqm_interfaces.DirID.__eq__(), dirstructure.Directory.__get_full_path(), dirstructure.Comparison.__get_img_name(), dataset.Dataset.__getDataType(), dataset.Dataset.__getFileInfoList(), dirstructure.Comparison.__make_image(), dirstructure.Directory.__repr__(), dqm_interfaces.DirID.__repr__(), dirstructure.Comparison.__repr__(), config.Service.__setattr__(), config.CFG.__str__(), counter.Counter.__str__(), average.Average.__str__(), FWLite.WorkingPoints._reformat_cut_definitions(), dirstructure.Directory.calcStats(), geometryComparison.GeometryComparison.createScript(), validation.Sample.digest(), python.rootplot.utilities.Hist.divide(), python.rootplot.utilities.Hist.divide_wilson(), DisplayManager.DisplayManager.Draw(), utils.StatisticalTest.get_status(), production_tasks.Task.getname(), dataset.CMSDataset.getPrimaryDatasetEntries(), dataset.PrivateDataset.getPrimaryDatasetEntries(), primaryVertexResolution.PrimaryVertexResolution.getRepMap(), primaryVertexValidation.PrimaryVertexValidation.getRepMap(), zMuMuValidation.ZMuMuValidation.getRepMap(), VIDSelectorBase.VIDSelectorBase.initialize(), dirstructure.Directory.print_report(), dataset.BaseDataset.printInfo(), dataset.Dataset.printInfo(), production_tasks.MonitorJobs.run(), python.rootplot.utilities.Hist.TGraph(), python.rootplot.utilities.Hist.TH1F(), counter.Counter.write(), and average.Average.write().

int config.Analyzer.num_instance = 0
static

Definition at line 82 of file config.py.

config.Analyzer.verbose

Definition at line 114 of file config.py.

Referenced by python.diff_provenance.difference.list_diff(), python.diffProv.difference.list_diff(), python.diff_provenance.difference.module_diff(), python.diffProv.difference.module_diff(), python.diff_provenance.difference.onefilemodules(), and python.diffProv.difference.onefilemodules().