AliPhysics  ff1d528 (ff1d528)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalTrackSelResultPtr Class Reference

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

#include <AliEmcalTrackSelResultPtr.h>

Inheritance diagram for AliEmcalTrackSelResultPtr:

Public Member Functions

 AliEmcalTrackSelResultPtr ()
 
 AliEmcalTrackSelResultPtr (AliVTrack *trk, Bool_t selectionStatus, ULong_t flag=0)
 
 AliEmcalTrackSelResultPtr (const AliEmcalTrackSelResultPtr &ref)
 
 AliEmcalTrackSelResultPtr (AliEmcalTrackSelResultPtr &&ref)
 
AliEmcalTrackSelResultPtroperator= (const AliEmcalTrackSelResultPtr &ref)
 
AliEmcalTrackSelResultPtroperator= (AliEmcalTrackSelResultPtr &&ref)
 
virtual ~AliEmcalTrackSelResultPtr ()
 
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)
 
void SetSelectionResult (Bool_t selectionResult)
 
void SetFlag (ULong_t flag)
 
AliVTrack * GetTrack () const
 
ULong_t GetFlag () 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...
 
ULong_t fFlag
 Selection flag (optional) More...
 

Friends

std::ostream & operator<< (std::ostream &stream, const AliEmcalTrackSelResultPtr &ref)
 

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 flag (bitmap) determining a track category
  • 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 41 of file AliEmcalTrackSelResultPtr.h.

Constructor & Destructor Documentation

AliEmcalTrackSelResultPtr::AliEmcalTrackSelResultPtr ( )

Dummy constructor, nothing to do Default values:

  • Track: nullptr
  • Selection status: false
  • Flag: 0

Definition at line 23 of file AliEmcalTrackSelResultPtr.cxx.

AliEmcalTrackSelResultPtr::AliEmcalTrackSelResultPtr ( AliVTrack *  trk,
Bool_t  selectionStatus,
ULong_t  flag = 0 
)

Constructor, fully initializing the result with a track pointer,

Parameters
[in]trkPointer to the original track
[in]selectionStatusStatus of the selection (true - selected, false - rejected)
[in]flagFlag for a track category (optional, default: 0)

Definition at line 32 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 41 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 50 of file AliEmcalTrackSelResultPtr.cxx.

virtual AliEmcalTrackSelResultPtr::~AliEmcalTrackSelResultPtr ( )
inlinevirtual

Destructor, nothing to do

Definition at line 92 of file AliEmcalTrackSelResultPtr.h.

Member Function Documentation

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

Definition at line 95 of file AliEmcalTrackSelResultPtr.cxx.

ULong_t AliEmcalTrackSelResultPtr::GetFlag ( ) const
inline

Get the flag assigned to the track selection status

Returns
Track flag

Definition at line 183 of file AliEmcalTrackSelResultPtr.h.

Bool_t AliEmcalTrackSelResultPtr::GetSelectionResult ( ) const
inline

Get the track selection status

Returns
True if the track is selected, false otherwise

Definition at line 189 of file AliEmcalTrackSelResultPtr.h.

AliVTrack* AliEmcalTrackSelResultPtr::GetTrack ( ) const
inline

Access to underlying track

Returns
Underlying track

Definition at line 177 of file AliEmcalTrackSelResultPtr.h.

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 89 of file AliEmcalTrackSelResultPtr.cxx.

AliEmcalTrackSelResultPtr::operator bool ( ) const
inline

Boolean conversion operator. Access to the selection status

Returns
track selection status

Definition at line 138 of file AliEmcalTrackSelResultPtr.h.

AliVTrack * AliEmcalTrackSelResultPtr::operator* ( ) const

Pointer operator, returning pointer to underlying track

Returns
Pointer to the underlying track

Definition at line 103 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 107 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 85 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 59 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 69 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 81 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 111 of file AliEmcalTrackSelResultPtr.cxx.

Referenced by operator<<().

void AliEmcalTrackSelResultPtr::SetFlag ( ULong_t  flag)
inline

Set the track category flag

Parameters
flagFlag assigned to the track

Definition at line 171 of file AliEmcalTrackSelResultPtr.h.

void AliEmcalTrackSelResultPtr::SetSelectionResult ( Bool_t  selectionResult)
inline

Set the track selection status

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

Definition at line 165 of file AliEmcalTrackSelResultPtr.h.

void AliEmcalTrackSelResultPtr::SetTrack ( AliVTrack *  track)
inline
Parameters
track

Definition at line 159 of file AliEmcalTrackSelResultPtr.h.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const AliEmcalTrackSelResultPtr ref 
)
friend

Streaming operator, print content of the track selection result to the stream

Parameters
streamStream for the printing
refObject to be streamed
Returns
Reference to the original stream after printing the object

Definition at line 117 of file AliEmcalTrackSelResultPtr.cxx.

Member Data Documentation

ULong_t AliEmcalTrackSelResultPtr::fFlag
protected

Selection flag (optional)

Definition at line 194 of file AliEmcalTrackSelResultPtr.h.

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

Bool_t AliEmcalTrackSelResultPtr::fSelectionResult
protected

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

Definition at line 193 of file AliEmcalTrackSelResultPtr.h.

Referenced by GetSelectionResult(), operator bool(), operator=(), PrintStream(), and SetSelectionResult().

AliVTrack* AliEmcalTrackSelResultPtr::fTrack
protected

Pointer to selected track.

Definition at line 192 of file AliEmcalTrackSelResultPtr.h.

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


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