23#ifndef RestCore_TRestRawMultiCoBoAsAdToSignalProcess
24#define RestCore_TRestRawMultiCoBoAsAdToSignalProcess
28#include "TRestRawSignalEvent.h"
29#include "TRestRawToSignalProcess.h"
36 for (
bool& m : chHit) m = kFALSE;
37 for (
auto& m : data) {
52struct CoBoHeaderFrame {
54 for (
unsigned char& m : frameHeader) {
59 eventIdx = (
unsigned int)4294967294;
61 UChar_t frameHeader[256];
63 unsigned int frameSize;
64 unsigned int frameType;
65 unsigned int revision;
66 unsigned int headerSize;
67 unsigned int itemSize;
69 unsigned int eventIdx;
71 unsigned int readOffset;
80 std::cout <<
"------ Frame Header ------" << std::endl;
81 std::cout <<
"frameSize " << frameSize << std::endl;
83 std::cout <<
"frameType " << frameType << std::endl;
84 std::cout <<
"revision " << revision << std::endl;
85 std::cout <<
"headerSize " << headerSize << std::endl;
86 std::cout <<
"itemSize " << itemSize << std::endl;
87 std::cout <<
"nItems " << nItems << std::endl;
88 std::cout <<
"eventTime " << eventTime << std::endl;
89 std::cout <<
"eventIdx " << eventIdx << std::endl;
91 std::cout <<
"asadIdx " << asadIdx << std::endl;
92 std::cout <<
"readOffset " << readOffset << std::endl;
93 std::cout <<
"status " << status << std::endl;
102 UChar_t frameDataP[2048];
107 std::map<int, CoBoDataFrame> fDataFrame;
118 Bool_t AddInputFile(
const std::string& file)
override;
122 Bool_t InitializeStartTimeStampFromFilename(TString fName);
128 Bool_t FillBuffer(Int_t n);
132 bool ReadFrameHeader(CoBoHeaderFrame& Frame);
134 bool ReadFrameDataP(FILE* f, CoBoHeaderFrame& hdr);
135 bool ReadFrameDataF(CoBoHeaderFrame& hdr);
145 const char* GetProcessName()
const override {
return "RawMultiCoBoAsAdToSignal"; }
A base class for any REST event.
UChar_t frameDataF[278528]
///for partial readout data frame
TRestEvent * ProcessEvent(TRestEvent *inputEvent) override
Process one event.
void Initialize() override
Making default settings.
int fCurrentEvent
///reserves a header frame for each file
TTimeStamp fStartTimeStamp
///for full readout data frame
void EndProcess() override
To be executed at the end of the run (outside event loop)
void InitProcess() override
To be executed at the beginning of the run (outside event loop)
std::vector< CoBoHeaderFrame > fHeaderFrame
///asadId, dataframe
It defines a Short_t array with a physical parameter that evolves in time using a fixed time bin.
A base class for any process reading a binary external file as input to REST.