00001 #ifndef EVENT_LOOP__UNIT_TEST_FIXTURE_H
00002 #define EVENT_LOOP__UNIT_TEST_FIXTURE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #include <EventLoop/Global.h>
00015
00016 class TH1;
00017
00018 #include <EventLoop/Job.h>
00019 #include <gtest/gtest.h>
00020 #include <map>
00021 #include <memory>
00022
00023 namespace EL
00024 {
00025 class UnitTestFixture : public ::testing::TestWithParam<UnitTestConfig>
00026 {
00027 public:
00028 std::string getJob ();
00029
00030 SH::SamplePtr getSample (const std::string& sameName);
00031
00032 SH::SampleHandler getSH ();
00033
00034 unsigned eventCount (const std::string& sampleName);
00035
00036 TObject *getTObject (const std::string& sampleName,
00037 const std::string& objectName,
00038 bool isMandatory);
00039
00040 template<typename T>
00041 T *getHist (const std::string& sampleName,
00042 const std::string& objectName,
00043 bool isMandatory);
00044
00045 TH1 *getCallbacks (const std::string& sampleName);
00046
00047 void checkFileExecuted (const std::string& sampleName);
00048
00049 private:
00050 static std::map<std::shared_ptr<Driver>,std::string> m_jobs;
00051
00052 private:
00053 std::string makeFile (const std::vector<unsigned>& entries);
00054 };
00055 }
00056
00057 #include "UnitTestFixture.ihh"
00058
00059 #endif