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

Container class for AtPadBase objects. More...

#include <AtPad.h>

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

Public Types

using rawTrace = std::array< Int_t, 512 >
 
using trace = std::array< Double_t, 512 >
 
using XYPoint = ROOT::Math::XYPoint
 

Public Member Functions

 AtPad (Int_t PadNum=-1)
 
 AtPad (const AtPad &obj)
 
AtPadoperator= (AtPad obj)
 
 AtPad (AtPad &&)=default
 
virtual ~AtPad ()=default
 
virtual std::unique_ptr< AtPadBaseClone () const override
 
virtual std::unique_ptr< AtPadClonePad () const
 Clone this pad (including augments). More...
 
AtPadBaseAddAugment (std::string name, std::unique_ptr< AtPadBase > augment)
 
AtPadBaseReplaceAugment (std::string name, std::unique_ptr< AtPadBase > augment)
 
AtPadBaseGetAugment (std::string name)
 
const AtPadBaseGetAugment (std::string name) const
 
template<typename T , typename std::enable_if_t< std::is_base_of< AtPadBase, T >::value > * = nullptr>
T * GetAugment (std::string name)
 
template<typename T , typename std::enable_if_t< std::is_base_of< AtPadBase, T >::value > * = nullptr>
const T * GetAugment (std::string name) const
 
const std::map< std::string, std::unique_ptr< AtPadBase > > & GetAugments () const
 
void SetValidPad (Bool_t val=kTRUE)
 
void SetPadNum (Int_t padNum)
 
void SetSizeID (Int_t sizeID)
 
void SetPedestalSubtracted (Bool_t val=kTRUE)
 
void SetPadCoord (const XYPoint &point)
 
void SetRawADC (const rawTrace &val)
 
void SetRawADC (Int_t idx, Int_t val)
 
void SetADC (const trace &val)
 
void SetADC (Int_t idx, Double_t val)
 
Bool_t IsPedestalSubtracted () const
 
Int_t GetPadNum () const
 
Bool_t GetValidPad () const
 
Int_t GetSizeID () const
 
const traceGetADC () const
 
Double_t GetADC (Int_t idx) const
 
std::unique_ptr< TH1D > GetADCHistrogram () const
 
const rawTraceGetRawADC () const
 
Int_t GetRawADC (Int_t idx) const
 
XYPoint GetPadCoord () const
 
 ClassDefOverride (AtPad, 3)
 
- Public Member Functions inherited from AtPadBase
virtual ~AtPadBase ()=default
 
 ClassDefOverride (AtPadBase, 1)
 

Protected Attributes

Int_t fPadNum
 
Int_t fSizeID = -1000
 
XYPoint fPadCoord {-9999, -9999}
 
Bool_t fIsValid = true
 
Bool_t fIsPedestalSubtracted = false
 
rawTrace fRawAdc {}
 
trace fAdc {}
 
std::map< std::string, std::unique_ptr< AtPadBase > > fPadAugments
 

Friends

class AtGRAWUnpacker
 
void swap (AtPad &a, AtPad &b) noexcept
 

Detailed Description

Container class for AtPadBase objects.

This class contains the information associated with a pad (or channel). In addition to the information required to define a pad (adc value, pad number, etc) additional information can be added through pad "augments" (this follows the compostion design pattern). All augments should be listed in the group Pads, which has more documentation in this system.

Definition at line 38 of file AtPad.h.

Member Typedef Documentation

◆ rawTrace

using AtPad::rawTrace = std::array<Int_t, 512>

Definition at line 40 of file AtPad.h.

◆ trace

using AtPad::trace = std::array<Double_t, 512>

Definition at line 41 of file AtPad.h.

◆ XYPoint

using AtPad::XYPoint = ROOT::Math::XYPoint

Definition at line 42 of file AtPad.h.

Constructor & Destructor Documentation

◆ AtPad() [1/3]

AtPad::AtPad ( Int_t  PadNum = -1)

Definition at line 20 of file AtPad.cxx.

◆ AtPad() [2/3]

AtPad::AtPad ( const AtPad obj)

Definition at line 40 of file AtPad.cxx.

◆ AtPad() [3/3]

AtPad::AtPad ( AtPad &&  )
default

◆ ~AtPad()

virtual AtPad::~AtPad ( )
virtualdefault

Member Function Documentation

◆ AddAugment()

AtPadBase * AtPad::AddAugment ( std::string  name,
std::unique_ptr< AtPadBase augment 
)

Add an augment (ie AtPadFFT) to the pad with given name. If it exists, log an error and replace it.

Definition at line 63 of file AtPad.cxx.

◆ ClassDefOverride()

AtPad::ClassDefOverride ( AtPad  ,
 
)

◆ Clone()

std::unique_ptr< AtPadBase > AtPad::Clone ( ) const
overridevirtual

Implements AtPadBase.

Reimplemented in AtAuxPad.

Definition at line 47 of file AtPad.cxx.

◆ ClonePad()

std::unique_ptr< AtPad > AtPad::ClonePad ( ) const
virtual

Clone this pad (including augments).

Reimplemented in AtAuxPad.

Definition at line 55 of file AtPad.cxx.

◆ GetADC() [1/2]

const AtPad::trace & AtPad::GetADC ( ) const

Definition at line 97 of file AtPad.cxx.

◆ GetADC() [2/2]

Double_t AtPad::GetADC ( Int_t  idx) const

Definition at line 105 of file AtPad.cxx.

◆ GetADCHistrogram()

std::unique_ptr< TH1D > AtPad::GetADCHistrogram ( ) const

Definition at line 110 of file AtPad.cxx.

◆ GetAugment() [1/4]

AtPadBase * AtPad::GetAugment ( std::string  name)

Get augment to pad of given name (nullptr if pad doesn't contain the augment).

Definition at line 82 of file AtPad.cxx.

◆ GetAugment() [2/4]

template<typename T , typename std::enable_if_t< std::is_base_of< AtPadBase, T >::value > * = nullptr>
T* AtPad::GetAugment ( std::string  name)
inline

Definition at line 71 of file AtPad.h.

◆ GetAugment() [3/4]

const AtPadBase * AtPad::GetAugment ( std::string  name) const

Get augment to pad of given name (nullptr if pad doesn't contain the augment).

Definition at line 89 of file AtPad.cxx.

◆ GetAugment() [4/4]

template<typename T , typename std::enable_if_t< std::is_base_of< AtPadBase, T >::value > * = nullptr>
const T* AtPad::GetAugment ( std::string  name) const
inline

Definition at line 76 of file AtPad.h.

◆ GetAugments()

const std::map<std::string, std::unique_ptr<AtPadBase> >& AtPad::GetAugments ( ) const
inline

Definition at line 81 of file AtPad.h.

◆ GetPadCoord()

XYPoint AtPad::GetPadCoord ( ) const
inline

Definition at line 107 of file AtPad.h.

◆ GetPadNum()

Int_t AtPad::GetPadNum ( ) const
inline

Definition at line 96 of file AtPad.h.

◆ GetRawADC() [1/2]

const rawTrace& AtPad::GetRawADC ( ) const
inline

Definition at line 104 of file AtPad.h.

◆ GetRawADC() [2/2]

Int_t AtPad::GetRawADC ( Int_t  idx) const
inline

Definition at line 105 of file AtPad.h.

◆ GetSizeID()

Int_t AtPad::GetSizeID ( ) const
inline

Definition at line 98 of file AtPad.h.

◆ GetValidPad()

Bool_t AtPad::GetValidPad ( ) const
inline

Definition at line 97 of file AtPad.h.

◆ IsPedestalSubtracted()

Bool_t AtPad::IsPedestalSubtracted ( ) const
inline

Definition at line 94 of file AtPad.h.

◆ operator=()

AtPad & AtPad::operator= ( AtPad  obj)

Definition at line 35 of file AtPad.cxx.

◆ ReplaceAugment()

AtPadBase * AtPad::ReplaceAugment ( std::string  name,
std::unique_ptr< AtPadBase augment 
)

Adds or replaces an augment (ie AtPadFFT) to the pad with given name.

Definition at line 74 of file AtPad.cxx.

◆ SetADC() [1/2]

void AtPad::SetADC ( const trace val)
inline

Definition at line 91 of file AtPad.h.

◆ SetADC() [2/2]

void AtPad::SetADC ( Int_t  idx,
Double_t  val 
)
inline

Definition at line 92 of file AtPad.h.

◆ SetPadCoord()

void AtPad::SetPadCoord ( const XYPoint point)
inline

Definition at line 87 of file AtPad.h.

◆ SetPadNum()

void AtPad::SetPadNum ( Int_t  padNum)
inline

Definition at line 83 of file AtPad.h.

◆ SetPedestalSubtracted()

void AtPad::SetPedestalSubtracted ( Bool_t  val = kTRUE)
inline

Definition at line 86 of file AtPad.h.

◆ SetRawADC() [1/2]

void AtPad::SetRawADC ( const rawTrace val)
inline

Definition at line 89 of file AtPad.h.

◆ SetRawADC() [2/2]

void AtPad::SetRawADC ( Int_t  idx,
Int_t  val 
)
inline

Definition at line 90 of file AtPad.h.

◆ SetSizeID()

void AtPad::SetSizeID ( Int_t  sizeID)
inline

Definition at line 84 of file AtPad.h.

◆ SetValidPad()

void AtPad::SetValidPad ( Bool_t  val = kTRUE)
inline

Definition at line 82 of file AtPad.h.

Friends And Related Function Documentation

◆ AtGRAWUnpacker

friend class AtGRAWUnpacker
friend

Definition at line 109 of file AtPad.h.

◆ swap

void swap ( AtPad a,
AtPad b 
)
friend

Definition at line 22 of file AtPad.cxx.

Member Data Documentation

◆ fAdc

trace AtPad::fAdc {}
protected

Definition at line 52 of file AtPad.h.

◆ fIsPedestalSubtracted

Bool_t AtPad::fIsPedestalSubtracted = false
protected

Definition at line 49 of file AtPad.h.

◆ fIsValid

Bool_t AtPad::fIsValid = true
protected

Definition at line 48 of file AtPad.h.

◆ fPadAugments

std::map<std::string, std::unique_ptr<AtPadBase> > AtPad::fPadAugments
protected

Definition at line 53 of file AtPad.h.

◆ fPadCoord

XYPoint AtPad::fPadCoord {-9999, -9999}
protected

Definition at line 47 of file AtPad.h.

◆ fPadNum

Int_t AtPad::fPadNum
protected

Definition at line 45 of file AtPad.h.

◆ fRawAdc

rawTrace AtPad::fRawAdc {}
protected

Definition at line 51 of file AtPad.h.

◆ fSizeID

Int_t AtPad::fSizeID = -1000
protected

Definition at line 46 of file AtPad.h.


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