REST-for-Physics
v2.3
Rare Event Searches ToolKit for Physics
|
A base class for any REST event.
TRestEvent is one of the core classes of REST. Absract class from which all REST "event classes" must derive. REST event classes represent the different holders to store specific event data. TRestEvent contains common data members to all type of events, as it is the timestamp. or the references to the event belongs to, as run and subrun numbers. It contains virtual functions that must be implemented in derived classes like Initialize(), PrintEvent() or DrawEvent().
RESTsoft - Software for Rare Event Searches with TPCs
History of developments:
2014-june: First concept. As part of conceptualization of previous REST code (REST v2) Igor G. Irastorza
Definition at line 38 of file TRestEvent.h.
#include <TRestEvent.h>
Public Member Functions | |
virtual void | CloneTo (TRestEvent *target) |
Clone the content of this TRestEvent object to another. More... | |
virtual TPad * | DrawEvent (const TString &option="") |
Draw the event. More... | |
Int_t | GetID () const |
Int_t | GetRunOrigin () const |
TString | GetSubEventTag () const |
Int_t | GetSubID () const |
Int_t | GetSubRunOrigin () const |
Double_t | GetTime () const |
TTimeStamp | GetTimeStamp () const |
virtual void | Initialize ()=0 |
virtual void | InitializeReferences (TRestRun *run) |
Initialize dynamical references when loading the event from a root file. More... | |
virtual void | InitializeWithMetadata (TRestRun *run) |
Bool_t | isOk () const |
virtual void | PrintEvent () const |
void | SetEventInfo (TRestEvent *eve) |
void | SetID (Int_t id) |
void | SetOK (Bool_t state) |
void | SetRunOrigin (Int_t run_origin) |
void | SetState (Bool_t state) |
void | SetSubEventTag (const TString &tag) |
void | SetSubID (Int_t id) |
void | SetSubRunOrigin (Int_t sub_run_origin) |
void | SetTime (Double_t seconds, Double_t nanoseconds) |
void | SetTime (Double_t time) |
void | SetTimeStamp (const TTimeStamp &time) |
TRestEvent () | |
virtual | ~TRestEvent () |
Protected Member Functions | |
void | RestartPad (Int_t nElements) |
Protected Attributes | |
Int_t | fEventID |
Event identification number. More... | |
TTimeStamp | fEventTime |
Absolute event time. More... | |
Bool_t | fOk |
Flag to be used by processes to define an event status. fOk=true is the default. More... | |
TPad * | fPad |
TRestRun * | fRun = nullptr |
Int_t | fRunOrigin |
Run ID number of the event. More... | |
Int_t | fSubEventID |
Sub-Event identification number. More... | |
TString | fSubEventTag |
A short length label to identify the sub-Event. More... | |
Int_t | fSubRunOrigin |
Sub-run ID number of the event. More... | |
TRestEvent::TRestEvent | ( | ) |
TRestEvent default constructor
Definition at line 61 of file TRestEvent.cxx.
|
virtual |
TRestEvent default destructor
Definition at line 66 of file TRestEvent.cxx.
|
virtual |
Clone the content of this TRestEvent object to another.
This method uses default root streamer to do the copying. The efficiency is low. Override recommended.
Definition at line 98 of file TRestEvent.cxx.
|
inlinevirtual |
Draw the event.
To be implemented in the derived class
Reimplemented in TRestDetectorHitsEvent, TRestDetectorSignalEvent, TRestRawSignalEvent, TRestTrackEvent, and TRestGeant4Event.
Definition at line 103 of file TRestEvent.h.
|
inline |
Definition at line 73 of file TRestEvent.h.
|
inline |
Definition at line 77 of file TRestEvent.h.
|
inline |
Definition at line 75 of file TRestEvent.h.
|
inline |
Definition at line 74 of file TRestEvent.h.
|
inline |
Definition at line 78 of file TRestEvent.h.
|
inline |
Definition at line 80 of file TRestEvent.h.
|
inline |
Definition at line 81 of file TRestEvent.h.
|
pure virtual |
Run to initialize event data. To be re-implemented in derived class, you may want to call the base class at the end of the re-implemented, by calling TRestEvent::Initialize();
Implemented in TRestAxionEvent, TRestDetectorHitsEvent, TRestDetectorSignalEvent, TRestRawSignalEvent, TRestTrackEvent, and TRestGeant4Event.
Definition at line 73 of file TRestEvent.cxx.
|
virtual |
Initialize dynamical references when loading the event from a root file.
This method should only be called from TRestRun::GetEntry
and it will give the corresponding TRestEvent
access to the instance of TRestRun
. In a derived class such as TRestGeant4Event
, it can be overwritten to give each track access to the event
Reimplemented in TRestGeant4Event.
Definition at line 175 of file TRestEvent.cxx.
|
virtual |
Definition at line 173 of file TRestEvent.cxx.
|
inline |
Definition at line 83 of file TRestEvent.h.
|
virtual |
Run to print event data info on console To be re-implemented in derived class. You may want to call the base class inside the re-implemented one, by calling TRestEvent::PrintEvent();
Reimplemented in TRestDetectorHitsEvent.
Definition at line 187 of file TRestEvent.cxx.
|
protected |
Definition at line 147 of file TRestEvent.cxx.
void TRestEvent::SetEventInfo | ( | TRestEvent * | eve | ) |
Copy the six universal information in TRestEvent from another TRestEvent
Definition at line 137 of file TRestEvent.cxx.
|
inline |
Definition at line 59 of file TRestEvent.h.
|
inline |
Definition at line 68 of file TRestEvent.h.
|
inline |
Definition at line 56 of file TRestEvent.h.
|
inline |
Definition at line 67 of file TRestEvent.h.
|
inline |
Definition at line 61 of file TRestEvent.h.
|
inline |
Definition at line 60 of file TRestEvent.h.
|
inline |
Definition at line 57 of file TRestEvent.h.
void TRestEvent::SetTime | ( | Double_t | seconds, |
Double_t | nanoseconds | ||
) |
Set the time of the event
Definition at line 129 of file TRestEvent.cxx.
void TRestEvent::SetTime | ( | Double_t | time | ) |
Set the time of the event
Definition at line 85 of file TRestEvent.cxx.
|
inline |
Definition at line 65 of file TRestEvent.h.
|
protected |
Event identification number.
Definition at line 42 of file TRestEvent.h.
|
protected |
Absolute event time.
Definition at line 45 of file TRestEvent.h.
|
protected |
Flag to be used by processes to define an event status. fOk=true is the default.
Definition at line 46 of file TRestEvent.h.
|
protected |
Definition at line 50 of file TRestEvent.h.
|
protected |
Definition at line 48 of file TRestEvent.h.
|
protected |
Run ID number of the event.
Definition at line 40 of file TRestEvent.h.
|
protected |
Sub-Event identification number.
Definition at line 43 of file TRestEvent.h.
|
protected |
A short length label to identify the sub-Event.
Definition at line 44 of file TRestEvent.h.
|
protected |
Sub-run ID number of the event.
Definition at line 41 of file TRestEvent.h.