CbmRoot
Loading...
Searching...
No Matches
TimesliceMetaData.h
Go to the documentation of this file.
1/* Copyright (C) 2019-2020 Facility for Antiproton and Ion Research in Europe, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Pierre-Alain Loizeau [committer], Florian Uhlig */
4
5#ifndef TIMESLICE_METADATA_H
6#define TIMESLICE_METADATA_H
7
8#include <Rtypes.h> // for THashConsistencyHolder, ClassDef
9#include <TObject.h> // for TObject
10
11#include <cstdint>
12
13
14class TimesliceMetaData : public TObject {
15public:
16 TimesliceMetaData(uint64_t ulStart = 0, uint64_t ulDur = 12800000, uint64_t ulOverDur = 1280000,
17 uint64_t ulIndex = 0);
18
25
26 void SetStartTime(uint64_t ulStart) { fulStartTimeNs = ulStart; }
27 void SetDuration(uint64_t ulDur) { fulDurationNs = ulDur; }
28 void SetOverlapDuration(uint64_t ulDur) { fulOverlapNs = ulDur; }
29 void SetIndex(uint64_t ulIdx) { fulIndex = ulIdx; }
30
31 uint64_t GetStartTime() const { return fulStartTimeNs; }
32 uint64_t GetDuration() const { return fulDurationNs; }
33 uint64_t GetOverlapStartTime() const { return fulStartTimeNs + fulDurationNs; }
34 uint64_t GetOverlapDuration() const { return fulOverlapNs; }
35 uint64_t GetIndex() const { return fulIndex; }
36
37private:
38 uint64_t fulStartTimeNs = 0;
39 // uint64_t fulDurationNs = 10240000; // 100 MS * 102400 ns (no TRD), default to update in source
40 uint64_t fulDurationNs = 12800000; // 10 MS * 1280000 ns (with TRD), default to update in source
41 uint64_t fulOverlapNs = 1280000; // 1 MS * 1280000 ns (with TRD), default to update in source
42 uint64_t fulIndex = 0;
43 /*
44 uint64_t fulErrorsNbBmon = 0;
45 uint64_t fulErrorsNbSts = 0;
46 uint64_t fulErrorsNbMuch = 0;
47 uint64_t fulErrorsNbTof = 0;
48 uint64_t fulErrorsNbTrd = 0;
49 uint64_t fulErrorsNbRich = 0;
50 uint64_t fulErrorsNbPsd = 0;
51*/
52
54};
55
56#endif // TIMESLICE_METADATA_H
TimesliceMetaData(TimesliceMetaData &&)=default
Move constuctor.
void SetStartTime(uint64_t ulStart)
TimesliceMetaData & operator=(const TimesliceMetaData &)=default
Copy operator.
uint64_t GetIndex() const
ClassDef(TimesliceMetaData, 2)
uint64_t GetOverlapDuration() const
uint64_t GetOverlapStartTime() const
void SetDuration(uint64_t ulDur)
TimesliceMetaData(const TimesliceMetaData &)=default
Copy construction.
void SetOverlapDuration(uint64_t ulDur)
uint64_t GetDuration() const
TimesliceMetaData(uint64_t ulStart=0, uint64_t ulDur=12800000, uint64_t ulOverDur=1280000, uint64_t ulIndex=0)
uint64_t GetStartTime() const
void SetIndex(uint64_t ulIdx)