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_test.ConfigTestCase Class Reference
Inheritance diagram for config_test.ConfigTestCase:

Public Member Functions

def test_analyzer
 
def test_config
 
def test_copy
 
def test_MCComponent
 

Detailed Description

Definition at line 8 of file config_test.py.

Member Function Documentation

def config_test.ConfigTestCase.test_analyzer (   self)

Definition at line 10 of file config_test.py.

References dbtoconf.object.

10 
11  def test_analyzer(self):
12  class Ana1(object):
13  pass
14  ana1 = Analyzer(
15  Ana1,
16  toto = '1',
17  tata = 'a'
18  )
19  # checking that the analyzer name does not contain a slash,
20  # to make sure the output directory name does not contain a subdirectory
21  self.assertTrue( '/' not in ana1.name )
list object
Definition: dbtoconf.py:77
def config_test.ConfigTestCase.test_config (   self)

Definition at line 33 of file config_test.py.

References dbtoconf.object.

33 
34  def test_config(self):
35  class Ana1(object):
36  pass
37  ana1 = Analyzer(
38  Ana1,
39  toto = '1',
40  tata = 'a'
41  )
42  comp1 = Component(
43  'comp1',
44  files='*.root',
45  triggers='HLT_stuff'
46  )
47  from PhysicsTools.HeppyCore.framework.chain import Chain as Events
48  config = Config( components = [comp1],
49  sequence = [ana1],
50  services = [],
51  events_class = Events )
list object
Definition: dbtoconf.py:77
def config_test.ConfigTestCase.test_copy (   self)

Definition at line 52 of file config_test.py.

References dbtoconf.object.

52 
53  def test_copy(self):
54  class Ana1(object):
55  pass
56  ana1 = Analyzer(
57  Ana1,
58  instance_label = 'inst1',
59  toto = '1',
60  )
61  ana2 = copy.copy(ana1)
62  ana2.instance_label = 'inst2'
63  ana2.toto2 = '2'
64  self.assertEqual(ana2.name, '__main__.Ana1_inst2')
65  self.assertEqual(ana2.toto2, '2')
list object
Definition: dbtoconf.py:77
def config_test.ConfigTestCase.test_MCComponent (   self)

Definition at line 22 of file config_test.py.

22 
23  def test_MCComponent(self):
24  DYJets = MCComponent(
25  name = 'DYJets',
26  files ='blah_mc.root',
27  xSection = 3048.,
28  nGenEvents = 34915945,
29  triggers = ['HLT_MC'],
30  vertexWeight = 1.,
31  effCorrFactor = 1 )
32  self.assertTrue(True)