18#ifndef COMMON_HMPIDCODER2_H_
19#define COMMON_HMPIDCODER2_H_
35#include <fairlogger/Logger.h>
40#define RAWBLOCKDIMENSION_W 2048
41#define HEADERDIMENSION_W 16
42#define PAYLOADDIMENSION_W 2032
43#define PAYLOADMAXSPACE_W 2028
46#define CHARGE_CONST 150
47#define CHARGE_RAND_MAX 400
72 uint32_t* mPayloadBufferPtr;
76 int mPayloadBufferDimPerEquipment;
78 bool mSkipEmptyEvents;
79 std::unique_ptr<uint32_t[]> mUPayloadBufferPtr;
80 std::unique_ptr<uint32_t[]> mUPadMap;
106 mSkipEmptyEvents = Skip;
110 return (mSkipEmptyEvents);
115 void openOutputStream(
const std::string& outputFileName,
const std::string& fileFor);
119 void dumpResults(
const std::string& outputFileName);
122 int getEquipmentPadIndex(
int eq,
int col,
int dil,
int cha);
123 void fillTheOutputBuffer(uint32_t* padMap);
124 void writePaginatedEvent(uint32_t
orbit, uint16_t
bc);
125 void setRDHFields(
int eq = -1);
Utility class to write detectors data to (multiple) raw data file(s) respecting CRU format.
static constexpr int MAXEQUIPMENTS
void codeEventChunkDigits(std::vector< o2::hmpid::Digit > &digits, InteractionRecord ir)
bool getSkipEmptyEvents()
o2::raw::RawFileWriter & getWriter()
void dumpResults(const std::string &outputFileName)
Dumps the results of the last coding.
int getNumberOfEquipments()
void setSkipEmptyEvents(bool Skip)
void setDetectorSpecificFields(float BusyTime=0.001, int Error=0, int Version=9)
void openOutputStream(const std::string &outputFileName, const std::string &fileFor)
void closeOutputStream()
Close and flush the output streams.
virtual ~HmpidCoder2()=default
void setVerbosity(int Level)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::InteractionRecord ir(0, 0)
std::vector< Digit > digits