Project

General

Profile

Feature #11026

Tuple product support

Added by Jim Kowalkowski over 3 years ago. Updated about 1 year ago.

Status:
Accepted
Priority:
Normal
Assignee:
-
Category:
Infrastructure
Target version:
Start date:
11/30/2015
Due date:
% Done:

0%

Estimated time:
Scope:
Internal
Experiment:
-
SSI Package:
Duration:

Description

I would like to see the tuple product support that Jesse demonstrated over the summer available in an art release. The initial work is available in artextensions on branch feature/pymod, in directory artextensions/PyMod. The interface is defined here. One of the primary goals for this product is to support seamless integration with art modules written in Python (there will be other related issues for this).
This general Ntuple product has can he thought of as an "struct of arrays" products, with efficient storage and access by column, and support for row access (rows returned as std::tuple objects).
Permitting the general access in Python requires use of Event view support and an "ntuple" base class.

A few notes of things to keep in mind here:

  1. ROOT 5.x could not support such a structured product directly.
  2. C++11 variadic templates can support such a structure. This has been demonstrated. It is unclear whether the user experience will be good enough i.e. the instantiated class might be do horrible to deal with.
  3. the demo system uses simple code generation to explicitly write the n-tuple product using a simple struct-like definition (description of one row).
  4. ROOT 6 claims to be able to support such an C++ template structure, but specialized support for some some of the C++ containers that might be used will likely not be available, meaning that the guts of C++11 std classes might be visible in ROOT class definitions.

Here are the issues:

  1. code generation is used in the artextensions area. A product called "cog" is used (a python code generation tool. The procedure will need to be looked over and reviewed.
  2. view support requires a container to be available in the event. This n-tuple product is a first-class product, not living in a container. The current implementation requires an artificial container with one element to permit the view support to work. Views support for first-class products is needed for this to work cleanly.

Assuming a row that looks like this:

MyThing
 int x
 double y

Here is the approximate interface that is generated:

struct MyThing : public artext::NTupleInterface {
 std::vector<int> x;
 std::vector<double y;

 std::tuple<int,double> getRow(unsigned int index) const;
 void addRow(std::tuple<int,double> row);

 ... all the view support stuff
 private:
 ... all the stuff that artext::NTupleInterface requires to be implemented for generic access
};

Related issues

Related to art - Feature #11036: multidimensional array support in NTuple productAccepted2015-11-30

Precedes art - Feature #11033: art module in PythonAccepted2015-12-012015-12-01

History

#1 Updated by Jim Kowalkowski over 3 years ago

  • Description updated (diff)

#2 Updated by Jim Kowalkowski over 3 years ago

#3 Updated by Jim Kowalkowski over 3 years ago

#4 Updated by Jim Kowalkowski over 3 years ago

#5 Updated by Jim Kowalkowski over 3 years ago

  • Related to Feature #11036: multidimensional array support in NTuple product added

#6 Updated by Kyle Knoepfel over 3 years ago

  • Status changed from New to Accepted

#7 Updated by Kyle Knoepfel over 3 years ago

  • Target version set to 2.01.00

#8 Updated by Kyle Knoepfel about 3 years ago

  • Target version changed from 2.01.00 to Vega

#9 Updated by Kyle Knoepfel about 1 year ago

  • Target version changed from Vega to Capella


Also available in: Atom PDF