StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StBET4pMakerTest.C
1 // Copyright (C) 2008 Tai Sakuma <sakuma@bnl.gov>
2 #include <StBET4pMaker.h>
3 #include "StBET4pMakerTest.hh"
4 
5 using namespace std;
6 
7 // Registers the fixture into the 'registry'
8 CPPUNIT_TEST_SUITE_REGISTRATION( StBET4pMakerTest );
9 
10 void StBET4pMakerTest::setUp()
11 {
12 
13 }
14 
15 void StBET4pMakerTest::tearDown()
16 {
17 
18 }
19 
20 void StBET4pMakerTest::testMacroInterface_Construct_mudst_swap()
21 {
22  StBET4pMaker* maker = new StBET4pMaker("BET4pMaker", (StMuDstMaker*)0, true);
23  delete maker;
24 }
25 
26 void StBET4pMakerTest::testMacroInterface_Construct_mudst()
27 {
28  StBET4pMaker* maker = new StBET4pMaker("BET4pMaker", (StMuDstMaker*)0);
29  delete maker;
30 }
31 
32 void StBET4pMakerTest::testMacroInterface()
33 {
34  StBET4pMaker* maker = new StBET4pMaker("BET4pMaker", 0, true);
35  maker->setUseTPC(true);
36  maker->setUseBEMC(true);
37  maker->setUseEndcap(false);
38  maker->setUse2003Cuts(true);
39  maker->setUse2005Cuts(false);
40  maker->setUse2006Cuts(false);
41  maker->setUseBEMCEnergySum();
42 
43  delete maker;
44 }
45 
46 
47 void StBET4pMakerTest::testInit()
48 {
49  StBET4pMaker* bet4pmaker = new StBET4pMaker("BET4pMaker", 0, true);
50 
51  CPPUNIT_ASSERT_EQUAL((StBET4pMakerImp*)0, bet4pmaker->GetImp() );
52  bet4pmaker->Init();
53 
54  StBET4pMakerImp* imp = bet4pmaker->GetImp();
55  CPPUNIT_ASSERT( bet4pmaker->GetImp() );
56 
57  delete bet4pmaker;
58 }