2#define BMNCONVERTER_H 1
12#include <boost/property_tree/json_parser.hpp>
13#include <boost/property_tree/ptree.hpp>
15#include <nlohmann/json.hpp>
27#include "FairRootManager.h"
28#include "FairSource.h"
49#define WAIT_LIMIT 40000000
52typedef pair<TTree*, uint64_t>
TreePE;
57namespace pt = boost::property_tree;
59using json = nlohmann::json;
64 vector<pair<int, pair<int, int>>>
vecTree;
68 map<int32_t, map<int32_t, TreePos>>
treeMap;
74 BmnConverter(uint32_t threadCount = 0, uint32_t period = 8,
TString outDir =
".",
bool tempFileOnDisk =
false);
multimap< SysPoint, TreePE > MapTP2TreePE
pair< uint32_t, uint64_t > TreePos
pair< TTree *, uint64_t > TreePE
Defines unique identifiers (enum) for all BM@N detector systems.
BmnStatus
Define status code.
std::chrono::time_point< SysClock > SysPoint
#define ClassDef(name, id)
void SetDecoderConfigFileName(string FileName)
void QuickProcessEvent(UInt_t *d, UInt_t &len)
BmnStatus ParseJsonTLV(UInt_t *buf, UInt_t &len)
multimap< SysPoint, TreePE > treeTimeMap
unique_ptr< DigiRunHeader > runHeader
BmnStatus FeedEvent(UInt_t *buf, UInt_t len, Int_t type)
void SetSubName(TString v)
vector< TObject * > fNamVec
BmnStatus FeedFile(TString name, Bool_t getRunId=kTRUE, Bool_t getSubName=kTRUE)
const TTimeStamp TimeZero
void ReproduceBranches(TTree *inTree, TTree *outTree)
map< int32_t, MapTP2TreePE > treeTimeMapDiv
unique_ptr< BmnMetadataRaw > metadata
vector< TClonesArray * > fArrVec
void QuickConvertStatEvent(UInt_t *buf, UInt_t &len)
BmnConverterThread * fCurWaitingThread
void SeparateEventsBySpills()
void SetSpillMap(map< SysPoint, BmnSpillInfo > spillMap)
void SetPeriod(uint32_t v)
BmnConverter(uint32_t threadCount=0, uint32_t period=8, TString outDir=".", bool tempFileOnDisk=false)
BmnStatus CreateTempFile()
BmnThreadManager< BmnConverterThread > * fThreads
BmnSpillHeader * spillHeader
static BmnStatus ParseComplexTLV(UInt_t *buf, UInt_t &len, UInt_t &runId)
BmnStatus ConvertRawToRootIterateFileRead()
vector< pair< int, pair< int, int > > > vecTreeSpills
void SeparateEventsBySpillsTM()
unique_ptr< ROOT::TBufferMerger > fMerger
TString fRawTreeSpillName
void SetRunId(uint32_t v)
map< TTimeStamp, Int_t > leaps
map< SysPoint, BmnSpillInfo > GetSpillMap()
map< int32_t, map< int32_t, TreePos > > treeMap
map< SysPoint, BmnSpillInfo > fSpillMap
vector< pair< int, pair< int, int > > > vecTree
map< int32_t, multimap< SysPoint, TreePos > > treeMapSpills
Int_t GetUTCShift(TTimeStamp t)
Int_t GetSpillNumber(vector< SysPoint > *spillEnds, vector< SysPoint > *spillStarts, SysPoint time)
string fDecoderConfigFileName