-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure that LCIO installations are cleanly consumable with builtin…
… SIO (#184) * Add a small downstream project for testing * Build downstream project in CI * Update CMake config template to work with new sio packaging * Bump minimum required SIO version to v00-01
- Loading branch information
Showing
6 changed files
with
54 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
cmake_minimum_required(VERSION 3.14) | ||
|
||
project(DownstreamProjectUsingLCIO) | ||
|
||
find_package(LCIO REQUIRED) | ||
|
||
# Make sure that the LCIO version is set and usableas a version | ||
if (${LCIO_VERSION} VERSION_GREATER "0.0.0") | ||
message(STATUS "Found LCIO version " ${LCIO_VERSION}) | ||
else() | ||
message(FATAL_ERROR "Cannot determine LCIO_VERSION") | ||
endif() | ||
|
||
add_executable(lcio_test_program lcio_test_program.cpp) | ||
target_link_libraries(lcio_test_program PRIVATE LCIO::lcio) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "EVENT/LCEvent.h" | ||
#include "IMPL/LCCollectionVec.h" | ||
#include "IMPL/LCEventImpl.h" | ||
#include "IMPL/MCParticleImpl.h" | ||
#include "MT/LCWriter.h" | ||
|
||
int main() { | ||
auto mcp = new IMPL::MCParticleImpl(); | ||
mcp->setPDG(11); | ||
|
||
auto coll = new IMPL::LCCollectionVec(EVENT::LCIO::MCPARTICLE); | ||
coll->addElement(mcp); | ||
|
||
auto event = new IMPL::LCEventImpl(); | ||
event->addCollection(coll, "mcps"); | ||
|
||
auto writer = MT::LCWriter(); | ||
writer.open("test.slcio"); | ||
writer.writeEvent(event); | ||
|
||
return 0; | ||
} |