GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TLstEvent.h
Go to the documentation of this file.
1#ifndef TLSTEVENT_H
2#define TLSTEVENT_H
3
4/** \addtogroup Sorting
5 * @{
6 */
7
8#include "Globals.h"
9
10#include "TRawEvent.h"
11
12/////////////////////////////////////////////////////////////////
13///
14/// \class TLstEvent
15///
16/// C++ class representing one lst file.
17///
18/////////////////////////////////////////////////////////////////
19
20/// LST event
21
22class TLstEvent : public TRawEvent {
23public:
24 // houskeeping functions
25 TLstEvent(); ///< default constructor
26 TLstEvent(const TLstEvent&); ///< copy constructor
27 ~TLstEvent() override; ///< destructor
28 TLstEvent& operator=(const TLstEvent&); ///< assignement operator
29 void Clear(Option_t* opt = "") override; ///< clear event for reuse
30 void Copy(TObject&) const override; ///< copy helper
31 void Print(const char* option = "") const override; ///< show all event information
32
33 // get event information
34
35 uint32_t GetDataSize() const override; ///< return the event size
36
37 // helpers for event creation
38
39 char* GetData() override; ///< return pointer to the data buffer
40 void SetData(std::vector<char>& buffer); ///< set an externally allocated data buffer
41 void SetLstVersion(int32_t version) { fLstVersion = version; };
42 int8_t GetLstVersion() { return fLstVersion; };
43
44 int SwapBytes(bool) override; ///< convert event data between little-endian (Linux-x86) and big endian (MacOS-PPC)
45
46protected:
47 std::vector<char> fData; ///< event data buffer
48 int32_t fLstVersion = 1; ///< Lst version
49
50 /// \cond CLASSIMP
51 ClassDefOverride(TLstEvent, 0) // All of the data contained in a LST Event
52 /// \endcond
53};
54/*! @} */
55#endif // TLstEvent.h
LST event.
Definition TLstEvent.h:22
void SetLstVersion(int32_t version)
Definition TLstEvent.h:41
~TLstEvent() override
destructor
Definition TLstEvent.cxx:31
int32_t fLstVersion
Lst version.
Definition TLstEvent.h:48
int SwapBytes(bool) override
convert event data between little-endian (Linux-x86) and big endian (MacOS-PPC)
uint32_t GetDataSize() const override
return the event size
Definition TLstEvent.cxx:60
void SetData(std::vector< char > &buffer)
set an externally allocated data buffer
Definition TLstEvent.cxx:52
int8_t GetLstVersion()
Definition TLstEvent.h:42
char * GetData() override
return pointer to the data buffer
Definition TLstEvent.cxx:65
TLstEvent()
default constructor
Definition TLstEvent.cxx:13
std::vector< char > fData
event data buffer
Definition TLstEvent.h:47
void Clear(Option_t *opt="") override
clear event for reuse
Definition TLstEvent.cxx:46
void Copy(TObject &) const override
copy helper
Definition TLstEvent.cxx:19
TLstEvent & operator=(const TLstEvent &)
assignement operator
Definition TLstEvent.cxx:36
void Print(const char *option="") const override
show all event information
Definition TLstEvent.cxx:71
RAW event.
Definition TRawEvent.h:23