Belle II Software  release-05-02-19
SwitchDataStoreModule.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Christian Pulvermacher *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <framework/core/Module.h>
14 
15 namespace Belle2 {
21  class SwitchDataStoreModule : public Module {
22 
23  public:
24 
31  void init(const std::string& to, bool doCopy, const std::vector<std::string>& mergeBack);
32 
34 
35  virtual void initialize() override;
36  virtual void beginRun() override;
37  virtual void endRun() override;
38  virtual void event() override;
39  virtual void terminate() override;
40 
41  private:
42  std::string m_from;
43  std::string m_to;
44  bool m_doCopy;
45  std::vector<std::string>
46  m_mergeBack;
47  };
49 }
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SwitchDataStoreModule::beginRun
virtual void beginRun() override
Called when entering a new run.
Definition: SwitchDataStoreModule.cc:74
Belle2::SwitchDataStoreModule::m_doCopy
bool m_doCopy
should data be copied to m_to?
Definition: SwitchDataStoreModule.h:52
Belle2::SwitchDataStoreModule::event
virtual void event() override
This method is the core of the module.
Definition: SwitchDataStoreModule.cc:82
Belle2::SwitchDataStoreModule::terminate
virtual void terminate() override
This method is called at the end of the event processing.
Definition: SwitchDataStoreModule.cc:62
Belle2::SwitchDataStoreModule::endRun
virtual void endRun() override
This method is called if the current run ends.
Definition: SwitchDataStoreModule.cc:78
Belle2::SwitchDataStoreModule
Internal module used by Path.add_independent_path().
Definition: SwitchDataStoreModule.h:29
Belle2::SwitchDataStoreModule::m_to
std::string m_to
active DataStore ID after this module.
Definition: SwitchDataStoreModule.h:51
Belle2::SwitchDataStoreModule::SwitchDataStoreModule
SwitchDataStoreModule()
Constructor.
Definition: SwitchDataStoreModule.cc:21
Belle2::SwitchDataStoreModule::init
void init(const std::string &to, bool doCopy, const std::vector< std::string > &mergeBack)
setter for Path.
Definition: SwitchDataStoreModule.cc:32
Belle2::SwitchDataStoreModule::m_from
std::string m_from
active DataStore ID before this module.
Definition: SwitchDataStoreModule.h:50
Belle2::SwitchDataStoreModule::m_mergeBack
std::vector< std::string > m_mergeBack
list of obj/arrays (of event durability) that should be copied to m_to regardless of m_doCopy.
Definition: SwitchDataStoreModule.h:54
Belle2::SwitchDataStoreModule::initialize
virtual void initialize() override
Initialize the Module.
Definition: SwitchDataStoreModule.cc:39