diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 4af7d2935..62948dbd1 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -31,6 +31,8 @@ Syndikus, Ina Taniuchi, Ryo Tscheuschner, Joachim Wang, Yanzhao +Whitehead, Matthew Wongel, Alicia Xarepe, Manuel Zanetti, Lorenzo + diff --git a/r3bdata/CMakeLists.txt b/r3bdata/CMakeLists.txt index 279038f97..27e38affc 100755 --- a/r3bdata/CMakeLists.txt +++ b/r3bdata/CMakeLists.txt @@ -57,6 +57,7 @@ ${R3BROOT_SOURCE_DIR}/r3bdata/frsData ${R3BROOT_SOURCE_DIR}/r3bdata/rpcData ${R3BROOT_SOURCE_DIR}/r3bdata/mwpcData ${R3BROOT_SOURCE_DIR}/r3bdata/twimData +${R3BROOT_SOURCE_DIR}/r3bdata/ttt10Data ${R3BROOT_SOURCE_DIR}/r3bdata/musliData ${R3BROOT_SOURCE_DIR}/r3bdata/synccheckData ) @@ -207,6 +208,7 @@ twimData/R3BTwimPoint.cxx twimData/R3BTwimMappedData.cxx twimData/R3BTwimCalData.cxx twimData/R3BTwimHitData.cxx +ttt10Data/R3BTTTXMappedData.cxx musliData/R3BMusliMappedData.cxx musliData/R3BMusliCalData.cxx musliData/R3BMusliHitData.cxx diff --git a/r3bdata/DataLinkDef.h b/r3bdata/DataLinkDef.h index f7c3e7a86..3cb0b0777 100755 --- a/r3bdata/DataLinkDef.h +++ b/r3bdata/DataLinkDef.h @@ -85,6 +85,8 @@ #pragma link C++ class R3BTwimHitData+; #pragma link C++ class R3BTwimPoint+; +#pragma link C++ class R3BTTTXMappedData+; + #pragma link C++ class R3BMusliMappedData+; #pragma link C++ class R3BMusliCalData+; #pragma link C++ class R3BMusliHitData+; diff --git a/r3bdata/ttt10Data/R3BTTTXMappedData.cxx b/r3bdata/ttt10Data/R3BTTTXMappedData.cxx new file mode 100644 index 000000000..73b85f1a2 --- /dev/null +++ b/r3bdata/ttt10Data/R3BTTTXMappedData.cxx @@ -0,0 +1,44 @@ +/****************************************************************************** + * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH * + * Copyright (C) 2019-2023 Members of R3B Collaboration * + * * + * This software is distributed under the terms of the * + * GNU General Public Licence (GPL) version 3, * + * copied verbatim in the file "LICENSE". * + * * + * In applying this license GSI does not waive the privileges and immunities * + * granted to it by virtue of its status as an Intergovernmental Organization * + * or submit itself to any jurisdiction. * + ******************************************************************************/ + +// ------------------------------------------------------------------------- +// ----- R3BTTTXMappedData source file ----- +// ------------------------------------------------------------------------- + +#include "R3BTTTXMappedData.h" + +// ----- Default constructor ------------------------------------------- +R3BTTTXMappedData::R3BTTTXMappedData() + : fDetID(0) + , fStripID(0) + , fTime(0) + , fEnergy(0) + , fPileup(kFALSE) + , fOverflow(kFALSE) +{ +} +// ------------------------------------------------------------------------- + +// ----- Standard constructor ------------------------------------------ +R3BTTTXMappedData::R3BTTTXMappedData(UInt_t DetID, UInt_t StripID, Int_t time, Int_t energy, Bool_t pu, Bool_t ov) + : fDetID(DetID) + , fStripID(StripID) + , fTime(time) + , fEnergy(energy) + , fPileup(pu) + , fOverflow(ov) +{ +} +// ------------------------------------------------------------------------- + +ClassImp(R3BTTTXMappedData); diff --git a/r3bdata/ttt10Data/R3BTTTXMappedData.h b/r3bdata/ttt10Data/R3BTTTXMappedData.h new file mode 100644 index 000000000..699114f5c --- /dev/null +++ b/r3bdata/ttt10Data/R3BTTTXMappedData.h @@ -0,0 +1,69 @@ +/****************************************************************************** + * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH * + * Copyright (C) 2019-2023 Members of R3B Collaboration * + * * + * This software is distributed under the terms of the * + * GNU General Public Licence (GPL) version 3, * + * copied verbatim in the file "LICENSE". * + * * + * In applying this license GSI does not waive the privileges and immunities * + * granted to it by virtue of its status as an Intergovernmental Organization * + * or submit itself to any jurisdiction. * + ******************************************************************************/ + +// ------------------------------------------------------------------- +// ----- R3BTTTXMappedData header file ----- +// ----- Created 01/12/2023 by M. Whitehead ----- +// ------------------------------------------------------------------- + +#ifndef R3BTTTXMappedData_H +#define R3BTTTXMappedData_H 1 + +#include "TObject.h" + +class R3BTTTXMappedData : public TObject +{ + public: + /** Default constructor **/ + R3BTTTXMappedData(); + + /** Constructor with arguments + *@param DetID Detector ID + *@param StripID Strip ID attention 1-based ! + *@param time Time [channels] + *@param energy Energy deposited on strip [channels] + **/ + R3BTTTXMappedData(UInt_t DetID, UInt_t StripID, Int_t time, Int_t energy, Bool_t pu, Bool_t ov); + + /** Destructor **/ + virtual ~R3BTTTXMappedData() {} + + /** Accessors **/ + inline const UInt_t& GetDetID() const { return fDetID; } + inline const UInt_t& GetStripID() const { return fStripID; } + inline const Int_t& GetTime() const { return fTime; } + inline const Int_t& GetEnergy() const { return fEnergy; } + inline const Bool_t& GetPileupStatus() const { return fPileup; } + inline const Bool_t& GetOverflowStatus() const { return fOverflow; } + + /** Modifiers **/ + void SetDetID(UInt_t id) { fDetID = id; }; + void SetStripID(UInt_t id) { fStripID = id; }; + void SetTime(Int_t time) { fTime = time; }; + void SetEnergy(Int_t energy) { fEnergy = energy; }; + void SetPileup(Bool_t pu) { fPileup = pu; } + void SetOverflow(Bool_t ov) { fOverflow = ov; } + + protected: + UInt_t fDetID; + UInt_t fStripID; + Int_t fTime; + Int_t fEnergy; + Bool_t fPileup; + Bool_t fOverflow; + + public: + ClassDef(R3BTTTXMappedData, 1) +}; + +#endif diff --git a/r3bsource/CMakeLists.txt b/r3bsource/CMakeLists.txt index 0e4b3a987..4627594e4 100644 --- a/r3bsource/CMakeLists.txt +++ b/r3bsource/CMakeLists.txt @@ -73,6 +73,7 @@ ${R3BROOT_SOURCE_DIR}/r3bdata/rpcData ${R3BROOT_SOURCE_DIR}/r3bdata/trloiiData ${R3BROOT_SOURCE_DIR}/r3bdata/musicData ${R3BROOT_SOURCE_DIR}/r3bdata/twimData +${R3BROOT_SOURCE_DIR}/r3bdata/ttt10Data ${R3BROOT_SOURCE_DIR}/r3bdata/musliData ${R3BROOT_SOURCE_DIR}/r3bdata/mwpcData ${R3BROOT_SOURCE_DIR}/r3bdata/sampData @@ -146,6 +147,7 @@ set(SRCS ./music/R3BMusicReader.cxx ./rpc/R3BRpcReader.cxx ./twim/R3BTwimReader.cxx +./ttt10/R3BTTTXReader.cxx ./musli/R3BMusliReader.cxx ./mwpc/R3BMwpcReader.cxx ./sync_check/R3BSyncCheckReader.cxx @@ -209,6 +211,7 @@ Set(STRUCT_HEADERS ./alpide/ext_h101_alpide.h ./music/ext_h101_music.h ./twim/ext_h101_twim.h +./ttt10/ext_h101_ttt10.h ./musli/ext_h101_musli.h ./mwpc/ext_h101_mwpc.h ./trloii/ext_h101_samp.h diff --git a/r3bsource/SourceLinkDef.h b/r3bsource/SourceLinkDef.h index 61149f631..7dd941340 100644 --- a/r3bsource/SourceLinkDef.h +++ b/r3bsource/SourceLinkDef.h @@ -76,6 +76,7 @@ #pragma link C++ class R3BCalifaJulichReader+; #pragma link C++ class R3BRpcReader+; #pragma link C++ class R3BTwimReader+; +#pragma link C++ class R3BTTTXReader+; #pragma link C++ class R3BMusliReader+; #pragma link C++ class R3BMwpcReader+; #pragma link C++ class R3BSyncCheckReader+; @@ -134,6 +135,7 @@ #pragma link C++ class EXT_STR_h101_TIMESTAMP_PSPX_onion_t; #pragma link C++ class EXT_STR_h101_MUSIC_onion_t; #pragma link C++ class EXT_STR_h101_SOFTWIM_onion_t; +#pragma link C++ class EXT_STR_h101_TTTX_onion_t; #pragma link C++ class EXT_STR_h101_SOFMWPC_onion_t; #pragma link C++ class EXT_STR_h101_MUSLI_onion_t; #pragma link C++ class EXT_STR_h101_SAMP_onion_t; diff --git a/r3bsource/ttt10/R3BTTTXReader.cxx b/r3bsource/ttt10/R3BTTTXReader.cxx new file mode 100644 index 000000000..9652cbe36 --- /dev/null +++ b/r3bsource/ttt10/R3BTTTXReader.cxx @@ -0,0 +1,225 @@ +/****************************************************************************** + * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH * + * Copyright (C) 2019-2023 Members of R3B Collaboration * + * * + * This software is distributed under the terms of the * + * GNU General Public Licence (GPL) version 3, * + * copied verbatim in the file "LICENSE". * + * * + * In applying this license GSI does not waive the privileges and immunities * + * granted to it by virtue of its status as an Intergovernmental Organization * + * or submit itself to any jurisdiction. * + ******************************************************************************/ + +#include "FairLogger.h" +#include "FairRootManager.h" +#include + +#include "R3BLogger.h" +#include "R3BTTTXMappedData.h" +#include "R3BTTTXReader.h" + +extern "C" +{ +#include "ext_data_client.h" +#include "ext_h101_ttt10.h" +} + +using namespace std; + +R3BTTTXReader::R3BTTTXReader(EXT_STR_h101_TTTX* data, size_t offset) + : R3BReader("R3BTTTXReader") + , fData(data) + , fOffset(offset) + , fOnline(kFALSE) + , fDets(2) + , fChannels(32) + , fTref(1) + , fTtrig(1) + , fPileup(kFALSE) + , fArray(new TClonesArray("R3BTTTXMappedData")) +{ +} + +R3BTTTXReader::~R3BTTTXReader() +{ + R3BLOG(debug1, "Destructor"); + if (fArray) + { + delete fArray; + } +} + +Bool_t R3BTTTXReader::Init(ext_data_struct_info* a_struct_info) +{ + Int_t ok; + R3BLOG(info, ""); + EXT_STR_h101_TTTX_ITEMS_INFO(ok, *a_struct_info, fOffset, EXT_STR_h101_TTTX, 0); + if (!ok) + { + R3BLOG(error, "Failed to setup structure information."); + return kFALSE; + } + + // Register output array in tree + FairRootManager::Instance()->Register("TTTXMappedData", "MappedTTTX", fArray, !fOnline); + + Reset(); + memset(fData, 0, sizeof *fData); + + // clear struct_writer's output struct. Seems ucesb doesn't do that + // for channels that are unknown to the current ucesb config. + // auto* data = (EXT_STR_h101_TTTX_onion*)fData; + auto* data = reinterpret_cast(fData); + if (data == nullptr) + { + R3BLOG(error, "TTTXMappedData NOT FOUND!!!!"); + } + for (int i_det = 0; i_det < fDets; i_det++) + { + data->TTTX_ID[i_det].EM = 0; + data->TTTX_ID[i_det].TM = 0; + data->TTTX_ID[i_det].TREFM = 0; + data->TTTX_ID[i_det].TTRIGM = 0; + } + + return kTRUE; +} + +Bool_t R3BTTTXReader::R3BRead() +{ + // Convert plain raw data to multi-dimensional array + auto* data = reinterpret_cast(fData); + // auto* data = (EXT_STR_h101_TTTX_onion*)fData; + + // loop over all detectors + for (UShort_t i_det = 0; i_det < fDets; i_det++) + { + ReadData(data, i_det); + } + return kTRUE; +} + +void R3BTTTXReader::Reset() +{ + // Reset the output array + fArray->Clear(); +} + +Bool_t R3BTTTXReader::ReadData(EXT_STR_h101_TTTX_onion* data, UShort_t i_det) +{ + Bool_t pileupFLAG = kFALSE; + Bool_t overflowFLAG = kFALSE; + UInt_t multPerChannel[fChannels + fTref + fTtrig]; + for (int i_ch = 0; i_ch < fChannels + fTref + fTtrig; i_ch++) + { + multPerChannel[i_ch] = 0; + } + // --- -------------------------------------- --- // + // --- NUMBER OF CHANNELS TREF, TTRIG, Channels --- // + // --- -------------------------------------- --- // + UShort_t nChannelsTref = data->TTTX_ID[i_det].TREFM; + UShort_t nChannelsTtrig = data->TTTX_ID[i_det].TTRIGM; + UShort_t nChannelsEnergy = data->TTTX_ID[i_det].EM; + UShort_t nChannelsTime = data->TTTX_ID[i_det].TM; + + /* + if ((nChannelsEnergy>0)||(nChannelsTref>0)) { + std::cout << "------------------------------" << std::endl; + std::cout << "R3BTTTXReader::ReadDatai=()" << std::endl; + std::cout << "------------------------------" << std::endl; + std::cout <<" * nChannelsTref = "<< nChannelsTref <TTTX_ID[i_det].TREFMI[i_tref] + fChannels - 1; + nextTref = data->TTTX_ID[i_det].TREFME[i_tref]; + multPerChannel[idChannelTref] = nextTref - curTref; + for (int i_hit = curTref; i_hit < nextTref; i_hit++) + { + new ((*fArray)[fArray->GetEntriesFast()]) + R3BTTTXMappedData(i_det + 1, idChannelTref + 1, data->TTTX_ID[i_det].TREFv[i_hit], 0, false, false); + curTref = nextTref; + } + } + + // --- TTRIG --- // + uint32_t curTtrig = 0; + uint32_t nextTtrig = 0; + UShort_t idChannelTtrig = 0; + + for (UShort_t i_trig = 0; i_trig < nChannelsTtrig; i_trig++) + { + // again TTRIGMI is 1 based + idChannelTtrig = data->TTTX_ID[i_det].TTRIGMI[i_trig] + fChannels - 1 + fTref; + nextTtrig = data->TTTX_ID[i_det].TTRIGME[i_trig]; + multPerChannel[idChannelTtrig] = nextTtrig - curTtrig; + for (int i_hit = curTtrig; i_hit < nextTtrig; i_hit++) + { + new ((*fArray)[fArray->GetEntriesFast()]) + R3BTTTXMappedData(i_det + 1, idChannelTtrig + 1, data->TTTX_ID[i_det].TTRIGv[i_hit], 0, false, false); + curTtrig = nextTtrig; + } + } + + // --- Channels --- // + // return the number of channels in the det with data + // 0<=nChannelsEnergy<32 + // 0<=nChannelsTime<32 + if (nChannelsEnergy != nChannelsTime) + LOG(error) << "R3BTTTXReader::ReadData error ! NOT THE SAME NUMBER OF CHANNELS HITTED IN ENERGY () AND TIME ()"; + + // ENERGY AND TIME ARE SORTED + uint32_t curChannelTimeStart = 0; + // uint32_t curChannelEnergyStart = 0; + for (UShort_t i_ch = 0; i_ch < nChannelsTime; i_ch++) + { + // EMI and TMI give the 1-based channel number + UShort_t idChannelTime = data->TTTX_ID[i_det].TMI[i_ch] - 1; + UShort_t idChannelEnergy = data->TTTX_ID[i_det].EMI[i_ch] - 1; + + if (idChannelEnergy != idChannelTime) + { + LOG(error) << "R3BTTTXReader::ReadData error ! MISMATCH FOR CHANNEL ID IN ENERGY #" << idChannelEnergy + << " AND TIME #" << idChannelTime; + } + uint32_t nextChannelTimeStart = data->TTTX_ID[i_det].TME[i_ch]; + // uint32_t nextChannelEnergyStart = data->TTTX_ID[i_det].EME[i_ch]; + multPerChannel[idChannelTime] = nextChannelTimeStart - curChannelTimeStart; + for (int i_hit = curChannelTimeStart; i_hit < nextChannelTimeStart; i_hit++) + { + // Attention, here the numbering is 0-based for det and channels + pileupFLAG = (data->TTTX_ID[i_det].Ev[i_hit] & 0x00040000) >> 18; + overflowFLAG = (data->TTTX_ID[i_det].Ev[i_hit] & 0x00080000) >> 19; + if (pileupFLAG == kFALSE || !fPileup) + new ((*fArray)[fArray->GetEntriesFast()]) R3BTTTXMappedData(i_det + 1, + idChannelEnergy + 1, + data->TTTX_ID[i_det].Tv[i_hit], + data->TTTX_ID[i_det].Ev[i_hit], + pileupFLAG, + overflowFLAG); + } + // curChannelEnergyStart = nextChannelEnergyStart; + curChannelTimeStart = nextChannelTimeStart; + } // end of loop over the channels from 1 to 32 + + return kTRUE; +} + +ClassImp(R3BTTTXReader); diff --git a/r3bsource/ttt10/R3BTTTXReader.h b/r3bsource/ttt10/R3BTTTXReader.h new file mode 100644 index 000000000..a366e715d --- /dev/null +++ b/r3bsource/ttt10/R3BTTTXReader.h @@ -0,0 +1,76 @@ +/****************************************************************************** + * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH * + * Copyright (C) 2019-2023 Members of R3B Collaboration * + * * + * This software is distributed under the terms of the * + * GNU General Public Licence (GPL) version 3, * + * copied verbatim in the file "LICENSE". * + * * + * In applying this license GSI does not waive the privileges and immunities * + * granted to it by virtue of its status as an Intergovernmental Organization * + * or submit itself to any jurisdiction. * + ******************************************************************************/ + +#ifndef R3BTTTXREADER_H +#define R3BTTTXREADER_H 1 + +#include "R3BReader.h" +#include "TClonesArray.h" +#include + +struct EXT_STR_h101_TTTX_t; +typedef struct EXT_STR_h101_TTTX_t EXT_STR_h101_TTTX; +typedef struct EXT_STR_h101_TTTX_onion_t EXT_STR_h101_TTTX_onion; +class ext_data_struct_info; + +class R3BTTTXReader : public R3BReader +{ + public: + // Standard constructor + R3BTTTXReader(EXT_STR_h101_TTTX*, size_t); + + // Destructor + virtual ~R3BTTTXReader(); + + // Setup structure information + virtual Bool_t Init(ext_data_struct_info*) override; + + // Read data from full event structure + virtual Bool_t R3BRead() override; + + // Reset + virtual void Reset() override; + + // Accessor to select online mode + void SetOnline(Bool_t option) { fOnline = option; } + + // Accessor to select events without pileup + void SetSkipPileup() { fPileup = kTRUE; } + + void SetNumDets(Int_t num) { fDets = num; } + void SetNumChannels(Int_t num) { fChannels = num; } + void SetNumTref(Int_t num) { fTref = num; } + void SetNumTtrig(Int_t num) { fTtrig = num; } + + private: + Bool_t ReadData(EXT_STR_h101_TTTX_onion*, UShort_t); + + /* Reader specific data structure from ucesb */ + EXT_STR_h101_TTTX* fData; + /* Data offset */ + size_t fOffset; + // Don't store data for online + Bool_t fOnline; + /* Geometry */ + Int_t fDets; + Int_t fChannels; + Int_t fTref; + Int_t fTtrig; + Bool_t fPileup; + TClonesArray* fArray; /**< Output array. */ + + public: + ClassDefOverride(R3BTTTXReader, 0); +}; + +#endif // R3BTTTXREADER_H diff --git a/r3bsource/ttt10/ext_h101_ttt10.h b/r3bsource/ttt10/ext_h101_ttt10.h new file mode 100644 index 000000000..181bfb2eb --- /dev/null +++ b/r3bsource/ttt10/ext_h101_ttt10.h @@ -0,0 +1,274 @@ +/******************************************************** + * + * Structure for ext_data_fetch_event() filling. + * + * Do not edit - automatically generated. + */ + +#ifndef __GUARD_H101_TTTX_EXT_H101_TTT10_H__ +#define __GUARD_H101_TTTX_EXT_H101_TTT10_H__ + +#ifndef __CINT__ +#include +#else +/* For CINT (old version trouble with stdint.h): */ +#ifndef uint32_t +typedef unsigned int uint32_t; +typedef int int32_t; +#endif +#endif +#ifndef EXT_STRUCT_CTRL +#define EXT_STRUCT_CTRL(x) +#endif + +/******************************************************** + * + * Plain structure (layout as ntuple/root file): + */ + +typedef struct EXT_STR_h101_TTTX_t +{ + /* RAW */ + uint32_t TTTX_ID1EM /* [1,32] */; + uint32_t TTTX_ID1EMI[32 EXT_STRUCT_CTRL(TTTX_ID1EM)] /* [1,32] */; + uint32_t TTTX_ID1EME[32 EXT_STRUCT_CTRL(TTTX_ID1EM)] /* [1,1024] */; + uint32_t TTTX_ID1E /* [0,1024] */; + uint32_t TTTX_ID1Ev[1024 EXT_STRUCT_CTRL(TTTX_ID1E)] /* [0,1048575] */; + uint32_t TTTX_ID1TM /* [1,32] */; + uint32_t TTTX_ID1TMI[32 EXT_STRUCT_CTRL(TTTX_ID1TM)] /* [1,32] */; + uint32_t TTTX_ID1TME[32 EXT_STRUCT_CTRL(TTTX_ID1TM)] /* [1,1024] */; + uint32_t TTTX_ID1T /* [0,1024] */; + uint32_t TTTX_ID1Tv[1024 EXT_STRUCT_CTRL(TTTX_ID1T)] /* [0,1048575] */; + uint32_t TTTX_ID1TREFM /* [1,1] */; + uint32_t TTTX_ID1TREFMI[1 EXT_STRUCT_CTRL(TTTX_ID1TREFM)] /* [1,1] */; + uint32_t TTTX_ID1TREFME[1 EXT_STRUCT_CTRL(TTTX_ID1TREFM)] /* [1,32] */; + uint32_t TTTX_ID1TREF /* [0,32] */; + uint32_t TTTX_ID1TREFv[32 EXT_STRUCT_CTRL(TTTX_ID1TREF)] /* [0,1048575] */; + uint32_t TTTX_ID1TTRIGM /* [1,1] */; + uint32_t TTTX_ID1TTRIGMI[1 EXT_STRUCT_CTRL(TTTX_ID1TTRIGM)] /* [1,1] */; + uint32_t TTTX_ID1TTRIGME[1 EXT_STRUCT_CTRL(TTTX_ID1TTRIGM)] /* [1,32] */; + uint32_t TTTX_ID1TTRIG /* [0,32] */; + uint32_t TTTX_ID1TTRIGv[32 EXT_STRUCT_CTRL(TTTX_ID1TTRIG)] /* [0,1048575] */; + uint32_t TTTX_ID2EM /* [1,32] */; + uint32_t TTTX_ID2EMI[32 EXT_STRUCT_CTRL(TTTX_ID2EM)] /* [1,32] */; + uint32_t TTTX_ID2EME[32 EXT_STRUCT_CTRL(TTTX_ID2EM)] /* [1,1024] */; + uint32_t TTTX_ID2E /* [0,1024] */; + uint32_t TTTX_ID2Ev[1024 EXT_STRUCT_CTRL(TTTX_ID2E)] /* [0,1048575] */; + uint32_t TTTX_ID2TM /* [1,32] */; + uint32_t TTTX_ID2TMI[32 EXT_STRUCT_CTRL(TTTX_ID2TM)] /* [1,32] */; + uint32_t TTTX_ID2TME[32 EXT_STRUCT_CTRL(TTTX_ID2TM)] /* [1,1024] */; + uint32_t TTTX_ID2T /* [0,1024] */; + uint32_t TTTX_ID2Tv[1024 EXT_STRUCT_CTRL(TTTX_ID2T)] /* [0,1048575] */; + uint32_t TTTX_ID2TREFM /* [1,1] */; + uint32_t TTTX_ID2TREFMI[1 EXT_STRUCT_CTRL(TTTX_ID2TREFM)] /* [1,1] */; + uint32_t TTTX_ID2TREFME[1 EXT_STRUCT_CTRL(TTTX_ID2TREFM)] /* [1,32] */; + uint32_t TTTX_ID2TREF /* [0,32] */; + uint32_t TTTX_ID2TREFv[32 EXT_STRUCT_CTRL(TTTX_ID2TREF)] /* [0,1048575] */; + uint32_t TTTX_ID2TTRIGM /* [1,1] */; + uint32_t TTTX_ID2TTRIGMI[1 EXT_STRUCT_CTRL(TTTX_ID2TTRIGM)] /* [1,1] */; + uint32_t TTTX_ID2TTRIGME[1 EXT_STRUCT_CTRL(TTTX_ID2TTRIGM)] /* [1,32] */; + uint32_t TTTX_ID2TTRIG /* [0,32] */; + uint32_t TTTX_ID2TTRIGv[32 EXT_STRUCT_CTRL(TTTX_ID2TTRIG)] /* [0,1048575] */; + +} EXT_STR_h101_TTTX; + +/******************************************************** + * + * Structure with multiple levels of arrays (partially) + * recovered (recommended): + */ + +typedef struct EXT_STR_h101_TTTX_onion_t +{ + /* RAW */ + struct + { + uint32_t EM; + uint32_t EMI[32 /* EM */]; + uint32_t EME[32 /* EM */]; + uint32_t E; + uint32_t Ev[1024 /* E */]; + uint32_t TM; + uint32_t TMI[32 /* TM */]; + uint32_t TME[32 /* TM */]; + uint32_t T; + uint32_t Tv[1024 /* T */]; + uint32_t TREFM; + uint32_t TREFMI[1 /* TREFM */]; + uint32_t TREFME[1 /* TREFM */]; + uint32_t TREF; + uint32_t TREFv[32 /* TREF */]; + uint32_t TTRIGM; + uint32_t TTRIGMI[1 /* TTRIGM */]; + uint32_t TTRIGME[1 /* TTRIGM */]; + uint32_t TTRIG; + uint32_t TTRIGv[32 /* TTRIG */]; + } TTTX_ID[2]; + +} EXT_STR_h101_TTTX_onion; + +/*******************************************************/ + +#define EXT_STR_h101_TTTX_ITEMS_INFO(ok, si, offset, struct_t, printerr) \ + do \ + { \ + ok = 1; \ + /* RAW */ \ + EXT_STR_ITEM_INFO2_LIM(ok, si, offset, struct_t, printerr, TTTX_ID1EM, UINT32, "TTTX_ID1EM", 32, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID1EMI, UINT32, "TTTX_ID1EMI", "TTTX_ID1EM", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID1EME, UINT32, "TTTX_ID1EME", "TTTX_ID1EM", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM(ok, si, offset, struct_t, printerr, TTTX_ID1E, UINT32, "TTTX_ID1E", 1024, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID1Ev, UINT32, "TTTX_ID1Ev", "TTTX_ID1E", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM(ok, si, offset, struct_t, printerr, TTTX_ID1TM, UINT32, "TTTX_ID1TM", 32, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID1TMI, UINT32, "TTTX_ID1TMI", "TTTX_ID1TM", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID1TME, UINT32, "TTTX_ID1TME", "TTTX_ID1TM", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM(ok, si, offset, struct_t, printerr, TTTX_ID1T, UINT32, "TTTX_ID1T", 1024, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID1Tv, UINT32, "TTTX_ID1Tv", "TTTX_ID1T", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM( \ + ok, si, offset, struct_t, printerr, TTTX_ID1TREFM, UINT32, "TTTX_ID1TREFM", 1, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID1TREFMI, \ + UINT32, \ + "TTTX_ID1TREFMI", \ + "TTTX_ID1TREFM", \ + 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID1TREFME, \ + UINT32, \ + "TTTX_ID1TREFME", \ + "TTTX_ID1TREFM", \ + 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM( \ + ok, si, offset, struct_t, printerr, TTTX_ID1TREF, UINT32, "TTTX_ID1TREF", 32, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID1TREFv, UINT32, "TTTX_ID1TREFv", "TTTX_ID1TREF", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM( \ + ok, si, offset, struct_t, printerr, TTTX_ID1TTRIGM, UINT32, "TTTX_ID1TTRIGM", 1, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID1TTRIGMI, \ + UINT32, \ + "TTTX_ID1TTRIGMI", \ + "TTTX_ID1TTRIGM", \ + 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID1TTRIGME, \ + UINT32, \ + "TTTX_ID1TTRIGME", \ + "TTTX_ID1TTRIGM", \ + 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM( \ + ok, si, offset, struct_t, printerr, TTTX_ID1TTRIG, UINT32, "TTTX_ID1TTRIG", 32, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID1TTRIGv, \ + UINT32, \ + "TTTX_ID1TTRIGv", \ + "TTTX_ID1TTRIG", \ + 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM(ok, si, offset, struct_t, printerr, TTTX_ID2EM, UINT32, "TTTX_ID2EM", 32, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID2EMI, UINT32, "TTTX_ID2EMI", "TTTX_ID2EM", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID2EME, UINT32, "TTTX_ID2EME", "TTTX_ID2EM", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM(ok, si, offset, struct_t, printerr, TTTX_ID2E, UINT32, "TTTX_ID2E", 1024, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID2Ev, UINT32, "TTTX_ID2Ev", "TTTX_ID2E", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM(ok, si, offset, struct_t, printerr, TTTX_ID2TM, UINT32, "TTTX_ID2TM", 32, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID2TMI, UINT32, "TTTX_ID2TMI", "TTTX_ID2TM", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID2TME, UINT32, "TTTX_ID2TME", "TTTX_ID2TM", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM(ok, si, offset, struct_t, printerr, TTTX_ID2T, UINT32, "TTTX_ID2T", 1024, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID2Tv, UINT32, "TTTX_ID2Tv", "TTTX_ID2T", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM( \ + ok, si, offset, struct_t, printerr, TTTX_ID2TREFM, UINT32, "TTTX_ID2TREFM", 1, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID2TREFMI, \ + UINT32, \ + "TTTX_ID2TREFMI", \ + "TTTX_ID2TREFM", \ + 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID2TREFME, \ + UINT32, \ + "TTTX_ID2TREFME", \ + "TTTX_ID2TREFM", \ + 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM( \ + ok, si, offset, struct_t, printerr, TTTX_ID2TREF, UINT32, "TTTX_ID2TREF", 32, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP( \ + ok, si, offset, struct_t, printerr, TTTX_ID2TREFv, UINT32, "TTTX_ID2TREFv", "TTTX_ID2TREF", 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM( \ + ok, si, offset, struct_t, printerr, TTTX_ID2TTRIGM, UINT32, "TTTX_ID2TTRIGM", 1, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID2TTRIGMI, \ + UINT32, \ + "TTTX_ID2TTRIGMI", \ + "TTTX_ID2TTRIGM", \ + 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID2TTRIGME, \ + UINT32, \ + "TTTX_ID2TTRIGME", \ + "TTTX_ID2TTRIGM", \ + 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_LIM( \ + ok, si, offset, struct_t, printerr, TTTX_ID2TTRIG, UINT32, "TTTX_ID2TTRIG", 32, 0 /*flags*/); \ + EXT_STR_ITEM_INFO2_ZZP(ok, \ + si, \ + offset, \ + struct_t, \ + printerr, \ + TTTX_ID2TTRIGv, \ + UINT32, \ + "TTTX_ID2TTRIGv", \ + "TTTX_ID2TTRIG", \ + 0 /*flags*/); \ + \ + } while (0); + +#endif /*__GUARD_H101_TTTX_EXT_H101_TTT10_H__*/ + +/*******************************************************/