LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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
15 #include "larcorealg/CoreUtils/ContainerMeta.h" // util::collection_value_t, ...
17 
18 // framework libraries
20 
21 namespace proxy {
22 
23  // -- BEGIN Parallel data infrastructure -------------------------------------
26 
50  template <typename AuxColl, typename Aux = util::collection_value_t<AuxColl>, typename Tag = Aux>
51  auto makeParallelDataFrom(AuxColl const& data)
52  {
53  return proxy::makeParallelData<AuxColl, Aux, Tag>(data);
54  }
55 
78  template <typename AuxColl, typename Aux, typename Tag, typename Event>
79  auto makeParallelDataFrom(Event const& event, art::InputTag const& tag);
80 
81  template <typename AuxColl, typename Aux, typename Event>
82  auto makeParallelDataFrom(Event const& event, art::InputTag const& tag)
83  {
84  return makeParallelDataFrom<AuxColl, Aux, Aux, Event>(event, tag);
85  }
86 
87  template <typename AuxColl, typename Event>
88  auto makeParallelDataFrom(Event const& event, art::InputTag const& tag)
89  {
90  return makeParallelDataFrom<AuxColl, util::collection_value_t<AuxColl>, Event>(event, tag);
91  }
92 
94  // -- END Parallel data infrastructure ---------------------------------------
95 
96 } // namespace proxy
97 
98 //------------------------------------------------------------------------------
99 //--- template implementation
100 //------------------------------------------------------------------------------
101 namespace proxy {
102 
103  //----------------------------------------------------------------------------
104  //--- makeParallelDataFrom() implementations
105  //----------------------------------------------------------------------------
106  template <typename AuxColl, typename Aux, typename Tag, typename Event>
107  auto makeParallelDataFrom(Event const& event, art::InputTag const& tag)
108  {
109  return makeParallelDataFrom<AuxColl, Aux, Tag>(*(event.template getValidHandle<AuxColl>(tag)));
110  } // makeParallelDataFrom()
111 
112 } // namespace proxy
113 
114 #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...
C++ metaprogramming utilities for dealing with containers.
Event finding and building.