Skip to content

Introduced 2d arrays in Variant#5132

Merged
ktf merged 5 commits into
AliceO2Group:devfrom
aalkin:matrix-variant
Jan 11, 2021
Merged

Introduced 2d arrays in Variant#5132
ktf merged 5 commits into
AliceO2Group:devfrom
aalkin:matrix-variant

Conversation

@aalkin
Copy link
Copy Markdown
Member

@aalkin aalkin commented Jan 7, 2021

  • added matrix struct
  • added parsers for matrix into/from boost ptree and string representation
  • extended Variant to use matrix<int/float/double>
  • added matrix data memmbers handling for serialization
  • updated configurableObjects.cxx example

* added matrix<T> struct
* added parsers for matrix into/from boost ptree and string representation
* extended Variant to use matrix<int/float/double>
* added matrix data memmbers handling for serialization
* updated configurableObjects.cxx example
@aalkin aalkin requested review from a team, iarsene and jgrosseo as code owners January 7, 2021 11:11
@ktf
Copy link
Copy Markdown
Member

ktf commented Jan 7, 2021

I would prefer a name like Array2D, rather than Matrix. Any particular reason for your choice?

@aalkin
Copy link
Copy Markdown
Member Author

aalkin commented Jan 7, 2021

I would prefer a name like Array2D, rather than Matrix. Any particular reason for your choice?

No reason, just the first name that came to mind. I'll rename to Array2D when the tests finish.

ktf
ktf previously approved these changes Jan 8, 2021
} else if constexpr (is_base_of_template<std::vector, T>::value) {
return extractVector<typename T::value_type>(mStore->store().get_child(key));
} else if constexpr (is_base_of_template<o2::framework::Array2D, T>::value) {
return extractMatrix<typename T::element_t>(mStore->store().get_child(key));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should probably be extractArray2D, fine for now.

Comment on lines +123 to +125
V == VariantType::MatrixInt ||
V == VariantType::MatrixFloat ||
V == VariantType::MatrixDouble) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should probably be Array2DInt, etc.

@ktf ktf merged commit 9de7c30 into AliceO2Group:dev Jan 11, 2021
@ktf
Copy link
Copy Markdown
Member

ktf commented Jan 11, 2021

Merging this, however please make sure you consistently use Array2D everywhere.

EmilGorm pushed a commit to EmilGorm/AliceO2 that referenced this pull request Nov 22, 2021
@aalkin aalkin deleted the matrix-variant branch May 30, 2022 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants