LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/

Infrastructure for support of parallel data structures. More...

Namespaces

 proxy::details
 

Classes

struct  proxy::ParallelDataProxyMakerBase< Main, AuxColl, Aux, AuxTag >
 Creates an parallel data wrapper for the specified types. More...
 
class  proxy::ParallelDataProxyMaker< Main, Aux, CollProxy, Tag, AuxColl >
 Creates an associated data wrapper for the specified types. More...
 

Functions

template<typename AuxColl , typename Aux = util::collection_value_t<AuxColl>, typename Tag = Aux>
auto proxy::makeParallelDataFrom (AuxColl const &data)
 Wraps a collection into a parallel data collection object. More...
 
template<typename AuxColl , typename Aux , typename Tag , typename Event >
auto proxy::makeParallelDataFrom (Event const &event, art::InputTag const &tag)
 Creates and returns a parallel data collection object. More...
 
template<typename AuxColl , typename Aux , typename Event >
auto proxy::makeParallelDataFrom (Event const &event, art::InputTag const &tag)
 
template<typename AuxColl , typename Event >
auto proxy::makeParallelDataFrom (Event const &event, art::InputTag const &tag)
 
template<typename AuxColl , typename Aux = util::collection_value_t<AuxColl>, typename Tag = Aux>
auto proxy::makeParallelData (AuxColl const &data)
 Wraps a collection into a parallel data collection object. More...
 

Detailed Description

Infrastructure for support of parallel data structures.

This infrastructure provides support for merging to a proxy data products fulfilling the parallel data product requirements.

The typical pattern is to read and merge a parallel data product with withParallelData(). In alternative, a proxy can be augmented with any existing collection, using wrapParallelData().

Function Documentation

template<typename AuxColl , typename Aux = util::collection_value_t<AuxColl>, typename Tag = Aux>
auto proxy::makeParallelData ( AuxColl const &  data)

Wraps a collection into a parallel data collection object.

Template Parameters
AuxColltype of parallel data data product container
Auxtype of parallel data to be associated to the main objects (if omitted: AuxColl::value_type)
Tagthe tag labelling this associated data (if omitted: as Aux)
Parameters
datadata collection to be wrapped
Returns
a new ParallelData wrapping the information in data

The data collection must be non-temporary and it is treated as fulfilling parallel data product requirements.

Example:

std::vector<recob::TrackFitHitInfo> trackData;
// ...
auto auxData = makeParallelData(trackData);

where the tag of the parallel data is now recob::TrackFitHitInfo and auxData behaviour becomes undefined as soon as trackData falls out of scope.

Definition at line 155 of file ParallelData.h.

References proxy::details::ParallelData< AuxColl, Aux, Tag >::data().

156  {
157 
158  // Ahh, simplicity.
159  return details::ParallelData<AuxColl, Aux, Tag>(data);
160 
161  } // makeParallelData(AuxColl)
template<typename AuxColl , typename Aux = util::collection_value_t<AuxColl>, typename Tag = Aux>
auto proxy::makeParallelDataFrom ( AuxColl const &  data)

Wraps a collection into a parallel data collection object.

Template Parameters
AuxColltype of parallel data data product container
Auxtype of parallel data to be associated to the main objects (if omitted: AuxColl::value_type)
Tagthe tag labelling this associated data (if omitted: as Aux)
Parameters
datadata collection to be wrapped
Returns
a new ParallelData wrapping the information in data

The data collection must be non-temporary and it is treated as fulfilling parallel data product requirements.

Example:

std::vector<recob::TrackFitHitInfo> trackData;
// ...
auto auxData = makeParallelDataFrom(trackData);

where the tag of the parallel data is now recob::TrackFitHitInfo and auxData behaviour becomes undefined as soon as trackData falls out of scope.

Definition at line 51 of file makeParallelDataFrom.h.

52  {
53  return proxy::makeParallelData<AuxColl, Aux, Tag>(data);
54  }
template<typename AuxColl , typename Aux , typename Tag , typename Event >
auto proxy::makeParallelDataFrom ( Event const &  event,
art::InputTag const &  tag 
)

Creates and returns a parallel data collection object.

Template Parameters
AuxColltype of parallel data data product container
Auxtype of parallel data to be associated to the main objects (if omitted: AuxColl::value_type)
Tagthe tag labelling this associated data (if omitted: as Aux)
Eventtype of event to read the data product from
Parameters
eventevent to read the data product from
taginput tag of the parallel data product
Returns
a new ParallelData filled with data from tag

The data product being retrieved must fulfill the requirements of parallel data product.

At least one template type must be explicitly specified, e.g.

auto auxData
= makeParallelDataFrom<std::vector<recob::TrackFitHitInfo>>(event, tag);

In this case, the Aux type is defined as recob::TrackFitHitInfo, as is the tag.

Definition at line 107 of file makeParallelDataFrom.h.

108  {
109  return makeParallelDataFrom<AuxColl, Aux, Tag>(*(event.template getValidHandle<AuxColl>(tag)));
110  } // makeParallelDataFrom()
template<typename AuxColl , typename Aux , typename Event >
auto proxy::makeParallelDataFrom ( Event const &  event,
art::InputTag const &  tag 
)

Definition at line 82 of file makeParallelDataFrom.h.

83  {
84  return makeParallelDataFrom<AuxColl, Aux, Aux, Event>(event, tag);
85  }
Event finding and building.
template<typename AuxColl , typename Event >
auto proxy::makeParallelDataFrom ( Event const &  event,
art::InputTag const &  tag 
)

Definition at line 88 of file makeParallelDataFrom.h.

89  {
90  return makeParallelDataFrom<AuxColl, util::collection_value_t<AuxColl>, Event>(event, tag);
91  }
Event finding and building.