3 #include <StjTreeEntryCoordinator.h>
5 #include <StjTreeIndex.h>
6 #include <StjTreeIndexList.h>
7 #include <StjTreeIndexListCreator.h>
9 #include <StjBEMCTree.h>
10 #include <StjTPCTree.h>
12 #include <StjTrackListReader.h>
13 #include <StjTowerEnergyListReader.h>
21 #include "StjTreeEntryCoordinatorTest.hh"
28 void StjTreeEntryCoordinatorTest::setUp()
33 void StjTreeEntryCoordinatorTest::tearDown()
38 void StjTreeEntryCoordinatorTest::testTree()
40 TFile* testDir =
new TFile(
"./part_run6143024.root");
42 idxCreator.AddTrgTreeName(
"trgBHT2");
43 idxCreator.AddTrgTreeName(
"trgBJP2");
44 StjTreeIndexList idxList = idxCreator.create();
48 TTree *tpctree =
dynamic_cast<TTree*
>(testDir->Get(
"tpcTracks"));
51 coord->AddReader(tpcreader);
53 TTree *bemctree =
dynamic_cast<TTree*
>(testDir->Get(
"bemcTowers"));
56 coord->AddReader(bemcreader);
61 while(!coord->eof()) {
63 StjTrackList trackList = tpc->getTrackList();
64 StjTowerEnergyList energyList = bemc->getEnergyList();
70 void StjTreeEntryCoordinatorTest::testEmpty()
72 StjTreeIndexList idxList;
77 CPPUNIT_ASSERT( coord->eof() );
80 void StjTreeEntryCoordinatorTest::testOne()
82 StjTreeIndexList idxList;
89 CPPUNIT_ASSERT( ! coord->eof() );
93 CPPUNIT_ASSERT( coord->eof() );
96 void StjTreeEntryCoordinatorTest::testTwo()
98 StjTreeIndexList idxList;
106 CPPUNIT_ASSERT( ! coord->eof() );
110 CPPUNIT_ASSERT( ! coord->eof() );
114 CPPUNIT_ASSERT( coord->eof() );