2 #include <StjBEMCTree.h>
3 #include "StjBEMCTreeTest.hh"
5 #include <StjTowerEnergyListReader.h>
17 void StjBEMCTreeTest::setUp()
22 void StjBEMCTreeTest::tearDown()
28 void StjBEMCTreeTest::testGetEntry()
30 TFile* file =
new TFile(
"./part_run6143024.root");
32 TTree *tree =
dynamic_cast<TTree*
>(file->Get(
"bemcTowers"));
36 tree->BuildIndex(
"runNumber",
"eventId");
42 reader->GetEntryWithIndex(6143024, 38);
43 StjTowerEnergyList energyList = bemc->getEnergyList();
44 CPPUNIT_ASSERT_EQUAL( (
size_t)65, energyList.size() );
46 reader->GetEntryWithIndex(6143024, 41);
47 energyList = bemc->getEnergyList();
48 CPPUNIT_ASSERT_EQUAL( (
size_t)0, energyList.size() );