GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TRawEvent.h
Go to the documentation of this file.
1#ifndef TRAWEVENT_H
2#define TRAWEVENT_H
3
4/** \addtogroup Sorting
5 * @{
6 */
7
8#include "TDataParser.h"
9
10#include "TObject.h"
11
12/////////////////////////////////////////////////////////////////
13///
14/// \class TRawEvent
15///
16/// C++ class representing one raw event.
17///
18/////////////////////////////////////////////////////////////////
19
20/// RAW event
21
22class TRawEvent : public TObject {
23public:
24 // houskeeping functions
25 TRawEvent() = default; ///< default constructor
26 TRawEvent(const TRawEvent& rhs) : TObject(rhs) {} ///< copy constructor
27 TRawEvent(TRawEvent&&) noexcept = default;
28 TRawEvent& operator=(const TRawEvent&) = default;
29 TRawEvent& operator=(TRawEvent&&) noexcept = default;
30 ~TRawEvent() = default; ///< destructor
31 void Clear(Option_t* = "") override { fGoodFrags = 0; } ///< clear event for reuse
32 void Copy(TObject& obj) const override { static_cast<TRawEvent&>(obj).fGoodFrags = fGoodFrags; } ///< copy helper
33 void Print(const char* = "") const override {} ///< show all event information
34
35 // get event information
36
37 virtual uint32_t GetTimeStamp() const { return 0; } ///< return the event size
38 virtual uint32_t GetDataSize() const { return 0; } ///< return the event size
39
40 // helpers for event creation
41
42 virtual char* GetData() { return nullptr; } ///< return pointer to the data buffer
43
44 virtual int SwapBytes(bool) { return 0; } ///< convert event data between little-endian (Linux-x86) and big endian (MacOS-PPC)
45
46 virtual int GoodFrags() { return fGoodFrags; } ///< returns number of good fragments parsed
47 virtual void IncrementGoodFrags() { ++fGoodFrags; } ///< increments the number of good fragments parsed
48
49private:
50 int fGoodFrags{0}; ///< number of good fragments parsed
51 /// \cond CLASSIMP
52 ClassDefOverride(TRawEvent, 0) // NOLINT(readability-else-after-return)
53 /// \endcond
54};
55/*! @} */
56#endif // TRawEvent.h
RAW event.
Definition TRawEvent.h:22
virtual void IncrementGoodFrags()
increments the number of good fragments parsed
Definition TRawEvent.h:47
virtual uint32_t GetDataSize() const
return the event size
Definition TRawEvent.h:38
void Print(const char *="") const override
show all event information
Definition TRawEvent.h:33
TRawEvent(const TRawEvent &rhs)
copy constructor
Definition TRawEvent.h:26
virtual char * GetData()
return pointer to the data buffer
Definition TRawEvent.h:42
virtual uint32_t GetTimeStamp() const
return the event size
Definition TRawEvent.h:37
TRawEvent()=default
default constructor
void Copy(TObject &obj) const override
copy helper
Definition TRawEvent.h:32
virtual int GoodFrags()
returns number of good fragments parsed
Definition TRawEvent.h:46
virtual int SwapBytes(bool)
convert event data between little-endian (Linux-x86) and big endian (MacOS-PPC)
Definition TRawEvent.h:44
void Clear(Option_t *="") override
clear event for reuse
Definition TRawEvent.h:31
int fGoodFrags
Definition TRawEvent.h:50
TRawEvent(TRawEvent &&) noexcept=default