Root detector: Difference between revisions

From LWP-Wiki
Jump to navigation Jump to search
(Created page with "Category:software-faq == Adding a detector to R3Broot == As an example of modifications you might want to make, we will discuss how to add your own detector to R3Broot her...")
 
No edit summary
Line 1: Line 1:
[[Category:software-faq]]
[[Category:software-faq]]
== Adding a detector to R3Broot ==
== Adding a detector to R3Broot ==
As an example of modifications you might want to make, we will discuss how to add your own detector to R3Broot here. We assume you already have the required classes written. We assume the name of the detector is STUPID.
As an example of modifications you might want to make, we will discuss how to add your own detector to R3Broot here. We assume you have already written the required source and header files (C++ classes) yourself. We assume the name of the detector is STUPID.


First create the directory '''/home/p123456/fair_install/r3broot/STUPID/''', which will contain all your source and header files about the STUPID-detector.<br/>
First create the directory '''/home/p123456/fair_install/r3broot/STUPID/''', which will contain all your source and header files about the STUPID-detector.<br/>
Line 14: Line 14:
Add the detector to the file '''/home/p123456/fair_install/r3broot/r3bdata/R3BMCTrack.cxx''' under '''Public Method Print''', '''Public Method GetPoint''' and '''Public Method SetPoint'''.  
Add the detector to the file '''/home/p123456/fair_install/r3broot/r3bdata/R3BMCTrack.cxx''' under '''Public Method Print''', '''Public Method GetPoint''' and '''Public Method SetPoint'''.  


Make sure you use a number that is not used by the other detectors and make sure you use the same number everywhere. If your source-files and header-files in the directories '''/home/p123456/fair_install/r3broot/STUPID/''' and '''/home/p123456/fair_install/r3broot/r3bdata/STUPIDData/''' are correctly written, the compilation should finish without errors and the STUPID-detector should be ready for use now.
Make sure you use a number that is not used by the other detectors and make sure you use the same number everywhere. If your source- and header-files in the directories '''/home/p123456/fair_install/r3broot/STUPID/''' and '''/home/p123456/fair_install/r3broot/r3bdata/STUPIDData/''' are correctly written, the compilation should finish without errors and the STUPID-detector should be ready for use now.

Revision as of 10:34, 23 April 2015

Adding a detector to R3Broot

As an example of modifications you might want to make, we will discuss how to add your own detector to R3Broot here. We assume you have already written the required source and header files (C++ classes) yourself. We assume the name of the detector is STUPID.

First create the directory /home/p123456/fair_install/r3broot/STUPID/, which will contain all your source and header files about the STUPID-detector.
Add this directory to the file /home/p123456/fair_install/r3broot/CMakeLists.txt.

Next create the directory /home/p123456/fair_install/r3broot/r3bdata/STUPIDData/. This will contain all the source and header-files about the data processing of the STUPID-detector.
Add all the .cxx files from the directory /home/p123456/fair_install/r3broot/r3bdata/STUPIDData/ to the list in the file /home/p123456/fair_install/r3broot/r3bdata/CMakeLists.txt.
Add the same files to the list in the file /home/p123456/fair_install/r3broot/r3bdata/R3BDataLinkDef.h, only without the .cxx extension and with a + sign attached now.

Add the detector to the file /home/p123456/fair_install/r3broot/r3bdata/R3BDetectorList.h in both places. Make sure the ordering is consistent.

Add the detector to the file /home/p123456/fair_install/r3broot/r3bdata/R3BMCTrack.cxx under Public Method Print, Public Method GetPoint and Public Method SetPoint.

Make sure you use a number that is not used by the other detectors and make sure you use the same number everywhere. If your source- and header-files in the directories /home/p123456/fair_install/r3broot/STUPID/ and /home/p123456/fair_install/r3broot/r3bdata/STUPIDData/ are correctly written, the compilation should finish without errors and the STUPID-detector should be ready for use now.