Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
748b9fc
Adds parallel standalone build which is dependent on the TCling versi…
Nov 7, 2022
62e7535
fix readme md typo
Nov 7, 2022
71a2e92
Fix include dir for when this project is included in others.
Nov 14, 2022
8203ac0
Actually fix paths. Increase verbosity when generating proxies.
Nov 14, 2022
b75f510
Add duneanaobj interface target, fix some header installations
Nov 17, 2022
80b17a9
Fixes usage of some imported SRProxy targets and updates target branch
Nov 30, 2022
34ecaa6
Flat Reader is now built for STANDALONE_BUILD=ON
Dec 1, 2022
5de609e
Fixes some CMake target linking and exporting
Dec 1, 2022
ec34fbf
Improved installed config, adds some test apps
Dec 2, 2022
edbaa59
adds the standardrecord implementation template
Dec 2, 2022
cce7f0e
Rebases clingification changes on to Oct23 master HEAD of duneanaobj
Oct 31, 2023
9c5df3d
tidy duneanaobj object version and shorthash cmake variable names
Oct 22, 2024
964fbff
Properly exports targets again
Oct 22, 2024
17b0818
fix some include directories for fetchcontent inclusion
Oct 22, 2024
8492ad8
fixes wrong dependency in flat
Oct 22, 2024
4f1b5d4
just explicitly instantiate Proxy<StandardRecord>
Oct 23, 2024
7f9fff1
remove unneccessary epilog now that SR proxy properly instantiates en…
Oct 23, 2024
b67749c
improve target include directories
Oct 25, 2024
1f74f5e
install the StandardRecord headers...
Oct 25, 2024
5b7db8f
adds optional proxy python binding generation
Oct 29, 2025
94173f6
small tweaks to include dirs and python binding generation build system
Nov 3, 2025
f770ed0
fix typo in duneanaobjConfig.CMake, add missed newer SR files to buil…
Nov 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
BasedOnStyle: LLVM
---
Language: Cpp
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*~
build
100 changes: 50 additions & 50 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
# ======================================================================
# larsoft main build file
#
# cd .../path/to/build/directory
# source .../path/to/larsoft/ups/setup_for_development <-d|-p>
# cmake [-DCMAKE_INSTALL_PREFIX=/install/path]
# -DCMAKE_BUILD_TYPE=$CETPKG_TYPE
# $CETPKG_SOURCE
# make
# make test
# make install
# make package (builds distribution tarfile)
# ======================================================================


cmake_minimum_required (VERSION 3.20 FATAL_ERROR)
# cmake_policy(VERSION 3.18)

find_package(cetmodules REQUIRED)
project(duneanaobj LANGUAGES CXX)
set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 03.11.00)

message(STATUS "\n\n ========================== ${PROJECT_NAME} ==========================")

if(DEFINED ENV{UPS_DIR})
# cetbuildtools contains our cmake modules

include(CetCMakeEnv)
cet_cmake_env()

set_install_root()
project(duneanaobj VERSION 4.0.0 LANGUAGES CXX)

# The specification of the C++ standard is required because CET macros
# set it to C++98 by default, and then override it depending on the
# compiler version, as determined by the compiler qualifier.
# Removing that qualifier, we need to supply that information manually,
# and maintain it too.
cet_set_compiler_flags(DIAGS CAUTIOUS
WERROR
NO_UNDEFINED
ALLOW_DEPRECATIONS
EXTRA_FLAGS -pedantic -Wno-unused-local-typedefs -Wno-undefined-var-template -I $ENV{CLANG_FQ_DIR}/include/c++/v1
)
string(REPLACE "." ";" VERSION_LIST ${PROJECT_VERSION})
list(GET VERSION_LIST 0 duneanaobj_VERSION_MAJOR)
list(GET VERSION_LIST 1 duneanaobj_VERSION_MINOR)
list(GET VERSION_LIST 2 duneanaobj_VERSION_PATCH)

cet_report_compiler_flags()
LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake/Modules)

# these are minimum required versions, not the actual product versions
find_package(ROOT 6.00.00 REQUIRED)
option(duneanaobj_PYTHON_ENABLED "Whether to build python bindings to proxy classes." OFF)

