Belle II Software  release-05-02-19
TOPNtupleModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 #include <string>
15 #include <top/modules/TOPNtuple/NtupleStructure.h>
16 
17 #include <TFile.h>
18 #include <TTree.h>
19 
20 namespace Belle2 {
30  class TOPNtupleModule : public Module {
31 
32  public:
33 
38 
42  virtual ~TOPNtupleModule();
43 
48  virtual void initialize() override;
49 
54  virtual void beginRun() override;
55 
59  virtual void event() override;
60 
65  virtual void endRun() override;
66 
71  virtual void terminate() override;
72 
73  private:
74 
75  std::string m_outputFileName;
77  TFile* m_file = 0;
78  TTree* m_tree = 0;
81  };
82 
84 } // Belle2 namespace
85 
Belle2::TOPNtupleModule::m_tree
TTree * m_tree
TTree with TOPTree structure.
Definition: TOPNtupleModule.h:86
Belle2::TOPNtupleModule::m_outputFileName
std::string m_outputFileName
output file name (root file)
Definition: TOPNtupleModule.h:83
Belle2::TOPNtupleModule::m_file
TFile * m_file
TFile.
Definition: TOPNtupleModule.h:85
Belle2::TOPNtupleModule::m_top
TOP::TOPTree m_top
ntuple structure
Definition: TOPNtupleModule.h:87
Belle2::TOPNtupleModule::event
virtual void event() override
Event processor.
Definition: TOPNtupleModule.cc:123
Belle2::TOPNtupleModule::terminate
virtual void terminate() override
Termination action.
Definition: TOPNtupleModule.cc:236
Belle2::TOPNtupleModule::beginRun
virtual void beginRun() override
Called when entering a new run.
Definition: TOPNtupleModule.cc:119
Belle2::TOPNtupleModule::endRun
virtual void endRun() override
End-of-run action.
Definition: TOPNtupleModule.cc:232
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPNtupleModule::~TOPNtupleModule
virtual ~TOPNtupleModule()
Destructor.
Definition: TOPNtupleModule.cc:64
Belle2::TOP::TOPTree
Structure of a flat ntuple.
Definition: NtupleStructure.h:92
Belle2::TOPNtupleModule::initialize
virtual void initialize() override
Initialize the Module.
Definition: TOPNtupleModule.cc:68
Belle2::TOPNtupleModule::TOPNtupleModule
TOPNtupleModule()
Constructor.
Definition: TOPNtupleModule.cc:53