LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
BranchMapper.cc
Go to the documentation of this file.
1
// ======================================================================
2
//
3
// BranchMapper: Manages the per event/subRun/run per product provenance.
4
//
5
// ======================================================================
6
7
#include "
canvas/Persistency/Provenance/BranchMapper.h
"
8
9
using
art::BranchMapper
;
10
11
BranchMapper::BranchMapper(
bool
const
delayedRead) : delayedRead_{delayedRead}
12
{}
13
14
void
15
BranchMapper::readProvenance
()
const
16
{
17
if
(
delayedRead_
) {
18
delayedRead_
=
false
;
19
readProvenance_
();
20
}
21
}
22
23
BranchMapper::result_t
24
BranchMapper::insert
(std::unique_ptr<ProductProvenance const>&& pp_ptr)
25
{
26
readProvenance
();
27
result_t
result{pp_ptr.get()};
28
entryInfoSet_
[result->productID()].reset(pp_ptr.release());
29
return
result;
30
}
31
32
BranchMapper::result_t
33
BranchMapper::branchToProductProvenance
(
ProductID
const
pid
)
const
34
{
35
readProvenance
();
36
auto
it =
entryInfoSet_
.find(pid);
37
return
it ==
entryInfoSet_
.end() ?
result_t
() :
result_t
(it->second.get());
38
}
39
40
// ======================================================================
art::BranchMapper::result_t
cet::exempt_ptr< ProductProvenance const > result_t
Definition:
BranchMapper.h:37
BranchMapper.h
art::BranchMapper
Definition:
BranchMapper.h:32
art::BranchMapper::readProvenance_
virtual void readProvenance_() const
Definition:
BranchMapper.h:61
art::BranchMapper::delayedRead_
bool delayedRead_
Definition:
BranchMapper.h:57
art::BranchMapper::insert
result_t insert(std::unique_ptr< ProductProvenance const > &&)
Definition:
BranchMapper.cc:24
art::BranchMapper::entryInfoSet_
eiSet entryInfoSet_
Definition:
BranchMapper.h:56
art::BranchMapper::branchToProductProvenance
result_t branchToProductProvenance(ProductID const) const
Definition:
BranchMapper.cc:33
art::BranchMapper::readProvenance
void readProvenance() const
Definition:
BranchMapper.cc:15
art::ProductID
Definition:
ProductID.h:16
pid
Definition:
Chi2ParticleID_module.cc:41
canvas
Persistency
Provenance
BranchMapper.cc
Generated on Wed Dec 12 2018 14:42:35 for LArSoft by
1.8.11