Belle II Software
release-05-01-25
DummyCollectorModule.cc
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2019 - Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: David Dossett *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#include <calibration/modules/DummyCollector/DummyCollectorModule.h>
12
13
#include <TTree.h>
14
#include <TH1I.h>
15
16
using namespace
Belle2
;
17
18
//-----------------------------------------------------------------
19
// Register the Module
20
//-----------------------------------------------------------------
21
REG_MODULE
(DummyCollector)
22
23
//-----------------------------------------------------------------
24
// Implementation
25
//-----------------------------------------------------------------
26
27
DummyCollectorModule
::
DummyCollectorModule
() :
CalibrationCollectorModule
()
28
{
29
// Set module properties
30
setDescription(
"Dummy module for running when you don't really need output."
);
31
}
32
33
void
DummyCollectorModule::prepare
()
34
{
35
auto
hist =
new
TH1I(
"histogram"
,
"Number of times hist->Fill() was called."
, 1, 0., 1.);
36
registerObject<TH1I>(
"DummyHist"
, hist);
37
}
38
39
void
DummyCollectorModule::collect
()
40
{
41
getObjectPtr<TH1I>(
"DummyHist"
)->Fill(0.5);
42
}
Belle2::CalibrationCollectorModule
Calibration collector module base class.
Definition:
CalibrationCollectorModule.h:44
Belle2::DummyCollectorModule::collect
virtual void collect() override
Replacement for event(). Fill you calibration data objects here.
Definition:
DummyCollectorModule.cc:39
Belle2::DummyCollectorModule
Basically empty Collector, makes only a tiny amount of output data.
Definition:
DummyCollectorModule.h:32
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition:
Module.h:652
Belle2::DummyCollectorModule::prepare
virtual void prepare() override
Replacement for initialize(). Register calibration dataobjects here as well.
Definition:
DummyCollectorModule.cc:33
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
calibration
modules
DummyCollector
src
DummyCollectorModule.cc
Generated on Fri Nov 5 2021 03:48:19 for Belle II Software by
1.8.17