StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ttmtest.C
1 // example macro to use test various components of TTM
2 // Author: Piotr A. Zolnierczuk, IUCF
3 // Date: 05/04/2004
4 //
5 class Assert;
6 class EEmcTower;
7 
8 
9 // Test EEmcTower
10 void Test_EEmcTower()
11 {
12  EEmcTower t1("9TA03", 22.2,0.111);
13  EEmcTower t2 = t1;
14  EEmcTower t3("12TC11");
15  t2.ADC(33.3);
16  t2.dE (0.222);
17 
18  Assert::IsEqual("09TA03", t1.TowerLabel() );
19  Assert::IsEqual(22.2 , t1.ADC() );
20  Assert::IsEqual(0.111 , t1.dE() );
21  Assert::IsEqual(9 , t1.SecLabel() );
22  Assert::IsEqual('A' , t1.SubSecLabel());
23  Assert::IsEqual(3 , t1.EtaLabel() );
24 
25  Assert::IsEqual("09TA03",t2.TowerLabel());
26  Assert::IsEqual(33.3 ,t2.ADC());
27  Assert::IsEqual(0.222 ,t2.dE());
28 
29  Assert::IsTrue (t2==t1);
30  Assert::IsFalse(t2!=t1);
31 
32  Assert::IsTrue (t3!=t1);
33  Assert::IsFalse(t3==t1);
34 
35  t1.Out(cerr);
36  t2.Out(cerr);
37 
38  cerr << " ====> Test_EEmcTower passed" << endl;
39 }
40 
41 
42 void
43 ttmtest()
44 {
45  gROOT->LoadMacro("$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
46  loadSharedLibraries();
47 
48  gROOT->LoadMacro("macros/tdd.C");
49  gSystem->Load("StEEmcUtil");
50  gSystem->Load("StEEmcDbMaker");
51  gSystem->Load("StEEmcPoolTTM");
52 
53  Test_EEmcTower();
54 }
55 
56 
57 
58 
59 
float ADC() const
gets adc value associated with the tower (pedestal adjusted)
Definition: EEmcTower.h:47
const char * TowerLabel() const
returns tower label, e.g. &quot;05TB09&quot;
Definition: EEmcTower.cxx:77
float dE() const
gets calibrated energy loss value associated with the tower
Definition: EEmcTower.h:52
Definition: tdd.C:4
ostream & Out(ostream &out) const
print tower hit info in xml-like style
Definition: EEmcTower.cxx:87
EEmcTower holds information about an EEMC tower &#39;hit&#39;.
Definition: EEmcTower.h:17