ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
Public Types | Public Member Functions | Friends | List of all members
AtEvent Class Reference

#include <AtEvent.h>

Inheritance diagram for AtEvent:
Inheritance graph
[legend]
Collaboration diagram for AtEvent:
Collaboration graph
[legend]

Public Types

using TraceArray = std::array< Float_t, 512 >
 
using HitPtr = std::unique_ptr< AtHit >
 
using HitVector = std::vector< HitPtr >
 

Public Member Functions

 AtEvent ()
 
 AtEvent (const AtEvent &copy)
 
 AtEvent (const AtBaseEvent &copy)
 
AtEventoperator= (const AtEvent object)
 
virtual ~AtEvent ()=default
 
void Clear (Option_t *opt=nullptr) override
 
template<typename... Ts>
AtHitAddHit (Ts &&...params)
 Create a new hit in this event. Adds a new hit, calling a constructor of AtHit using the passed parameters. Will set the hitID to the next availible if it was not set by the AtHit constructor. Allowing this function to handle hitIDs will ensure they remain unique within an event. More...
 
template<typename T , typename = std::enable_if_t<std::is_base_of<AtHit, std::decay_t<T>>::value>>
AtHitAddHit (std::unique_ptr< T > ptr)
 Move a hit into this event. Adds a new hit, moving a unique pointer in. Will set the hitID to the next availible if it was not set by the AtHit constructor (ie is still -1). Allowing this function to handle hitIDs will ensure they remain unique within an event. More...
 
void SetEventCharge (Double_t Qevent)
 
void SetRhoVariance (Double_t RhoVariance)
 
void SetMultiplicityMap (std::map< Int_t, Int_t > MultiMap)
 
void SetMeshSignal (TraceArray mesharray)
 
void SetMeshSignal (Int_t idx, Float_t val)
 
Int_t GetNumHits () const
 
Double_t GetEventCharge () const
 
Double_t GetRhoVariance () const
 
const TraceArrayGetMesh () const
 
Int_t GetHitPadMult (Int_t PadNum)
 
const AtHitGetHit (Int_t hitNo) const
 
std::vector< AtHitGetHitArray () const
 
const HitVectorGetHits () const
 
void ClearHits ()
 
const std::map< Int_t, Int_t > & GetMultiMap ()
 
void SortHitArray ()
 
void SortHitArrayID ()
 
void SortHitArrayTime ()
 
 ClassDefOverride (AtEvent, 6)
 
- Public Member Functions inherited from AtBaseEvent
 AtBaseEvent (std::string name="AtBaseEvent")
 
virtual ~AtBaseEvent ()=default
 
 AtBaseEvent (AtBaseEvent &&)=default
 
 AtBaseEvent (const AtBaseEvent &)=default
 
AtBaseEventoperator= (AtBaseEvent object)
 
void Clear (Option_t *opt) override
 
std::pair< AtAuxPad *, bool > AddAuxPad (std::string auxName)
 Add new auxilary pad (AtAuxPad) to event. More...
 
void SetEventID (ULong_t evtid)
 
void SetIsGood (Bool_t value)
 
void SetTimestamp (ULong64_t timestamp, int index=0)
 
void SetNumberOfTimestamps (int numTS)
 
void SetIsExtGate (Bool_t value)
 
void SetEventName (std::string name)
 
ULong_t GetEventID () const
 
ULong64_t GetTimestamp (int index=0) const
 
const std::vector< ULong64_t > & GetTimestamps () const
 
Bool_t IsGood () const
 
Bool_t GetIsExtGate () const
 
std::string GetEventName () const
 
AtAuxPadGetAuxPad (std::string auxPad)
 
const AtAuxPadGetAuxPad (std::string auxPad) const
 
const AuxPadMapGetAuxPads () const
 

Friends

void swap (AtEvent &first, AtEvent &second)
 

Additional Inherited Members

- Protected Types inherited from AtBaseEvent
using AuxPadMap = std::map< std::string, AtAuxPad >
 
- Protected Attributes inherited from AtBaseEvent
ULong_t fEventID = -1
 
Bool_t fIsGood = true
 
Bool_t fIsInGate = false
 
std::vector< ULong64_t > fTimestamp {1}
 
AuxPadMap fAuxPadMap
 
std::string fEventName
 

Detailed Description

Definition at line 22 of file AtEvent.h.

Member Typedef Documentation

◆ HitPtr

using AtEvent::HitPtr = std::unique_ptr<AtHit>

Definition at line 25 of file AtEvent.h.

◆ HitVector

using AtEvent::HitVector = std::vector<HitPtr>

Definition at line 26 of file AtEvent.h.

◆ TraceArray

using AtEvent::TraceArray = std::array<Float_t, 512>

Definition at line 24 of file AtEvent.h.

Constructor & Destructor Documentation

◆ AtEvent() [1/3]

AtEvent::AtEvent ( )

Definition at line 12 of file AtEvent.cxx.

