source: trunk/MagicSoft/Mars/macros/testenv.C@ 2792

Last change on this file since 2792 was 1902, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.1 KB
Line 
1void testenv()
2{
3 // Setup for all MHMatrix objects is done by:
4 // MHMatrix.Column0: ...
5 //
6 // This can be overwritten for a MHMatrix called MatrixGammas by:
7 // MatrixGammas.Column0;
8 //
9 // This can be overwritten for all MHMatrix in one Job by:
10 // Job1.MHMatrix.Column0;
11 //
12 // This can be overwritten for a MHMatrix called MatrixGammas in one Job by:
13 // Job1.MatrixGammas.Column0;
14 //
15 TEnv env(".marsrc");
16
17 //
18 // For developers: Set this to kTRUE to see how the TEnv file
19 // entries are checked.
20 //
21 Bool_t print = kFALSE;
22
23 // ------------ Job 1 -------------------
24 if (env.GetValue("Job1", kFALSE))
25 {
26 cout << "++++++++++++++++++ Job 1 +++++++++++++++++++" << endl;
27 MParList plist1;
28 MTaskList tlist1;
29
30 plist1.AddToList(&tlist1);
31
32 MReadMarsFile read1("Events");
33
34 MHMatrix matrix1("MatrixGammas");
35
36 MFillH fillm1(&matrix1);
37 plist1.AddToList(&matrix1);
38
39 tlist1.AddToList(&read1);
40 tlist1.AddToList(&fillm1);
41
42 MEvtLoop evtloop1("Job1");
43 evtloop1.SetParList(&plist1);
44 cout << "--------------------------------------------" << endl;
45 evtloop1.ReadEnv(env, "", print);
46 cout << "--------------------------------------------" << endl;
47 evtloop1.Eventloop();
48 cout << endl;
49 }
50
51 // ------------ Job 2 -------------------
52
53 if (env.GetValue("Job2", kTRUE))
54 {
55 cout << "++++++++++++++++++ Job 2 +++++++++++++++++++" << endl;
56 MParList plist2;
57 MTaskList tlist2;
58
59 plist2.AddToList(&tlist2);
60
61 MReadMarsFile read2("Events");
62
63 MHMatrix matrix2("MatrixGammas");
64
65 MFillH fillm2(&matrix2);
66 plist2.AddToList(&matrix2);
67
68 tlist2.AddToList(&read2);
69 tlist2.AddToList(&fillm2);
70
71 MEvtLoop evtloop2("Job2");
72 evtloop2.SetParList(&plist2);
73 cout << "--------------------------------------------" << endl;
74 evtloop2.ReadEnv(env, "", print);
75 cout << "--------------------------------------------" << endl;
76 evtloop2.Eventloop();
77 cout << endl;
78 }
79}
Note: See TracBrowser for help on using the repository browser.