CMS 3D CMS Logo

getThinned_implementation.h
Go to the documentation of this file.
1 #ifndef DataFormats_Common_getThinned_implementation_h
2 #define DataFormats_Common_getThinned_implementation_h
3 
4 #include <algorithm>
5 #include <cassert>
6 #include <functional>
7 #include <optional>
8 #include <tuple>
9 #include <variant>
10 
16 
17 namespace edm {
18  class WrapperBase;
19 
20  namespace detail {
22 
24  public:
25  ThinnedOrSlimmedProduct() = default;
26  explicit ThinnedOrSlimmedProduct(WrapperBase const* thinned, unsigned int key)
27  : thinnedProduct_{thinned}, thinnedKey_{key} {}
28  explicit ThinnedOrSlimmedProduct(ThinnedAssociation const* slimmed, unsigned int key)
29  : slimmedAssociation_{slimmed}, thinnedKey_{key} {}
30 
31  bool hasThinned() const { return thinnedProduct_ != nullptr; }
32  bool hasSlimmed() const { return slimmedAssociation_ != nullptr; }
33 
34  std::tuple<WrapperBase const*, unsigned int> thinnedProduct() const {
35  return std::tuple(thinnedProduct_, thinnedKey_);
36  }
37 
38  std::tuple<ThinnedAssociation const*, unsigned int> slimmedAssociation() const {
39  return std::tuple(slimmedAssociation_, thinnedKey_);
40  }
41 
42  private:
43  WrapperBase const* thinnedProduct_ = nullptr;
45  unsigned int thinnedKey_ = 0;
46  };
47 
48  // This is a helper function to recursively search for a thinned
49  // product containing the parent key on the same "slimming depth". That
50  // means that when the recursion encounters a slimmed collection,
51  // the tree traversal does not proceed onto the children of the
52  // slimmed collection. Instead, the slimmed ThinnedAssociation is
53  // recorded for the case that the entire tree on a given "slimming
54  // depth" does not have any thinned-only collections.
55  //
56  // Returns
57  // - (WrapperBase, unsigned) in case a thinned collection
58  // containing the parent key was found.
59  // - (ThinnedAssociation, unsigned) in case no thinned collections
60  // were encountered, but a slimmed collection containing the
61  // parent key was found
62  // - otherwise "null" (i.e. only thinned collections without the
63  // parent key, or in absence of thinned collections the slimmed
64  // collection without the parent key, or no thinned or slimmed
65  // collections)
66  template <typename F1, typename F2, typename F3>
68  unsigned int key,
69  ThinnedAssociationsHelper const& thinnedAssociationsHelper,
70  F1 pidToBid,
71  F2 getThinnedAssociation,
72  F3 getByProductID) {
73  BranchID parent = pidToBid(pid);
74 
75  auto associatedBranches = thinnedAssociationsHelper.parentBegin(parent);
76  auto const iEnd = thinnedAssociationsHelper.parentEnd(parent);
77 
78  if (associatedBranches == iEnd) {
79  return ThinnedOrSlimmedProduct();
80  }
81  bool const slimmedAllowed = (associatedBranches + 1 == iEnd);
82  if (slimmedAllowed and associatedBranches->isSlimmed()) {
83  // Slimmed container can be considered only if it has no (thinned) siblings
84  ThinnedAssociation const* slimmedAssociation = getThinnedAssociation(associatedBranches->association());
85  if (slimmedAssociation == nullptr or
86  associatedBranches->parent() != pidToBid(slimmedAssociation->parentCollectionID())) {
87  return ThinnedOrSlimmedProduct();
88  }
89 
90  // Does this slimmed container have the element referenced by key?
91  auto slimmedIndex = slimmedAssociation->getThinnedIndex(key);
92  if (slimmedIndex.has_value()) {
93  return ThinnedOrSlimmedProduct(slimmedAssociation, *slimmedIndex);
94  } else {
95  return ThinnedOrSlimmedProduct();
96  }
97  }
98 
99  // Loop over thinned containers which were made by selecting elements from the parent container
100  for (; associatedBranches != iEnd; ++associatedBranches) {
101  if (associatedBranches->isSlimmed()) {
102  continue;
103  }
104 
105  ThinnedAssociation const* thinnedAssociation = getThinnedAssociation(associatedBranches->association());
106  if (thinnedAssociation == nullptr)
107  continue;
108 
109  if (associatedBranches->parent() != pidToBid(thinnedAssociation->parentCollectionID())) {
110  continue;
111  }
112 
113  // Does this thinned container have the element referenced by key?
114  auto thinnedIndex = thinnedAssociation->getThinnedIndex(key);
115  if (not thinnedIndex.has_value()) {
116  continue;
117  }
118 
119  // Return a pointer to thinned container if we can find it
120  ProductID const& thinnedCollectionPID = thinnedAssociation->thinnedCollectionID();
121  WrapperBase const* thinnedCollection = getByProductID(thinnedCollectionPID);
122  if (thinnedCollection != nullptr) {
123  return ThinnedOrSlimmedProduct(thinnedCollection, *thinnedIndex);
124  }
125 
126  // Thinned container is not found, try looking recursively in thinned containers
127  // which were made by selecting elements from this thinned container.
128  auto thinnedOrSlimmed = getThinnedProductOnSlimmingDepth(thinnedCollectionPID,
129  *thinnedIndex,
130  thinnedAssociationsHelper,
131  pidToBid,
132  getThinnedAssociation,
133  getByProductID);
134  if (thinnedOrSlimmed.hasThinned() or (slimmedAllowed and thinnedOrSlimmed.hasSlimmed())) {
135  return thinnedOrSlimmed;
136  }
137  }
138 
139  return ThinnedOrSlimmedProduct();
140  }
141 
142  auto makeThinnedIndexes(std::vector<unsigned int> const& keys,
143  std::vector<WrapperBase const*> const& foundContainers,
144  ThinnedAssociation const* thinnedAssociation) {
145  unsigned const nKeys = keys.size();
146  std::vector<unsigned int> thinnedIndexes(nKeys, kThinningDoNotLookForThisIndex);
147  bool hasAny = false;
148  for (unsigned k = 0; k < nKeys; ++k) {
149  // Already found this one
150  if (foundContainers[k] != nullptr) {
151  continue;
152  }
153  // Already know this one is not in this thinned container
155  continue;
156  }
157  // Does the thinned container hold the entry of interest?
158  if (auto thinnedIndex = thinnedAssociation->getThinnedIndex(keys[k]); thinnedIndex.has_value()) {
159  thinnedIndexes[k] = *thinnedIndex;
160  hasAny = true;
161  }
162  }
163  return std::tuple(std::move(thinnedIndexes), hasAny);
164  }
165 
166  // This is a helper function to recursive search ffor thinned
167  // collections that contain some of the parent keys on the same
168  // "slimming depth". That means that when the recursion encounters
169  // a slimmed colleciton, the tree traversal does not proceed onto
170  // the children of the slimmed collection. Instead, the slimmed
171  // ThinnedAssociation is recorded for the case that the entire
172  // tree on a given "slimming depth" does not have any thinned-only
173  // collections.
174  //
175  // Returns a (ThinnedAssociation, vector<unsigned>) in case no
176  // thinned collections were encountered, but a slimmed collection
177  // containing at least one of the parent keys was found. The
178  // returned vector contains keys to the slimmed collection, and
179  // the output arguments foundContainers and keys are not modified
180  // in this case.
181  //
182  // Otherwise returns a null optional (i.e. any thinned collection
183  // was encountered, or in absence of thinned collections the
184  // slimmed collection did not contain any parent keys, or there
185  // were no thinned or slimmed collections)
186  template <typename F1, typename F2, typename F3>
187  std::optional<std::tuple<ThinnedAssociation const*, std::vector<unsigned int>>> getThinnedProductsOnSlimmingDepth(
188  ProductID const& pid,
189  ThinnedAssociationsHelper const& thinnedAssociationsHelper,
190  F1 pidToBid,
191  F2 getThinnedAssociation,
192  F3 getByProductID,
193  std::vector<WrapperBase const*>& foundContainers,
194  std::vector<unsigned int>& keys) {
195  BranchID parent = pidToBid(pid);
196 
197  auto associatedBranches = thinnedAssociationsHelper.parentBegin(parent);
198  auto const iEnd = thinnedAssociationsHelper.parentEnd(parent);
199 
200  if (associatedBranches == iEnd) {
201  return std::nullopt;
202  }
203  bool const slimmedAllowed = associatedBranches + 1 == iEnd;
204  if (slimmedAllowed and associatedBranches->isSlimmed()) {
205  // Slimmed container can be considered only if it has no (thinned) siblings
206  ThinnedAssociation const* slimmedAssociation = getThinnedAssociation(associatedBranches->association());
207  if (slimmedAssociation == nullptr or
208  associatedBranches->parent() != pidToBid(slimmedAssociation->parentCollectionID())) {
209  return std::nullopt;
210  }
211 
212  auto [slimmedIndexes, hasAny] = makeThinnedIndexes(keys, foundContainers, slimmedAssociation);
213  // Does this slimmed container have any of the elements referenced by keys?
214  if (hasAny) {
215  return std::tuple(slimmedAssociation, std::move(slimmedIndexes));
216  } else {
217  return std::nullopt;
218  }
219  }
220 
221  // Loop over thinned containers which were made by selecting elements from the parent container
222  for (; associatedBranches != iEnd; ++associatedBranches) {
223  if (associatedBranches->isSlimmed()) {
224  continue;
225  }
226 
227  ThinnedAssociation const* thinnedAssociation = getThinnedAssociation(associatedBranches->association());
228  if (thinnedAssociation == nullptr)
229  continue;
230 
231  if (associatedBranches->parent() != pidToBid(thinnedAssociation->parentCollectionID())) {
232  continue;
233  }
234 
235  auto [thinnedIndexes, hasAny] = makeThinnedIndexes(keys, foundContainers, thinnedAssociation);
236  if (!hasAny) {
237  continue;
238  }
239 
240  // Set the pointers and indexes into the thinned container (if we can find it)
241  ProductID thinnedCollectionPID = thinnedAssociation->thinnedCollectionID();
242  WrapperBase const* thinnedCollection = getByProductID(thinnedCollectionPID);
243  unsigned const nKeys = keys.size();
244  if (thinnedCollection == nullptr) {
245  // Thinned container is not found, try looking recursively in thinned containers
246  // which were made by selecting elements from this thinned container.
247  auto slimmed = getThinnedProductsOnSlimmingDepth(thinnedCollectionPID,
248  thinnedAssociationsHelper,
249  pidToBid,
250  getThinnedAssociation,
251  getByProductID,
252  foundContainers,
253  thinnedIndexes);
254  if (slimmedAllowed and slimmed.has_value()) {
255  return slimmed;
256  }
257  for (unsigned k = 0; k < nKeys; ++k) {
258  if (foundContainers[k] == nullptr)
259  continue;
260  if (thinnedIndexes[k] == kThinningDoNotLookForThisIndex)
261  continue;
262  keys[k] = thinnedIndexes[k];
263  }
264  } else {
265  for (unsigned k = 0; k < nKeys; ++k) {
266  if (thinnedIndexes[k] == kThinningDoNotLookForThisIndex)
267  continue;
268  keys[k] = thinnedIndexes[k];
269  foundContainers[k] = thinnedCollection;
270  }
271  }
272  }
273  return std::nullopt;
274  }
275 
276  // This function provides a common implementation of
277  // EDProductGetter::getThinnedProduct() for EventPrincipal,
278  // DataGetterHelper, and BareRootProductGetter.
279  //
280  // getThinnedProduct assumes getIt was already called and failed to find
281  // the product. The input key is the index of the desired element in the
282  // container identified by ProductID (which cannot be found).
283  // If the return value is not null, then the desired element was
284  // found in a thinned container. If the desired element is not
285  // found, then an optional without a value is returned.
286  template <typename F1, typename F2, typename F3>
287  std::optional<std::tuple<WrapperBase const*, unsigned int>> getThinnedProduct(
288  ProductID const& pid,
289  unsigned int key,
290  ThinnedAssociationsHelper const& thinnedAssociationsHelper,
291  F1 pidToBid,
292  F2 getThinnedAssociation,
293  F3 getByProductID) {
294  auto thinnedOrSlimmed = getThinnedProductOnSlimmingDepth(
295  pid, key, thinnedAssociationsHelper, pidToBid, getThinnedAssociation, getByProductID);
296 
297  if (thinnedOrSlimmed.hasThinned()) {
298  return thinnedOrSlimmed.thinnedProduct();
299  } else if (thinnedOrSlimmed.hasSlimmed()) {
300  auto [slimmedAssociation, slimmedIndex] = thinnedOrSlimmed.slimmedAssociation();
301  ProductID const& slimmedCollectionPID = slimmedAssociation->thinnedCollectionID();
302  WrapperBase const* slimmedCollection = getByProductID(slimmedCollectionPID);
303  if (slimmedCollection == nullptr) {
304  // Slimmed container is not found, try looking recursively in thinned containers
305  // which were made by selecting elements from this thinned container.
306  return getThinnedProduct(slimmedCollectionPID,
307  slimmedIndex,
308  thinnedAssociationsHelper,
309  pidToBid,
310  getThinnedAssociation,
311  getByProductID);
312  }
313  return std::tuple(slimmedCollection, slimmedIndex);
314  }
315  return std::nullopt;
316  }
317 
318  // This function provides a common implementation of
319  // EDProductGetter::getThinnedProducts() for EventPrincipal,
320  // DataGetterHelper, and BareRootProductGetter.
321  //
322  // getThinnedProducts assumes getIt was already called and failed to find
323  // the product. The input keys are the indexes into the container identified
324  // by ProductID (which cannot be found). On input the WrapperBase pointers
325  // must all be set to nullptr (except when the function calls itself
326  // recursively where non-null pointers mark already found elements).
327  // Thinned containers derived from the product are searched to see
328  // if they contain the desired elements. For each that is
329  // found, the corresponding WrapperBase pointer is set and the key
330  // is modified to be the key into the container where the element
331  // was found. The WrapperBase pointers might or might not all point
332  // to the same thinned container.
333  template <typename F1, typename F2, typename F3>
334  void getThinnedProducts(ProductID const& pid,
335  ThinnedAssociationsHelper const& thinnedAssociationsHelper,
336  F1 pidToBid,
337  F2 getThinnedAssociation,
338  F3 getByProductID,
339  std::vector<WrapperBase const*>& foundContainers,
340  std::vector<unsigned int>& keys) {
341  auto slimmed = getThinnedProductsOnSlimmingDepth(
342  pid, thinnedAssociationsHelper, pidToBid, getThinnedAssociation, getByProductID, foundContainers, keys);
343  if (slimmed.has_value()) {
344  // no thinned procucts found, try out slimmed next if one is available
345  auto [slimmedAssociation, slimmedIndexes] = std::move(*slimmed);
346  ProductID const& slimmedCollectionPID = slimmedAssociation->thinnedCollectionID();
347  WrapperBase const* slimmedCollection = getByProductID(slimmedCollectionPID);
348  unsigned const nKeys = keys.size();
349  if (slimmedCollection == nullptr) {
350  getThinnedProducts(slimmedCollectionPID,
351  thinnedAssociationsHelper,
352  pidToBid,
353  getThinnedAssociation,
354  getByProductID,
355  foundContainers,
356  slimmedIndexes);
357  for (unsigned k = 0; k < nKeys; ++k) {
358  if (foundContainers[k] == nullptr)
359  continue;
360  if (slimmedIndexes[k] == kThinningDoNotLookForThisIndex)
361  continue;
362  keys[k] = slimmedIndexes[k];
363  }
364  } else {
365  for (unsigned k = 0; k < nKeys; ++k) {
366  if (slimmedIndexes[k] == kThinningDoNotLookForThisIndex)
367  continue;
368  keys[k] = slimmedIndexes[k];
369  foundContainers[k] = slimmedCollection;
370  }
371  }
372  }
373  }
374 
376 
377  // This function provides a common implementation of
378  // EDProductGetter::getThinnedKeyFrom() for EventPrincipal,
379  // DataGetterHelper, and BareRootProductGetter.
380  //
381  // The thinned ProductID must come from an existing RefCore. The
382  // input key is the index of the desired element in the container
383  // identified by the parent ProductID. Returns an std::variant
384  // whose contents can be
385  // - unsigned int for the index in the thinned collection if the
386  // desired element was found in the thinned collection
387  // - function creating an edm::Exception if parent is not a parent
388  // of any thinned collection, thinned is not really a thinned
389  // collection, or parent and thinned have no thinning
390  // relationship
391  // - std::monostate if thinned is thinned from parent, but the key
392  // is not found in the thinned collection
393  template <typename F>
394  std::variant<unsigned int, GetThinnedKeyFromExceptionFactory, std::monostate> getThinnedKeyFrom_implementation(
395  ProductID const& parentID,
396  BranchID const& parent,
397  unsigned int key,
398  ProductID const& thinnedID,
399  BranchID thinned,
400  ThinnedAssociationsHelper const& thinnedAssociationsHelper,
401  F&& getThinnedAssociation) {
402  // need to explicitly check for equality of parent BranchID,
403  // because ThinnedAssociationsHelper::parentBegin() uses
404  // std::lower_bound() that returns a valid iterator in case the
405  // parent is not found
406  if (auto iParent = thinnedAssociationsHelper.parentBegin(parent);
407  iParent == thinnedAssociationsHelper.parentEnd(parent) or iParent->parent() != parent) {
408  return [parentID]() {
410  << "Parent collection with ProductID " << parentID << " has not been thinned";
411  };
412  }
413 
414  bool foundParent = false;
415  std::vector<ThinnedAssociation const*> thinnedAssociationParentage;
416  while (not foundParent) {
417  // TODO: be smarter than linear search every time?
418  auto branchesToThinned = std::find_if(
419  thinnedAssociationsHelper.begin(), thinnedAssociationsHelper.end(), [&thinned](auto& associatedBranches) {
420  return associatedBranches.thinned() == thinned;
421  });
422  if (branchesToThinned == thinnedAssociationsHelper.end()) {
423  return [parentID, thinnedID, thinnedIsThinned = not thinnedAssociationParentage.empty()]() {
425  ex << "Requested thinned collection with ProductID " << thinnedID
426  << " is not thinned from the parent collection with ProductID " << parentID
427  << " or from any collection thinned from it.";
428  if (not thinnedIsThinned) {
429  ex << " In fact, the collection " << thinnedID
430  << " passed in as a 'thinned' collection has not been thinned at all.";
431  }
432  return ex;
433  };
434  }
435 
436  ThinnedAssociation const* thinnedAssociation = getThinnedAssociation(branchesToThinned->association());
437  if (thinnedAssociation == nullptr) {
439  if (thinnedAssociationParentage.empty()) {
440  ex << "ThinnedAssociation corresponding to thinned collection with ProductID " << thinnedID
441  << " not found.";
442  } else {
443  ex << "Intermediate ThinnedAssociation between the requested thinned ProductID " << thinnedID
444  << " and parent " << parentID << " not found.";
445  }
446  ex << " This should not happen.\nPlease contact the core framework developers.";
447  throw ex;
448  }
449 
450  thinnedAssociationParentage.push_back(thinnedAssociation);
451  if (branchesToThinned->parent() == parent) {
452  foundParent = true;
453  } else {
454  // next iteration with current parent as the thinned collection
455  thinned = branchesToThinned->parent();
456  }
457  }
458 
459  // found the parent, now need to rewind the parentage chain to
460  // find the index in the requested thinned collection
461  unsigned int thinnedIndex = key;
462  for (auto iAssociation = thinnedAssociationParentage.rbegin(), iEnd = thinnedAssociationParentage.rend();
463  iAssociation != iEnd;
464  ++iAssociation) {
465  auto optIndex = (*iAssociation)->getThinnedIndex(thinnedIndex);
466  if (optIndex) {
467  thinnedIndex = *optIndex;
468  } else {
469  return std::monostate{};
470  }
471  }
472  return thinnedIndex;
473  }
474 
475  } // namespace detail
476 } // namespace edm
477 
478 #endif
edm::detail::ThinnedOrSlimmedProduct::slimmedAssociation
std::tuple< ThinnedAssociation const *, unsigned int > slimmedAssociation() const
Definition: getThinned_implementation.h:38
edm::detail::getThinnedProduct
std::optional< std::tuple< WrapperBase const *, unsigned int > > getThinnedProduct(ProductID const &pid, unsigned int key, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID)
Definition: getThinned_implementation.h:287
ThinnedAssociationsHelper.h
edm::errors::InvalidReference
Definition: EDMException.h:39
edm::detail::ThinnedOrSlimmedProduct::ThinnedOrSlimmedProduct
ThinnedOrSlimmedProduct()=default
edm::errors::LogicError
Definition: EDMException.h:37
edm
HLT enums.
Definition: AlignableModifier.h:19
BranchID.h
edm::ThinnedAssociation
Definition: ThinnedAssociation.h:15
edm::ThinnedAssociationsHelper::parentEnd
std::vector< ThinnedAssociationBranches >::const_iterator parentEnd(BranchID const &) const
Definition: ThinnedAssociationsHelper.cc:39
relativeConstraints.keys
keys
Definition: relativeConstraints.py:89
detail
Definition: ConvertingESProducerWithDependenciesT.h:23
edm::detail::ThinnedOrSlimmedProduct::thinnedProduct
std::tuple< WrapperBase const *, unsigned int > thinnedProduct() const
Definition: getThinned_implementation.h:34
edm::Exception
Definition: EDMException.h:77
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
EDMException.h
edm::ThinnedAssociation::getThinnedIndex
std::optional< unsigned int > getThinnedIndex(unsigned int parentIndex) const
Definition: ThinnedAssociation.cc:9
edm::detail::getThinnedKeyFrom_implementation
std::variant< unsigned int, GetThinnedKeyFromExceptionFactory, std::monostate > getThinnedKeyFrom_implementation(ProductID const &parentID, BranchID const &parent, unsigned int key, ProductID const &thinnedID, BranchID thinned, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F &&getThinnedAssociation)
Definition: getThinned_implementation.h:394
edm::detail::ThinnedOrSlimmedProduct::thinnedKey_
unsigned int thinnedKey_
Definition: getThinned_implementation.h:45
edm::BranchID
Definition: BranchID.h:14
ProductID.h
dqmdumpme.k
k
Definition: dqmdumpme.py:60
edm::ThinnedAssociation::thinnedCollectionID
ProductID const & thinnedCollectionID() const
Definition: ThinnedAssociation.h:20
edm::detail::getThinnedProductOnSlimmingDepth
ThinnedOrSlimmedProduct getThinnedProductOnSlimmingDepth(ProductID const &pid, unsigned int key, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID)
Definition: getThinned_implementation.h:67
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:37
edm::detail::ThinnedOrSlimmedProduct::slimmedAssociation_
ThinnedAssociation const * slimmedAssociation_
Definition: getThinned_implementation.h:44
edm::detail::ThinnedOrSlimmedProduct::ThinnedOrSlimmedProduct
ThinnedOrSlimmedProduct(WrapperBase const *thinned, unsigned int key)
Definition: getThinned_implementation.h:26
edm::detail::ThinnedOrSlimmedProduct::ThinnedOrSlimmedProduct
ThinnedOrSlimmedProduct(ThinnedAssociation const *slimmed, unsigned int key)
Definition: getThinned_implementation.h:28
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
edm::detail::getThinnedProductsOnSlimmingDepth
std::optional< std::tuple< ThinnedAssociation const *, std::vector< unsigned int > > > getThinnedProductsOnSlimmingDepth(ProductID const &pid, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID, std::vector< WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys)
Definition: getThinned_implementation.h:187
edm::detail::ThinnedOrSlimmedProduct::hasSlimmed
bool hasSlimmed() const
Definition: getThinned_implementation.h:32
edm::ThinnedAssociationsHelper::end
std::vector< ThinnedAssociationBranches >::const_iterator end() const
Definition: ThinnedAssociationsHelper.cc:24
edm::WrapperBase
Definition: WrapperBase.h:23
edm::ThinnedAssociation::parentCollectionID
ProductID const & parentCollectionID() const
Definition: ThinnedAssociation.h:19
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::detail::makeThinnedIndexes
auto makeThinnedIndexes(std::vector< unsigned int > const &keys, std::vector< WrapperBase const * > const &foundContainers, ThinnedAssociation const *thinnedAssociation)
Definition: getThinned_implementation.h:142
edm::ThinnedAssociationsHelper::parentBegin
std::vector< ThinnedAssociationBranches >::const_iterator parentBegin(BranchID const &) const
Definition: ThinnedAssociationsHelper.cc:28
Exception
Definition: hltDiff.cc:245
HiBiasedCentrality_cfi.function
function
Definition: HiBiasedCentrality_cfi.py:4
ThinnedAssociation.h
or
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::detail::kThinningDoNotLookForThisIndex
constexpr unsigned int kThinningDoNotLookForThisIndex
Definition: getThinned_implementation.h:21
edm::detail::GetThinnedKeyFromExceptionFactory
std::function< edm::Exception()> GetThinnedKeyFromExceptionFactory
Definition: EDProductGetter.h:37
edm::detail::ThinnedOrSlimmedProduct
Definition: getThinned_implementation.h:23
edm::detail::getThinnedProducts
void getThinnedProducts(ProductID const &pid, ThinnedAssociationsHelper const &thinnedAssociationsHelper, F1 pidToBid, F2 getThinnedAssociation, F3 getByProductID, std::vector< WrapperBase const * > &foundContainers, std::vector< unsigned int > &keys)
Definition: getThinned_implementation.h:334
edm::detail::ThinnedOrSlimmedProduct::thinnedProduct_
WrapperBase const * thinnedProduct_
Definition: getThinned_implementation.h:43
crabWrapper.key
key
Definition: crabWrapper.py:19
class-composition.parent
parent
Definition: class-composition.py:88
edm::detail::ThinnedOrSlimmedProduct::hasThinned
bool hasThinned() const
Definition: getThinned_implementation.h:31
edm::ProductID
Definition: ProductID.h:27
edm::ThinnedAssociationsHelper::begin
std::vector< ThinnedAssociationBranches >::const_iterator begin() const
Definition: ThinnedAssociationsHelper.cc:20