◆ AtEvent() [2/3]

AtEvent::AtEvent ( const AtEvent copy)

Definition at line 14 of file AtEvent.cxx.

◆ AtEvent() [3/3]

AtEvent::AtEvent ( const AtBaseEvent copy)
inline

Definition at line 40 of file AtEvent.h.

◆ ~AtEvent()

virtual AtEvent::~AtEvent ( )
virtualdefault

Member Function Documentation

◆ AddHit() [1/2]

template<typename T , typename = std::enable_if_t<std::is_base_of<AtHit, std::decay_t<T>>::value>>
AtHit& AtEvent::AddHit ( std::unique_ptr< T >  ptr)
inline

Move a hit into this event. Adds a new hit, moving a unique pointer in. Will set the hitID to the next availible if it was not set by the AtHit constructor (ie is still -1). Allowing this function to handle hitIDs will ensure they remain unique within an event.

Parameters
[in]ptrunique_ptr to the AtHit to add to the event.
Returns
Reference to added hit

Definition at line 91 of file AtEvent.h.

◆ AddHit() [2/2]

template<typename... Ts>
AtHit& AtEvent::AddHit ( Ts &&...  params)
inline

Create a new hit in this event. Adds a new hit, calling a constructor of AtHit using the passed parameters. Will set the hitID to the next availible if it was not set by the AtHit constructor. Allowing this function to handle hitIDs will ensure they remain unique within an event.

Parameters
paramsParameters to be perfect-forwarded to the constructor of AtHit.
Returns
Reference to added hit

Definition at line 70 of file AtEvent.h.

◆ ClassDefOverride()

AtEvent::ClassDefOverride ( AtEvent  ,
 
)

◆ Clear()

void AtEvent::Clear ( Option_t *  opt = nullptr)
override

Definition at line 28 of file AtEvent.cxx.

◆ ClearHits()

void AtEvent::ClearHits ( )
inline

Definition at line 117 of file AtEvent.h.

◆ GetEventCharge()

Double_t AtEvent::GetEventCharge ( ) const
inline

Definition at line 109 of file AtEvent.h.

◆ GetHit()

const AtHit& AtEvent::GetHit ( Int_t  hitNo) const
inline

Definition at line 114 of file AtEvent.h.

◆ GetHitArray()

std::vector< AtHit > AtEvent::GetHitArray ( ) const

Definition at line 69 of file AtEvent.cxx.

◆ GetHitPadMult()

Int_t AtEvent::GetHitPadMult ( Int_t  PadNum)

Definition at line 43 of file AtEvent.cxx.

◆ GetHits()

const HitVector& AtEvent::GetHits ( ) const
inline

Definition at line 116 of file AtEvent.h.

◆ GetMesh()

const TraceArray& AtEvent::GetMesh ( ) const
inline

Definition at line 111 of file AtEvent.h.

◆ GetMultiMap()

const std::map<Int_t, Int_t>& AtEvent::GetMultiMap ( )
inline

Definition at line 118 of file AtEvent.h.

◆ GetNumHits()

Int_t AtEvent::GetNumHits ( ) const
inline

Definition at line 108 of file AtEvent.h.

◆ GetRhoVariance()

Double_t AtEvent::GetRhoVariance ( ) const
inline

Definition at line 110 of file AtEvent.h.

◆ operator=()

AtEvent & AtEvent::operator= ( const AtEvent  object)

Definition at line 22 of file AtEvent.cxx.

◆ SetEventCharge()

void AtEvent::SetEventCharge ( Double_t  Qevent)
inline

Definition at line 101 of file AtEvent.h.

◆ SetMeshSignal() [1/2]

void AtEvent::SetMeshSignal ( Int_t  idx,
Float_t  val 
)

Definition at line 38 of file AtEvent.cxx.

◆ SetMeshSignal() [2/2]

void AtEvent::SetMeshSignal ( TraceArray  mesharray)
inline

Definition at line 105 of file AtEvent.h.

◆ SetMultiplicityMap()

void AtEvent::SetMultiplicityMap ( std::map< Int_t, Int_t >  MultiMap)
inline

Definition at line 104 of file AtEvent.h.

◆ SetRhoVariance()

void AtEvent::SetRhoVariance ( Double_t  RhoVariance)
inline

Definition at line 102 of file AtEvent.h.

◆ SortHitArray()

void AtEvent::SortHitArray ( )

Definition at line 52 of file AtEvent.cxx.

◆ SortHitArrayID()

void AtEvent::SortHitArrayID ( )

Definition at line 57 of file AtEvent.cxx.

◆ SortHitArrayTime()

void AtEvent::SortHitArrayTime ( )

Definition at line 63 of file AtEvent.cxx.

Friends And Related Function Documentation

◆ swap

void swap ( AtEvent first,
AtEvent second 
)
friend

Definition at line 44 of file AtEvent.h.


The documentation for this class was generated from the following files: