CMS 3D CMS Logo

List of all members | Public Member Functions
config_test.ConfigTestCase Class Reference
Inheritance diagram for config_test.ConfigTestCase:

Public Member Functions

def test_analyzer (self)
 
def test_config (self)
 
def test_copy (self)
 
def test_MCComponent (self)
 

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 resolutioncreator_cfi.object.

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

Definition at line 33 of file config_test.py.

References resolutioncreator_cfi.object.

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

Definition at line 52 of file config_test.py.

References resolutioncreator_cfi.object.

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

Definition at line 22 of file config_test.py.

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