AliPhysics  64f4410 (64f4410)
PWG::EMCAL::AliEmcalTrackSelResultPtr Class Reference

Structure containing the result of a given track selection step. More...

#include <AliEmcalTrackSelResultPtr.h>

Inheritance diagram for PWG::EMCAL::AliEmcalTrackSelResultPtr:

Public Member Functions

 AliEmcalTrackSelResultPtr ()
 
 AliEmcalTrackSelResultPtr (AliVTrack *trk, Bool_t selectionStatus, TObject *userobject=nullptr)
 
 AliEmcalTrackSelResultPtr (const AliEmcalTrackSelResultPtr &ref)
 
 AliEmcalTrackSelResultPtr (AliEmcalTrackSelResultPtr &&ref)
 
AliEmcalTrackSelResultPtroperator= (const AliEmcalTrackSelResultPtr &ref)
 
AliEmcalTrackSelResultPtroperator= (AliEmcalTrackSelResultPtr &&ref)
 
virtual ~AliEmcalTrackSelResultPtr ()
 Destructor. More...
 
Bool_t operator== (const AliEmcalTrackSelResultPtr &other) const
 
Bool_t operator< (const AliEmcalTrackSelResultPtr &other) const
 
virtual Bool_t IsEqual (const TObject *o) const
 
virtual Int_t Compare (const TObject *o) const
 
AliVTrack * operator* () const
 
AliVTrack * operator-> () const
 
 operator bool () const
 
void PrintStream (std::ostream &stream) const
 
void SetTrack (AliVTrack *track)
 Set the track object handled by the track selection. More...
 
void SetSelectionResult (Bool_t selectionResult)
 
void SetUserInfo (TObject *userinfo)
 
AliVTrack * GetTrack () const
 
const TObjectGetUserInfo () const
 
Bool_t GetSelectionResult () const
 

Protected Attributes

AliVTrack * fTrack
 Pointer to selected track. More...
 
Bool_t fSelectionResult
 Result of the track selection (true - selected, false - rejected) More...
 
AliEmcalTrackSelResultUserPtr fUserInfo
 Selection flag (optional) More...
 

Detailed Description

Structure containing the result of a given track selection step.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Lawrence Berkeley National Laboratory
Since
July 5, 2016

Smart pointer containing selection results. In addition to the object itself a set of further information is stored.

  • The track object itself
  • Its selection status (true - selected, false - rejected)
  • A user-info object (of type TObject) for additional information
  • Rejection reason

Access to the original track is done via the operators * and ->. Using the operator-> provides direct access to public member functions of AliVTrack. As this, the following is valid C++ code:

AliVTrack testtrack;
AliEmcalTrackSelPtr result = sel.IsTrackAccepted(&testtrack);
if(result.IsGetSelectionResult()){
std::cout << "Pt of the selected track: " << result->Pt() << std::endl;
}

This smart pointer does not take care about deleting the object as it does not own the content behind. Instead the user has to take care.

Definition at line 252 of file AliEmcalTrackSelResultPtr.h.

Constructor & Destructor Documentation

AliEmcalTrackSelResultPtr::AliEmcalTrackSelResultPtr ( )

Dummy constructor, nothing to do Default values:

  • Track: nullptr
  • Selection status: false
  • User object: nullptr

Definition at line 42 of file AliEmcalTrackSelResultPtr.cxx.

AliEmcalTrackSelResultPtr::AliEmcalTrackSelResultPtr ( AliVTrack *  trk,
Bool_t  selectionStatus,
TObject userobject = nullptr 
)

Constructor, fully initializing the result with a track pointer,

Taking

Parameters
[in]trkPointer to the original track
[in]selectionStatusStatus of the selection (true - selected, false - rejected)
[in]userobjectUser information defined by the track selection (default: nullptr)

Definition at line 51 of file AliEmcalTrackSelResultPtr.cxx.

AliEmcalTrackSelResultPtr::AliEmcalTrackSelResultPtr ( const AliEmcalTrackSelResultPtr ref)

Copy constructor, copying infromation (for track pointer only the pointer itself)

Parameters
[in]refReference for the copy

Definition at line 60 of file AliEmcalTrackSelResultPtr.cxx.

AliEmcalTrackSelResultPtr::AliEmcalTrackSelResultPtr ( AliEmcalTrackSelResultPtr &&  ref)

Move constructor, implements move procedure for track selection results

Parameters
[in]refPointer to be moved

Definition at line 69 of file AliEmcalTrackSelResultPtr.cxx.

virtual PWG::EMCAL::AliEmcalTrackSelResultPtr::~AliEmcalTrackSelResultPtr ( )
inlinevirtual

Destructor.

Definition at line 309 of file AliEmcalTrackSelResultPtr.h.

Member Function Documentation

Int_t AliEmcalTrackSelResultPtr::Compare ( const TObject o) const
virtual

Definition at line 115 of file AliEmcalTrackSelResultPtr.cxx.

Bool_t PWG::EMCAL::AliEmcalTrackSelResultPtr::GetSelectionResult ( ) const
inline

Get the track selection status

Returns
True if the track is selected, false otherwise

Definition at line 398 of file AliEmcalTrackSelResultPtr.h.

Referenced by PWG::EMCAL::TestAliEmcalTrackSelResultPtr::AssertBool().

