10#include <analysis/modules/RestOfEventPrinter/RestOfEventPrinterModule.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
17#include <framework/logging/Logger.h>
20#include <analysis/dataobjects/RestOfEvent.h>
21#include <mdst/dataobjects/MCParticle.h>
41 setDescription(
"Prints basic or detailed RestOfEvent info to screen. It is possible to print out ROEMasks for specific mask names as well.");
45 std::vector<std::string> emptyVector;
47 addParam(
"maskNames",
m_maskNames,
"List of all mask names for which the info will be printed.", emptyVector);
59 B2INFO(
"[RestOfEventPrinterModule] START ----------------------------------------");
71 relatedMCPDG = mcpart->getPDG();
76 B2INFO(
" - " <<
"ROE related to particle with" <<
LogVar(
"PDG", relatedPDG));
77 B2INFO(
" - " <<
"ROE related to MC particle with" <<
LogVar(
"PDG", relatedMCPDG));
82 if (!roe->hasMask(maskName))
continue;
83 B2INFO(
" - " <<
"Info for ROEMask with name: \'" << maskName <<
"\'");
91 B2ERROR(
"RestOfEvent object not valid! Did you build ROE?");
93 B2INFO(
"[RestOfEventPrinterModule] END ------------------------------------------");
98 for (
auto* particle : maskParticles) {
A Class to store the Monte Carlo particle information.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Class to store reconstructed particles.
int getPDGCode(void) const
Returns PDG code.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
bool m_fullPrint
True: Print whole masks content.
virtual void initialize() override
Initialize the Module.
virtual void event() override
Event processor.
std::vector< std::string > m_maskNames
List of all mask names for which the info will be printed.
bool m_unpackComposites
True: Replace composite particles or V0 by their daughters, default is true.
RestOfEventPrinterModule()
Constructor.
void printMaskParticles(const std::vector< const Particle * > &maskParticles) const
Prints out values of the specific ROE mask.
static constexpr const char * c_defaultMaskName
Default mask name.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
Type-safe access to single objects in the data store.
bool isValid() const
Check whether the object was created.
Class to store variables with their name which were sent to the logging service.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Abstract base class for different kinds of events.