9#include <svd/modules/svdDump/svdDumpModule.h>
11#include <framework/logging/Logger.h>
44 B2INFO(
"svdDumpModule: initialize() is called.");
52 B2FATAL(
"Output file: " <<
m_outputFileName.c_str() <<
" cannot be opened.");
60 B2INFO(
"svdDumpModule: terminate() is called.");
71 B2INFO(
"svdDumpModule: beginRun() is called.");
76 B2INFO(
"svdDumpModule: endRun() is called.");
83 unsigned int total_nWords = 0;
84 for (
int i = 0; i < rawSVD.
getEntries(); i++) {
85 for (
int j = 0; j < rawSVD[ i ]->GetNumEntries(); j++) {
86 unsigned int nWords = rawSVD[i]->Get1stDetectorNwords(j);
91 total_nWords += remaining_nWords;
94 uint32_t header = 0xf;
96 header |= ((total_nWords & 0xffff) << 12) + (
m_event & 0xfff);
99 for (
int i = 0; i < rawSVD.
getEntries(); i++) {
100 for (
int j = 0; j < rawSVD[ i ]->GetNumEntries(); j++) {
102 unsigned int nWords = rawSVD[i]->Get1stDetectorNwords(j);
105 uint32_t* data32 = (uint32_t*)rawSVD[i]->Get1stDetectorBuffer(j);
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_HistogramManager
This module is used to manage histograms accumulated by other modules.
Accessor to arrays stored in the data store.
int getEntries() const
Get the number of objects in the array.
std::string m_svdRawName
raw name
StoreArray< RawSVD > m_rawSVD
Array for RawSVD.
virtual void initialize() override
module functions
virtual void event() override
dump RawSVDs
int m_nFtbTrailer
FTB trailer.
virtual void endRun() override
print end run
virtual void terminate() override
write output file
std::ofstream * m_outputFile
output file.
virtual void beginRun() override
print begin run
int m_nFtbHeader
FTB header.
svdDumpModule()
Constructor and Destructor.
unsigned long m_event
event number
std::string m_outputFileName
Name of output file.
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.