Belle II Software  release-05-02-19
BGOverlayInputModule.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 <framework/datastore/DataStore.h>
15 #include <string>
16 #include "TChain.h"
17 
18 namespace Belle2 {
28  class BGOverlayInputModule : public Module {
29 
30  public:
31 
36 
40  virtual ~BGOverlayInputModule();
41 
46  virtual void initialize() override;
47 
52  virtual void beginRun() override;
53 
57  virtual void event() override;
58 
63  virtual void endRun() override;
64 
69  virtual void terminate() override;
70 
71  private:
72 
73  typedef std::vector<DataStore::StoreEntry*> StoreEntries;
82 
83 
84  std::vector<std::string> m_inputFileNames;
85  std::string m_extensionName;
86  std::string m_BackgroundInfoInstanceName = "";
88  TChain* m_tree = 0;
89  unsigned m_numEvents = 0;
90  unsigned m_eventCount = 0;
91  unsigned m_firstEvent = 0;
92  bool m_start = true;
94  unsigned m_index = 0;
96  };
97 
99 } // Belle2 namespace
100 
Belle2::BGOverlayInputModule::m_tree
TChain * m_tree
tree pointer
Definition: BGOverlayInputModule.h:96
Belle2::BGOverlayInputModule::m_extensionName
std::string m_extensionName
name added to default branch names
Definition: BGOverlayInputModule.h:93
Belle2::BGOverlayInputModule::m_firstEvent
unsigned m_firstEvent
randomly choosen first event (tree entry)
Definition: BGOverlayInputModule.h:99
Belle2::BGOverlayInputModule::~BGOverlayInputModule
virtual ~BGOverlayInputModule()
Destructor.
Definition: BGOverlayInputModule.cc:68
Belle2::BGOverlayInputModule::BGOverlayInputModule
BGOverlayInputModule()
Constructor.
Definition: BGOverlayInputModule.cc:54
Belle2::BGOverlayInputModule::beginRun
virtual void beginRun() override
Called when entering a new run.
Definition: BGOverlayInputModule.cc:130
Belle2::BGOverlayInputModule::event
virtual void event() override
Event processor.
Definition: BGOverlayInputModule.cc:135
Belle2::BGOverlayInputModule::m_eventCount
unsigned m_eventCount
current event (tree entry)
Definition: BGOverlayInputModule.h:98
Belle2::BGOverlayInputModule::endRun
virtual void endRun() override
End-of-run action.
Definition: BGOverlayInputModule.cc:167
Belle2::BGOverlayInputModule::m_numEvents
unsigned m_numEvents
number of events (tree entries) in the sample
Definition: BGOverlayInputModule.h:97
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::BGOverlayInputModule::m_storeEntries
StoreEntries m_storeEntries
store entries with connected branches
Definition: BGOverlayInputModule.h:101
Belle2::BGOverlayInputModule::initialize
virtual void initialize() override
Initialize the Module.
Definition: BGOverlayInputModule.cc:72
Belle2::BGOverlayInputModule::m_start
bool m_start
flag denoting first call of event function
Definition: BGOverlayInputModule.h:100
Belle2::BGOverlayInputModule::m_inputFileNames
std::vector< std::string > m_inputFileNames
list of file names
Definition: BGOverlayInputModule.h:92
Belle2::BGOverlayInputModule::m_BackgroundInfoInstanceName
std::string m_BackgroundInfoInstanceName
name BackgroundInfo name
Definition: BGOverlayInputModule.h:94
Belle2::BGOverlayInputModule::connectBranches
bool connectBranches()
Connect branches of the given event tree to the data store, except EventMetaData and all relations.
Definition: BGOverlayInputModule.cc:179
Belle2::BGOverlayInputModule::terminate
virtual void terminate() override
Termination action.
Definition: BGOverlayInputModule.cc:171
Belle2::BGOverlayInputModule::StoreEntries
std::vector< DataStore::StoreEntry * > StoreEntries
DataStore entries.
Definition: BGOverlayInputModule.h:81
Belle2::BGOverlayInputModule::m_index
unsigned m_index
index of BackgroundDescr in BackgroundInfo object
Definition: BGOverlayInputModule.h:102