Belle II Software development
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 {
31 class MasterClassModule : public Module {
32
33 public:
34
39
41 virtual void initialize() override;
42
44 virtual void event() override;
45
47 virtual void terminate() override;
48
49 private:
50
53 std::string m_filename;
54 TFile* m_file = 0;
55 TTree* m_tree = 0;
56 int m_index = 0;
58 };
59
61}
62
The Class for Masterclass event parameters.
Definition: BEvent.h:19
Module to write out data in a format for Belle II masterclasses.
TTree * m_tree
output tree
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
Base class for Modules.
Definition: Module.h:72
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Abstract base class for different kinds of events.