LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
makeParallelDataFrom.h
Go to the documentation of this file.
1 
11 #ifndef LARDATA_RECOBASEPROXY_PROXYBASE_MAKEPARALLELDATAFROM_H
12 #define LARDATA_RECOBASEPROXY_PROXYBASE_MAKEPARALLELDATAFROM_H
13 
14 // LArSoft libraries
16 #include "larcorealg/CoreUtils/ContainerMeta.h" // util::collection_value_t, ...
17 
18 // framework libraries
20 
21 
22 
23 namespace proxy {
24 
25 
26  // -- BEGIN Parallel data infrastructure -------------------------------------
29 
53  template <
54  typename AuxColl,
55  typename Aux = util::collection_value_t<AuxColl>,
56  typename Tag = Aux
57  >
58  auto makeParallelDataFrom(AuxColl const& data)
59  { return proxy::makeParallelData<AuxColl, Aux, Tag>(data); }
60 
61 
84  template <typename AuxColl, typename Aux, typename Tag, typename Event>
85  auto makeParallelDataFrom(Event const& event, art::InputTag const& tag);
86 
87  template <typename AuxColl, typename Aux, typename Event>
88  auto makeParallelDataFrom(Event const& event, art::InputTag const& tag)
89  { return makeParallelDataFrom<AuxColl, Aux, Aux, Event>(event, tag); }
90 
91  template <typename AuxColl, typename Event>
92  auto makeParallelDataFrom(Event const& event, art::InputTag const& tag)
93  {
94  return
95  makeParallelDataFrom<AuxColl, util::collection_value_t<AuxColl>, Event>
96  (event, tag);
97  }
98 
99 
101  // -- END Parallel data infrastructure ---------------------------------------
102 
103 
104 } // namespace proxy
105 
106 
107 //------------------------------------------------------------------------------
108 //--- template implementation
109 //------------------------------------------------------------------------------
110 namespace proxy {
111 
112  //----------------------------------------------------------------------------
113  //--- makeParallelDataFrom() implementations
114  //----------------------------------------------------------------------------
115  template <typename AuxColl, typename Aux, typename Tag, typename Event>
116  auto makeParallelDataFrom(Event const& event, art::InputTag const& tag) {
117  return makeParallelDataFrom<AuxColl, Aux, Tag>
118  (*(event.template getValidHandle<AuxColl>(tag)));
119  } // makeParallelDataFrom()
120 
121 } // namespace proxy
122 
123 
124 #endif // LARDATA_RECOBASEPROXY_PROXYBASE_MAKEPARALLELDATAFROM_H
Auxiliary data from parallel data products.
auto makeParallelDataFrom(AuxColl const &data)
Wraps a collection into a parallel data collection object.
Encloses LArSoft data product proxy objects and utilities.See this doxygen module for an introduction...
typename collection_value_type< Coll >::type collection_value_t
Type contained in the collection Coll.
Definition: ContainerMeta.h:65
C++ metaprogramming utilities for dealing with containers.
Event finding and building.