LArSoft  v06_85_00
Liquid Argon Software toolkit - http://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 170 of file ParallelData.h.

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

170  {
171 
172  // Ahh, simplicity.
173  return details::ParallelData<AuxColl, Aux, Tag>(data);
174 
175  } // 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 58 of file makeParallelDataFrom.h.

59  { return proxy::makeParallelData<AuxColl, Aux, Tag>(data); }
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 116 of file makeParallelDataFrom.h.

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

Definition at line 88 of file makeParallelDataFrom.h.

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

Definition at line 92 of file makeParallelDataFrom.h.

93  {
94  return
95  makeParallelDataFrom<AuxColl, util::collection_value_t<AuxColl>, Event>
96  (event, tag);
97  }
Event finding and building.