Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion test/form/data_products/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ add_library(
${FORM_DATA_PROD_LIB_NAME} SHARED track_start.cpp
) # REFLEX_GENERATE_DICTIONARY doesn't work trivially without making a shared
# library
target_link_libraries(${FORM_DATA_PROD_LIB_NAME})
target_link_libraries(${FORM_DATA_PROD_LIB_NAME} ROOT::RIO)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering whether the ROOT::RIO addition could be hidden behind a if(FORM_USE_ROOT_STORAGE)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, Peter. Just merged this PR. I made the assumption that form_test_data_products corresponded to the dictionary library. I think I can do what you suggest...I'll create another PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's hidden in the next level up here:

if(FORM_USE_ROOT_STORAGE)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even if I'm right, we might still want finer-grained control of when FORM uses ROOT. Right now, I think our tests rely on having a ROOT back end.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, here's a fix that at least keeps the library with track_start from depending explicitly on ROOT unless there's a need. I understand that this code will unconditionally execute when FORM_USE_ROOT_STORAGE is true, but maybe that PR makes refactoring easier later on?


if(FORM_USE_ROOT_STORAGE)
find_package(ROOT REQUIRED COMPONENTS Core RIO)
Expand Down
4 changes: 2 additions & 2 deletions test/form/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ int main(int /* argc*/, char** /* argv[]*/)
// Processing per sub-event
std::vector<float> const* track_start_x = nullptr;
char seg_id_text[64];
sprintf(seg_id_text, seg_id, nevent, nseg);
snprintf(seg_id_text, 64, seg_id, nevent, nseg);
std::string const creator = "Toy_Tracker";
mock_phlex::product_base pb = {
"trackStart", seg_id_text, track_start_x, std::type_index{typeid(std::vector<float>)}};
Expand Down Expand Up @@ -87,7 +87,7 @@ int main(int /* argc*/, char** /* argv[]*/)
std::cout << "PHLEX: Read Event segments done " << nevent << std::endl;

char evt_id_text[64];
sprintf(evt_id_text, evt_id, nevent);
snprintf(evt_id_text, 64, evt_id, nevent);
std::string const creator = "Toy_Tracker_Event";
mock_phlex::product_base pb = {
"trackStartX", evt_id_text, track_x, std::type_index{typeid(std::vector<float>)}};
Expand Down
4 changes: 2 additions & 2 deletions test/form/writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ int main(int /*argc*/, char** /* argv[]*/)
// done, phlex call write(mock_phlex::product_base)
// sub-event writing called by phlex
char seg_id_text[64];
sprintf(seg_id_text, seg_id, nevent, nseg);
snprintf(seg_id_text, 64, seg_id, nevent, nseg);
std::vector<mock_phlex::product_base> batch;
std::string const creator = "Toy_Tracker";
mock_phlex::product_base pb = {
Expand Down Expand Up @@ -122,7 +122,7 @@ int main(int /*argc*/, char** /* argv[]*/)

// event writing, current framework, will also write references
char evt_id_text[64];
sprintf(evt_id_text, evt_id, nevent);
snprintf(evt_id_text, 64, evt_id, nevent);
std::string const creator = "Toy_Tracker_Event";
mock_phlex::product_base pb = {
"trackStartX", evt_id_text, &track_x, std::type_index{typeid(std::vector<float>)}};
Expand Down
Loading