Belle II Software prerelease-10-00-00a
MasterClassModule.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/core/Module.h>
12#include <mdst/dataobjects/ECLCluster.h>
13#include <mdst/dataobjects/Track.h>
14#include <framework/datastore/StoreArray.h>
15
16#include "TFile.h"
17#include "TTree.h"
18
19#include "masterclass/dataobjects/BEvent.h"
20
21
22namespace Belle2 {
27
34 class MasterClassModule : public Module {
35
36 public:
37
42
44 virtual void initialize() override;
45
47 virtual void event() override;
48
50 virtual void terminate() override;
51
52 private:
53
56 std::string m_filename;
57 TFile* m_file = 0;
58 TTree* m_tree = 0;
59 int m_index = 0;
61 };
62
64}
65
The Class for Masterclass event parameters.
Definition BEvent.h:19
virtual void initialize() override
Register input and output data.
BEvent * m_event
output event object
StoreArray< ECLCluster > m_clusters
Cluster objects.
virtual void event() override
Write out particles.
virtual void terminate() override
Close ntuple.
StoreArray< Track > m_tracks
Track objects.
TFile * m_file
root ntuple file
MasterClassModule()
Constructor: Sets the description, the properties and the parameters of the module.
std::string m_filename
output file name
Module()
Constructor.
Definition Module.cc:30
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Abstract base class for different kinds of events.