LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::ProdToProdMapBuilder Class Reference

#include "ProdToProdMapBuilder.h"

Public Types

using ProductIDTransMap = std::map< ProductID, ProductID >
 

Public Member Functions

void prepareTranslationTables (ProductIDTransMap &transMap)
 
PtrRemapper getRemapper (Event const &e) const
 

Private Attributes

ProductIDTransMap productIDTransMap_ {}
 

Detailed Description

Definition at line 14 of file ProdToProdMapBuilder.h.

Member Typedef Documentation

Member Function Documentation

art::PtrRemapper art::ProdToProdMapBuilder::getRemapper ( Event const &  e) const

Definition at line 19 of file ProdToProdMapBuilder.cc.

References art::PtrRemapper::event_, art::PtrRemapper::prodTransMap_, and productIDTransMap_.

Referenced by art::MixHelper::mixAndPut().

20 {
21  PtrRemapper result;
22  result.event_ = cet::make_exempt_ptr(&e);
23  // Check translation map to see if output product IDs are supported
24  // for given event.
25  result.prodTransMap_ = productIDTransMap_;
26  return result;
27 }
ProductIDTransMap productIDTransMap_
Float_t e
Definition: plot.C:35
void art::ProdToProdMapBuilder::prepareTranslationTables ( ProductIDTransMap transMap)

Definition at line 7 of file ProdToProdMapBuilder.cc.

References art::errors::DataCorruption, and productIDTransMap_.

Referenced by art::MixHelper::openNextFile_().

8 {
9  if (productIDTransMap_.empty()) {
10  transMap.swap(productIDTransMap_);
11  } else if (productIDTransMap_ != transMap) {
12  throw Exception(errors::DataCorruption) << "Secondary input file has "
13  "ProductIDs inconsistent with "
14  "previous files.\n";
15  }
16 }
ProductIDTransMap productIDTransMap_
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66

Member Data Documentation

ProductIDTransMap art::ProdToProdMapBuilder::productIDTransMap_ {}
private

Definition at line 22 of file ProdToProdMapBuilder.h.

Referenced by getRemapper(), and prepareTranslationTables().


The documentation for this class was generated from the following files: