testCDASEventFile.cc
Go to the documentation of this file.
1 
9 #include <io/CDASEventFile.h>
10 #include <io/IoCodes.h>
11 #include <evt/Event.h>
12 #include <utl/AugerUnits.h>
13 #include <fwk/CentralConfig.h>
14 #include <det/Detector.h>
15 
16 #include <utl/Test.h>
17 #include <cppunit/extensions/HelperMacros.h>
18 
19 #include <iostream>
20 
21 using io::CDASEventFile;
22 using namespace fwk;
23 using namespace utl;
24 
25 class testCDASEventFile : public CppUnit::TestFixture {
26 
27  CPPUNIT_TEST_SUITE(testCDASEventFile);
28  CPPUNIT_TEST(testEventRead);
29  CPPUNIT_TEST_SUITE_END();
30 
31 public:
32  // shared data for tests
33 
36 
37  void setUp() {
38 
39  f = new CDASEventFile();
40  event = evt::Event();
41 
42  }
43 
44  void tearDown() {
45 
46  delete f;
47 
48  }
49 
50  void testEventRead() {
51 
52  CentralConfig::GetInstance(BOOTSTRAPFILE);
53  f->Open(TESTFILE);
54 
55  for (int i = 0; i < f->GetNEvents(); i++) {
56 
57  event = evt::Event();
58  f->Read(event);
59 
60  }
61 
62  }
63 
64 };
65 
67 
68 // Configure (x)emacs for this file ...
69 // Local Variables:
70 // mode:c++
71 // compile-command: "make -C .. -k testCDAS && (cd ..; testCDAS)"
72 // End:
73 
CPPUNIT_TEST_SUITE_REGISTRATION(testAiresShowerFile)
CDASEventFile * f
static CentralConfig * GetInstance()
Use this the first time you get an instance of central configuration.
Interface for CDAS file reading.
Definition: CDASEventFile.h:19

, generated on Tue Sep 26 2023.