Belle II Software
release-05-01-25
OnlyWriteOutParticleLists.cc
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2017 - Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: James Kahn, Martin Ritter *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#include <analysis/modules/OnlyWriteOutParticleLists/OnlyWriteOutParticleLists.h>
12
#include <framework/datastore/DataStore.h>
13
#include <analysis/dataobjects/ParticleList.h>
14
15
using namespace
Belle2
;
16
17
REG_MODULE
(OnlyWriteOutParticleLists)
18
19
OnlyWriteOutParticleListsModule
::
OnlyWriteOutParticleListsModule
()
20
{
21
setDescription(
"Marks all objects in DataStore except those of type ParticleList as WrtieOut=False. Intedend to run before outputting an index file to remove unecessary arrays."
);
22
}
23
24
void
OnlyWriteOutParticleListsModule::initialize
()
25
{
26
for
(
auto
& entry :
DataStore::Instance
().getStoreEntryMap(
DataStore::c_Event
)) {
27
entry.second.dontWriteOut = entry.second.objClass != ParticleList::Class();
28
}
29
}
30
31
32
33
Belle2::DataStore::Instance
static DataStore & Instance()
Instance of singleton Store.
Definition:
DataStore.cc:54
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition:
Module.h:652
Belle2::OnlyWriteOutParticleListsModule::initialize
virtual void initialize() override
Initialises the module.
Definition:
OnlyWriteOutParticleLists.cc:24
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::OnlyWriteOutParticleListsModule
Marks all objects in DataStore except those of type ParticleList as WrtieOut=False.
Definition:
OnlyWriteOutParticleLists.h:31
Belle2::DataStore::c_Event
@ c_Event
Different object in each event, all objects/arrays are invalidated after event() function has been ca...
Definition:
DataStore.h:61
analysis
modules
OnlyWriteOutParticleLists
src
OnlyWriteOutParticleLists.cc
Generated on Fri Nov 5 2021 03:45:38 for Belle II Software by
1.8.17