Skip to content

Commit

Permalink
Combine detectors into single library (#237)
Browse files Browse the repository at this point in the history
* Make AtPxCT build again

* Allow targets to have many ROOT dictionaries

* Combine detectors into single library

This should help control the many root-level folders.

Adjusted the root dictionary generation to allow for multiple
dictionaries to be added to any target (library). This can speed up
build times for larger libraries if the dictionaries are split up
logically. The dictionaries are each defined by their own linkdefs.
See `AtDetectors` for an example.

* Combine AtField and AtPassive into AtDetectors

AtField and AtPassive are not used by anything else
in the compiled code base. They are loaded by ROOT
to run simulations at the same time as the detectors.

---------

Co-authored-by: anthoak13 <[email protected]>
  • Loading branch information
anthoak13 and anthoak13 committed Jun 20, 2024
1 parent f81a30a commit 3605006
Show file tree
Hide file tree
Showing 92 changed files with 124 additions and 285 deletions.
34 changes: 0 additions & 34 deletions AtApollo/CMakeLists.txt

This file was deleted.

35 changes: 0 additions & 35 deletions AtDeGAi/CMakeLists.txt

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions AtDetectors/AtTpc/AtTpcLinkDef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class AtTpc;
#pragma link C++ class AtTpcContFact;
#pragma link C++ class AtTpcGeo;
#pragma link C++ class AtTpcGeoPar;
#pragma link C++ class AtTpcPoint;

#endif
68 changes: 68 additions & 0 deletions AtDetectors/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
Set(LIBRARY_NAME AtDetectors)
Set(LINKDEF
AtTpc/AtTpcLinkDef.h
AtPxCT/AtPxCTLinkDef.h
AtSiArray/AtSiArrayLinkDef.h
AtSeGA/AtSeGALinkDef.h
AtDeGAi/AtDeGAiLinkDef.h
AtApollo/AtApolloLinkDef.h
AtField/AtFieldLinkDef.h
AtPassive/AtPassiveLinkDef.h
)

set(SRCS
#Put here your sourcefiles
AtTpc/AtTpc.cxx
AtTpc/AtTpcContFact.cxx
AtTpc/AtTpcGeo.cxx
AtTpc/AtTpcGeoPar.cxx

AtPxCT/AtPxCT.cxx
AtPxCT/AtPxCTContFact.cxx
AtPxCT/AtPxCTCrystalCalData.cxx
AtPxCT/AtPxCTDigitizer.cxx

AtSiArray/AtSiArrayContFact.cxx
AtSiArray/AtSiArrayGeo.cxx
AtSiArray/AtSiArrayGeoPar.cxx
AtSiArray/AtSiArray.cxx
AtSiArray/AtSiPoint.cxx

AtSeGA/AtSeGA.cxx
AtSeGA/AtSeGAContFact.cxx
AtSeGA/AtSeGACrystalCalData.cxx
AtSeGA/AtSeGADigitizer.cxx

AtDeGAi/AtDeGAi.cxx
AtDeGAi/AtDeGAiContFact.cxx
AtDeGAi/AtDeGAiCrystalCalData.cxx
AtDeGAi/AtDeGAiDigitizer.cxx

AtApollo/AtApollo.cxx
AtApollo/AtApolloContFact.cxx
AtApollo/AtApolloPoint.cxx
AtApollo/AtApolloCrystalCalData.cxx
AtApollo/AtApolloDigitizer.cxx

AtField/AtConstField.cxx
AtField/AtFieldCreator.cxx
AtField/AtFieldPar.cxx

AtPassive/AtCave.cxx
AtPassive/AtPipe.cxx
AtPassive/AtGeoCave.cxx
AtPassive/AtMagnet.cxx
AtPassive/AtPassiveContFact.cxx
)

Set(DEPENDENCIES
FairRoot::Base
ROOT::Core
ATTPCROOT::AtSimulationData
)

generate_target_and_root_library(${LIBRARY_NAME}
LINKDEF ${LINKDEF}
SRCS ${SRCS}
DEPS_PUBLIC ${DEPENDENCIES}
)
26 changes: 0 additions & 26 deletions AtField/CMakeLists.txt

This file was deleted.

29 changes: 0 additions & 29 deletions AtPassive/CMakeLists.txt

This file was deleted.

35 changes: 0 additions & 35 deletions AtPxCT/CMakeLists.txt

This file was deleted.

35 changes: 0 additions & 35 deletions AtSeGA/CMakeLists.txt

This file was deleted.

23 changes: 0 additions & 23 deletions AtSiArray/CMakeLists.txt

This file was deleted.

1 change: 1 addition & 0 deletions AtSimulationData/AtDetectorList.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ enum DetectorId {
kAtApollo,
kAtSeGA,
kAtDeGAi,
kAtPxCT,
kSTOPHERE,
};

Expand Down
19 changes: 0 additions & 19 deletions AtTpc/AtTpcLinkDef.h

This file was deleted.

35 changes: 0 additions & 35 deletions AtTpc/CMakeLists.txt

This file was deleted.

9 changes: 2 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,23 +156,18 @@ add_subdirectory (AtSimulationData)
add_subdirectory (AtData)
add_subdirectory (AtUnpack)
add_subdirectory (AtGenerators)
add_subdirectory (AtTpc)
add_subdirectory (AtSiArray)
add_subdirectory (AtDetectors)

add_subdirectory (AtPassive)
add_subdirectory (AtField)
add_subdirectory (AtMap)
add_subdirectory (AtReconstruction)
add_subdirectory (AtParameter)
add_subdirectory (AtDigitization)
add_subdirectory (AtS800)
add_subdirectory (AtApollo)
add_subdirectory (AtSeGA)
add_subdirectory (AtDeGAi)
add_subdirectory (AtAnalysis)
add_subdirectory (AtTools)
add_subdirectory (AtEventDisplay)


if(BUILD_TESTS)
include(ATTPCRootCTest)
endif(BUILD_TESTS)
Expand Down
Loading

0 comments on commit 3605006

Please sign in to comment.