CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
config_test.py
Go to the documentation of this file.
1 import unittest
2 import os
3 import shutil
4 
6 
7 class ConfigTestCase(unittest.TestCase):
8 
9  def test_analyzer(self):
10  class Ana1(object):
11  pass
12  ana1 = Analyzer(
13  Ana1,
14  toto = '1',
15  tata = 'a'
16  )
17  # checking that the analyzer name does not contain a slash,
18  # to make sure the output directory name does not contain a subdirectory
19  self.assertTrue( '/' not in ana1.name )
20 
21  def test_MCComponent(self):
22  DYJets = MCComponent(
23  name = 'DYJets',
24  files ='blah_mc.root',
25  xSection = 3048.,
26  nGenEvents = 34915945,
27  triggers = ['HLT_MC'],
28  vertexWeight = 1.,
29  effCorrFactor = 1 )
30  self.assertTrue(True)
31 
32  def test_config(self):
33  class Ana1(object):
34  pass
35  ana1 = Analyzer(
36  Ana1,
37  toto = '1',
38  tata = 'a'
39  )
40  comp1 = Component(
41  'comp1',
42  files='*.root',
43  triggers='HLT_stuff'
44  )
45  from PhysicsTools.HeppyCore.framework.chain import Chain as Events
46  config = Config( components = [comp1],
47  sequence = [ana1],
48  services = [],
49  events_class = Events )
50 
51 
52 
53 
54 if __name__ == '__main__':
55  unittest.main()
list object
Definition: dbtoconf.py:77
Definition: Config.py:1