include(BuildDictionary)
include(CPM)

# packaging utility
SET(SRProxy_MIN_VERSION 0.46.0)

CPMFindPackage(
NAME SRProxy
GIT_TAG feature/Clingification_rebase3
GITHUB_REPOSITORY luketpickering/SRProxy
VERSION ${SRProxy_MIN_VERSION}
)

else()
find_package(ROOT)
include_directories(.)
endif()
find_package(ROOT 6.20 REQUIRED)

add_subdirectory(duneanaobj)

cet_cmake_config()
add_library(duneanaobj_all INTERFACE)
set_target_properties(duneanaobj_all PROPERTIES EXPORT_NAME all)

target_link_libraries(duneanaobj_all INTERFACE
duneanaobj::StandardRecordProxy
duneanaobj::StandardRecordFlat
duneanaobj::StandardRecord)

install(TARGETS duneanaobj_all EXPORT duneanaobj_targets)

add_library(duneanaobj::all ALIAS duneanaobj_all)

add_subdirectory(app)

include(CMakePackageConfigHelpers)
write_basic_package_version_file(
"${PROJECT_BINARY_DIR}/duneanaobjConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
COMPATIBILITY AnyNewerVersion
)
configure_package_config_file(
"${CMAKE_CURRENT_LIST_DIR}/cmake/Templates/duneanaobjConfig.cmake.in"
"${PROJECT_BINARY_DIR}/duneanaobjConfig.cmake"
INSTALL_DESTINATION this/is/ignored
NO_SET_AND_CHECK_MACRO
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)

install(EXPORT duneanaobj_targets
NAMESPACE duneanaobj::
DESTINATION lib/cmake/duneanaobj)
install(FILES "${PROJECT_BINARY_DIR}/duneanaobjConfigVersion.cmake"
"${PROJECT_BINARY_DIR}/duneanaobjConfig.cmake"
DESTINATION lib/cmake/duneanaobj)
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,12 @@ CONDITIONS OF ANY KIND, either express or implied. See the License for
the specific language governing permissions and limitations under the
License.

# Build outside of FNAL Stack like

```
mkdir build; cd build
cmake .. -DSTANDALONE_BUILD=ON -DCMAKE_INSTALL_PREFIX=/path/to/install/dir
make install
```

This will build and install the standard record dictionary and SRProxy class. Flat class on the way.
5 changes: 5 additions & 0 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_executable(duneanaobj_dumpevent duneanaobj_dumpevent.cxx)
target_link_libraries(duneanaobj_dumpevent duneanaobj::all ROOT::Tree ROOT::RIO)

install(TARGETS duneanaobj_dumpevent
DESTINATION bin)
38 changes: 38 additions & 0 deletions app/duneanaobj_dumpevent.cxx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#include "duneanaobj/StandardRecord/Proxy/SRProxy.h"

#include "TFile.h"
#include "TTree.h"

#include <iostream>

using namespace caf;

int main(int argc, char const *argv[]) {

TFile fin(argv[1], "READ");

TTree *tin = fin.Get<TTree>("caf");

StandardRecordProxy srp(tin, "StandardRecord");

Long64_t ents = tin->GetEntries();
std::cout << "Input tree has " << ents << " entries." << std::endl;

for (Long64_t i = 0; i < ents; ++i) {
tin->GetEntry(i);

std::cout << "Entry: " << i << std::endl;

std::cout << "\tsrp.duneanaobj_gitshorthash: "
<< srp.duneanaobj_gitshorthash.GetValue() << std::endl;
std::cout << "\tsrp.duneanaobj_version: " << srp.duneanaobj_version[0]
<< ", " << srp.duneanaobj_version[1] << ", "
<< srp.duneanaobj_version[2] << std::endl;

std::cout << "\tsrp.nd.lar.ndlp: " << srp.nd.lar.ndlp.GetValue() << std::endl;
std::cout << "\tsrp.nd.lar.npandora: " << srp.nd.lar.npandora.GetValue()
<< std::endl;

std::cout << "\tsrp.nd.tms.nixn: " << srp.nd.tms.nixn.GetValue() << std::endl;
}
}
Loading