17 #include <io/OfflineROOTFile.h>
18 #include <evt/Event.h>
19 #include <evt/DefaultShowerGeometryProducer.h>
20 #include <fevt/FEvent.h>
21 #include <utl/ErrorLogger.h>
23 #include <cppunit/extensions/HelperMacros.h>
34 CPPUNIT_TEST(testWriteEvent);
35 CPPUNIT_TEST(testReadBack);
36 CPPUNIT_TEST(testReadConfig);
37 CPPUNIT_TEST(testEventTriggerValues);
38 CPPUNIT_TEST(testHeaderValues);
39 CPPUNIT_TEST(testPMTValues);
40 CPPUNIT_TEST(testPMTSimDataValues);
41 CPPUNIT_TEST(testPMTRecDataValues);
42 CPPUNIT_TEST(testPMTCalibDataValues);
43 CPPUNIT_TEST(testStationValues);
44 CPPUNIT_TEST(testStationSimDataValues);
45 CPPUNIT_TEST(testStationRecDataValues);
46 CPPUNIT_TEST(testStationCalibDataValues);
47 CPPUNIT_TEST(testStationGPSDataValues);
48 CPPUNIT_TEST_SUITE_END();
62 fTestFEventImpl->setUp(fEvent);
63 fTestSEventImpl->setUp(fEvent);
64 fTestShowerImpl->setUp(fEvent);
66 fTestFEventImpl->setAll(fEvent.GetFEvent());
67 fTestSEventImpl->setAll(fEvent.GetSEvent());
68 fTestShowerImpl->SetShowerRecDataValues(fEvent.GetRecShower());
70 fTestShowerImpl->SetShowerSimDataValues(fEvent.GetSimShower());
76 fTestFEventImpl->tearDown();
77 fTestSEventImpl->tearDown();
78 fTestShowerImpl->tearDown();
80 delete fTestSEventImpl;
82 delete fTestFEventImpl;
84 delete fTestShowerImpl;
101 another_file.
Read(event);
102 fTestSEventImpl->checkHeaderValues(event.
GetSEvent());
103 another_file.
Close();
111 another_file.
Read(event);
112 fTestSEventImpl->checkEventTriggerValues(event.
GetSEvent());
113 another_file.
Close();
121 another_file.
Read(event);
122 fTestSEventImpl->checkStationTriggerValues(event.
GetSEvent());
123 another_file.
Close();
131 another_file.
Read(event);
132 fTestSEventImpl->checkPMTValues(event.
GetSEvent());
133 another_file.
Close();
141 another_file.
Read(event);
142 fTestSEventImpl->checkPMTSimDataValues(event.
GetSEvent());
143 another_file.
Close();
151 another_file.
Read(event);
152 fTestSEventImpl->checkPMTRecDataValues(event.
GetSEvent());
153 another_file.
Close();
161 another_file.
Read(event);
162 fTestSEventImpl->checkPMTCalibDataValues(event.
GetSEvent());
163 another_file.
Close();
171 another_file.
Read(event);
172 fTestSEventImpl->checkStationValues(event.
GetSEvent());
173 another_file.
Close();
181 another_file.
Read(event);
182 fTestSEventImpl->checkStationSimDataValues(event.
GetSEvent());
183 another_file.
Close();
191 another_file.
Read(event);
192 fTestSEventImpl->checkStationRecDataValues(event.
GetSEvent());
193 another_file.
Close();
201 another_file.
Read(event);
202 fTestSEventImpl->checkStationCalibDataValues(event.
GetSEvent());
203 another_file.
Close();
211 another_file.
Read(event);
212 fTestSEventImpl->checkStationGPSDataValues(event.
GetSEvent());
213 another_file.
Close();
221 cout <<
" ======================= testReadBack " <<
event.
HasSimShower() << endl;
222 another_file.
Read(event);
224 cout <<
" ======================= " <<
event.HasSimShower() << endl;
226 fTestFEventImpl->checkAll(event.
GetFEvent());
227 fTestShowerImpl->CheckShowerSimDataValues(event.
GetSimShower(), 0);
228 fTestShowerImpl->CheckShowerRecDataValues(event.
GetRecShower());
230 another_file.
Close();
std::string GetConfig()
Return a string with the configuration corresponding to the run.
ROOT streamer for top level offline format.
void testPMTSimDataValues()
Open file for write, fail if exists.
ShowerRecData & GetRecShower()
bool HasSimShower() const
void testStationTriggerValues()
void testStationCalibDataValues()
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
void testStationGPSDataValues()
ShowerSimData & GetSimShower()
void Write(const evt::Event &event) override
Top of Fluorescence Detector event hierarchy.
fevt::FEvent & GetFEvent()
void testPMTCalibDataValues()
testShowerImpl * fTestShowerImpl
testFEventImpl * fTestFEventImpl
void testStationSimDataValues()
void testEventTriggerValues()
void testStationRecDataValues()
testSEventImpl * fTestSEventImpl
sevt::SEvent & GetSEvent()
void testPMTRecDataValues()
Status Read(evt::Event &event) override
Returns -1 if End Of File.