Skip to content

Test zdc strip sd

Liangliang Han requested to merge lihan/athena:testZDC_StripSD into master

In this branch, I tested two classes(ZDC_PixelSD and ZDC_StripSD) in the package ForwardDetectors/ZDC/ZDC_SD. Here is what I did about the package.

  1. My test code ZDC_PixelSD_gtest.cxx and ZDC_StripSD_gtest.cxx are put in the test folder. The former is for testing the class ZDC_PixelSD while the latter is for testing the class ZDC_StripSD.
  2. I created the jobOption file optionForTest.txt, which is placed in the share folder.
  3. In oder to add my test classes as friends of the tested classes, I add several lines for that.
  4. Of course, I add some lines in the CMakeLists.txt for compiling my test code, using google test frame work, and so on.
  5. I create 3 files and put them into the folder Simulation/G4Atlas/G4AtlasTools/G4AtlasTools. The 1st file is DerivedG4SensitiveDetectorTestSetting.h, where I define a function for setting G4-objects to G4Step object. The 2nd file is G4MyPhysicalVolume.h, where I define a class called G4MyPhysicalVolume that is derived from G4VPhysicalVolume. The 3rd file is G4MyProcess.h, where I define a class called G4MyProcess that is derived from G4VProcess.
  6. About the structure of my test code, please see attached picture. It is worth mentioning that I use different TEST_F to test different member function of the tested class.Structure_of_testcode
Edited by Liangliang Han

Merge request reports