Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
art
art
test
Integration
DeferredIsReadyWithAssnsAnalyzer_module.cc
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
// Class: DeferredIsReadyWithAssnsAnalyzer
3
// Module Type: analyzer
4
// File: DeferredIsReadyWithAssnsAnalyzer_module.cc
5
//
6
// Generated at Wed Nov 6 15:11:26 2013 by Christopher Green using artmod
7
// from cetpkgsupport v1_04_02.
8
////////////////////////////////////////////////////////////////////////
9
10
#include "
art/Framework/Core/EDAnalyzer.h
"
11
#include "
art/Framework/Core/ModuleMacros.h
"
12
#include "
art/Framework/Principal/Event.h
"
13
#include "
art/Framework/Principal/Handle.h
"
14
#include "
art/Framework/Principal/Run.h
"
15
#include "
art/Framework/Principal/SubRun.h
"
16
#include "
art/test/TestObjects/AssnTestData.h
"
17
#include "canvas/Persistency/Common/FindMany.h"
18
#include "
canvas/Utilities/InputTag.h
"
19
#include "
fhiclcpp/ParameterSet.h
"
20
21
namespace
arttest
{
22
class
DeferredIsReadyWithAssnsAnalyzer;
23
}
24
25
class
arttest::DeferredIsReadyWithAssnsAnalyzer
:
public
art::EDAnalyzer
{
26
public
:
27
explicit
DeferredIsReadyWithAssnsAnalyzer
(
fhicl::ParameterSet
const
&
p
);
28
29
void
analyze
(
art::Event
const
&
e
)
override
;
30
31
private
:
32
std::string
inputLabel_
;
33
};
34
35
arttest::DeferredIsReadyWithAssnsAnalyzer::DeferredIsReadyWithAssnsAnalyzer
(
36
fhicl::ParameterSet
const
&
p
)
37
:
EDAnalyzer
(p),
inputLabel_
(p.
get
<
std
::
string
>(
"input_label"
))
38
{}
39
40
void
41
arttest::DeferredIsReadyWithAssnsAnalyzer::analyze
(
art::Event
const
&
e
)
42
{
43
auto
h
= e.
getValidHandle
<std::vector<size_t>>(
inputLabel_
);
44
art::PtrVector<size_t>
pv;
45
pv.reserve(
h
->size());
46
for
(
size_t
i
= 0, e =
h
->size();
i
!=
e
; ++
i
) {
47
pv.push_back(
art::Ptr<size_t>
(
h
,
i
));
48
}
49
art::FindMany<std::string, arttest::AssnTestData> fmp(pv, e,
inputLabel_
);
50
for
(
size_t
i
= 0, sz = fmp.size();
i
!= sz; ++
i
) {
51
assert(fmp.at(
i
).size() > 0);
52
assert(*fmp.at(
i
)[0] ==
std::string
(1,
i
+
'a'
));
53
}
54
}
55
56
DEFINE_ART_MODULE
(
arttest::DeferredIsReadyWithAssnsAnalyzer
)
arttest::DeferredIsReadyWithAssnsAnalyzer::inputLabel_
std::string inputLabel_
Definition:
DeferredIsReadyWithAssnsAnalyzer_module.cc:32
Handle.h
string
std::string string
Definition:
nybbler.cc:12
arttest::DeferredIsReadyWithAssnsAnalyzer
Definition:
DeferredIsReadyWithAssnsAnalyzer_module.cc:25
std
STL namespace.
arttest::DeferredIsReadyWithAssnsAnalyzer::DeferredIsReadyWithAssnsAnalyzer
DeferredIsReadyWithAssnsAnalyzer(fhicl::ParameterSet const &p)
Definition:
DeferredIsReadyWithAssnsAnalyzer_module.cc:35
art::EDAnalyzer::EDAnalyzer
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition:
EDAnalyzer.h:27
ParameterSet.h
sensitivity_comps.i
int i
Definition:
sensitivity_comps.py:15
e
const double e
Definition:
gUpMuFluxGen.cxx:165
DEFINE_ART_MODULE
#define DEFINE_ART_MODULE(klass)
Definition:
ModuleMacros.h:68
AssnTestData.h
arttest
Definition:
GroupSelector_t.h:4
art::DataViewImpl::getValidHandle
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Definition:
DataViewImpl.h:480
SubRun.h
EDAnalyzer.h
ModuleMacros.h
test.p
p
Definition:
test.py:228
art::Event
Definition:
Event.h:40
art::PtrVector
Definition:
fwd.h:28
art::EDAnalyzer
Definition:
EDAnalyzer.h:22
InputTag.h
arttest::DeferredIsReadyWithAssnsAnalyzer::analyze
void analyze(art::Event const &e) override
Definition:
DeferredIsReadyWithAssnsAnalyzer_module.cc:41
Event.h
art::get
auto const & get(AssnsNode< L, R, D > const &r)
Definition:
AssnsNode.h:115
Run.h
art::Ptr
Definition:
fwd.h:26
train_cnn.h
h
training ###############################
Definition:
train_cnn.py:186
fhicl::ParameterSet
Definition:
ParameterSet.h:34
Generated by
1.8.11