Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
protoduneana
protoduneana
TutorialExamples
ClusterCounter_module.cc
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
// Class: ClusterCounter
3
// Module Type: analyzer
4
// File: ClusterCounter_module.cc
5
//
6
// Just an empty module, outputs the event number.
7
// Robert Sulej
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 "
fhiclcpp/ParameterSet.h
"
17
#include "
messagefacility/MessageLogger/MessageLogger.h
"
18
19
namespace
tutorial
{
20
21
class
ClusterCounter :
public
art::EDAnalyzer
{
22
public
:
23
explicit
ClusterCounter
(
fhicl::ParameterSet
const
&
p
);
24
25
// Plugins should not be copied or assigned.
26
ClusterCounter
(
ClusterCounter
const
&) =
delete
;
27
ClusterCounter
(
ClusterCounter
&&) =
delete
;
28
ClusterCounter
&
operator =
(
ClusterCounter
const
&) =
delete
;
29
ClusterCounter
&
operator =
(
ClusterCounter
&&) =
delete
;
30
31
// Required functions.
32
void
analyze
(
art::Event
const
&
e
)
override
;
33
34
private
:
35
};
36
37
ClusterCounter::ClusterCounter
(
fhicl::ParameterSet
const
&
p
) :
EDAnalyzer
(p) {}
38
39
void
ClusterCounter::analyze
(
art::Event
const
&
e
)
40
{
41
std::cout <<
"ClusterCounter module on event #"
<< e.
id
().
event
() <<
std::endl
;
42
}
43
44
}
// tutorial namespace
45
46
DEFINE_ART_MODULE
(
tutorial::ClusterCounter
)
Handle.h
art::EDAnalyzer::EDAnalyzer
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition:
EDAnalyzer.h:25
tutorial::ClusterCounter::analyze
void analyze(art::Event const &e) override
Definition:
ClusterCounter5_module.cc:112
tutorial::ClusterCounter::operator=
ClusterCounter & operator=(ClusterCounter const &)=delete
MessageLogger.h
ParameterSet.h
e
const double e
Definition:
gUpMuFluxGen.cxx:165
DEFINE_ART_MODULE
#define DEFINE_ART_MODULE(klass)
Definition:
ModuleMacros.h:67
test.p
p
Definition:
test.py:223
SubRun.h
EDAnalyzer.h
ModuleMacros.h
tutorial::ClusterCounter
Definition:
ClusterCounter5_module.cc:34
art::Event
Definition:
Event.h:22
art::EDAnalyzer
Definition:
EDAnalyzer.h:20
art::EventID::event
EventNumber_t event() const
Definition:
EventID.h:116
Event.h
Run.h
tutorial::ClusterCounter::ClusterCounter
ClusterCounter(Parameters const &config)
Definition:
ClusterCounter5_module.cc:91
art::Event::id
EventID id() const
Definition:
Event.cc:34
tutorial
Definition:
ClusterCounter2_module.cc:25
endl
QTextStream & endl(QTextStream &s)
Definition:
qtextstream.cpp:2030
fhicl::ParameterSet
Definition:
ParameterSet.h:36
Generated by
1.8.11