Test sct sensor sd
In the branch, I tested two classes, which are SctSensorSD and SctSensor_CTB. And they are all in the package InnerDetector/InDetG4/SCT_G4_SD. Here is how I did.
- I put my test codes in the
testfolder. And they areSctSensorSD_gtest.cxxandSctSensor_CTB_gtest.cxxfor respectively testing the classesSctSensorSDandSctSensor_CTB. - I created the jobOption file
optionForTest.txt, which is placed in the share folder. - In oder to add my test classes as friends of the tested classes, I add several lines for that.
- Of course, I add some lines in the CMakeLists.txt for compiling my test code, using google test frame work, and so on.
- I create 3 files and put them into the folder
Simulation/G4Atlas/G4AtlasTools/G4AtlasTools. The 1st file isDerivedG4SensitiveDetectorTestSetting.h, where I define a function for setting G4-objects to G4Step object. The 2nd file isG4MyPhysicalVolume.h, where I define a class calledG4MyPhysicalVolumethat is derived fromG4VPhysicalVolume. The 3rd file isG4MyProcess.h, where I define a class calledG4MyProcessthat is derived fromG4VProcess. - It is worth mentioning that I use different TEST_F to test different member functions of the tested class.
Edited by Liangliang Han