AliVTrack* PWG::EMCAL::AliEmcalTrackSelResultPtr::GetTrack ( ) const
inline

Access to underlying track

Returns
Underlying track

Definition at line 386 of file AliEmcalTrackSelResultPtr.h.

Referenced by AliTrackContainer::NextEvent().

const TObject* PWG::EMCAL::AliEmcalTrackSelResultPtr::GetUserInfo ( ) const
inline
Bool_t AliEmcalTrackSelResultPtr::IsEqual ( const TObject o) const
virtual

ROOT comparison function, checking for equalness. Comparison is based on the address of the track pointer.

Parameters
[in]oObject to be compared to
Returns
True if the underlying track pointers are equal, false otherwise

Definition at line 109 of file AliEmcalTrackSelResultPtr.cxx.

PWG::EMCAL::AliEmcalTrackSelResultPtr::operator bool ( ) const
inline

Boolean conversion operator. Access to the selection status

Returns
track selection status

Definition at line 355 of file AliEmcalTrackSelResultPtr.h.

AliVTrack * AliEmcalTrackSelResultPtr::operator* ( ) const

Pointer operator, returning pointer to underlying track

Returns
Pointer to the underlying track

Definition at line 123 of file AliEmcalTrackSelResultPtr.cxx.

AliVTrack * AliEmcalTrackSelResultPtr::operator-> ( ) const

Member access operator, returning pointer to the underlying track

Returns
Pointer to the underlying track

Definition at line 127 of file AliEmcalTrackSelResultPtr.cxx.

Bool_t AliEmcalTrackSelResultPtr::operator< ( const AliEmcalTrackSelResultPtr other) const

Comparison operator, checking whether this object is smaller than the reference object. Comparison is done based on the address of the track pointer.

Parameters
[in]otherObject to be compared to
Returns

Definition at line 105 of file AliEmcalTrackSelResultPtr.cxx.

AliEmcalTrackSelResultPtr & AliEmcalTrackSelResultPtr::operator= ( const AliEmcalTrackSelResultPtr ref)

Assignment operator, copies information from a reference into this object. As for the copy and move constructor only

Parameters
[in]refReference for the assignment
Returns
Object after assignment

Definition at line 79 of file AliEmcalTrackSelResultPtr.cxx.

AliEmcalTrackSelResultPtr & AliEmcalTrackSelResultPtr::operator= ( AliEmcalTrackSelResultPtr &&  ref)

Move assignment operator, copies information from a reference into this object. As for the copy and move constructor only

Parameters
[in]refReference for the assignment
Returns
Object after assignment

Definition at line 89 of file AliEmcalTrackSelResultPtr.cxx.

Bool_t AliEmcalTrackSelResultPtr::operator== ( const AliEmcalTrackSelResultPtr other) const

Comparison operator, checking for equalness. Comparison is based on the address of the track pointer.

Parameters
[in]otherObject to be compared to
Returns
True if the underlying track pointers are equal, false otherwise

Definition at line 101 of file AliEmcalTrackSelResultPtr.cxx.

void AliEmcalTrackSelResultPtr::PrintStream ( std::ostream &  stream) const

Create a stream representation of the object and put it on then stream;

Parameters
[in]streamStream used to print the object

Definition at line 131 of file AliEmcalTrackSelResultPtr.cxx.

Referenced by PWG::EMCAL::operator<<().

void PWG::EMCAL::AliEmcalTrackSelResultPtr::SetSelectionResult ( Bool_t  selectionResult)
inline

Set the track selection status

Parameters
[in]selectionResultTrue if the track is selected, false otherwise;

Definition at line 374 of file AliEmcalTrackSelResultPtr.h.

Referenced by AliEmcalTrackSelectionESD::IsTrackAccepted(), and AliEmcalTrackSelectionAOD::IsTrackAccepted().

void PWG::EMCAL::AliEmcalTrackSelResultPtr::SetTrack ( AliVTrack *  track)
inline

Set the track object handled by the track selection.

Parameters
track

Definition at line 368 of file AliEmcalTrackSelResultPtr.h.

void PWG::EMCAL::AliEmcalTrackSelResultPtr::SetUserInfo ( TObject userinfo)
inline

Set the track category flag

Parameters
flagFlag assigned to the track

Definition at line 380 of file AliEmcalTrackSelResultPtr.h.

Referenced by PWG::EMCAL::AliEmcalAODHybridTrackCuts::IsSelected().

Member Data Documentation

Bool_t PWG::EMCAL::AliEmcalTrackSelResultPtr::fSelectionResult
protected

Result of the track selection (true - selected, false - rejected)

Definition at line 402 of file AliEmcalTrackSelResultPtr.h.

Referenced by operator=(), and PrintStream().

AliVTrack* PWG::EMCAL::AliEmcalTrackSelResultPtr::fTrack
protected

Pointer to selected track.

Definition at line 401 of file AliEmcalTrackSelResultPtr.h.

Referenced by operator*(), operator->(), operator<(), operator=(), operator==(), and PrintStream().

AliEmcalTrackSelResultUserPtr PWG::EMCAL::AliEmcalTrackSelResultPtr::fUserInfo
protected

Selection flag (optional)

Definition at line 403 of file AliEmcalTrackSelResultPtr.h.

Referenced by AliEmcalTrackSelResultPtr(), operator=(), and PrintStream().


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