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