![]() |
AliPhysics
4c9ecbb (4c9ecbb)
|
Handler for user objects attached to the track selection result ptr. More...
#include <AliEmcalTrackSelResultPtr.h>
Public Member Functions | |
AliEmcalTrackSelResultUserPtr () | |
Dummy constructor. More... | |
AliEmcalTrackSelResultUserPtr (TObject *o) | |
Main constructor setting the data. More... | |
AliEmcalTrackSelResultUserPtr (const AliEmcalTrackSelResultUserPtr &ref) | |
Copy constructor. More... | |
AliEmcalTrackSelResultUserPtr (AliEmcalTrackSelResultUserPtr &&ref) | |
Move constructor. More... | |
AliEmcalTrackSelResultUserPtr & | operator= (const AliEmcalTrackSelResultUserPtr &ref) |
Assignment operator. More... | |
AliEmcalTrackSelResultUserPtr & | operator= (AliEmcalTrackSelResultUserPtr &&ref) |
Move assignment operator. More... | |
virtual | ~AliEmcalTrackSelResultUserPtr () |
Destructor. More... | |
TObject * | GetData () const |
Get the object handled by the storage. More... | |
Private Attributes | |
AliEmcalTrackSelResultUserStorage * | fUserStorage |
Underlying user storage for reference counting. More... | |
Handler for user objects attached to the track selection result ptr.
Handling the lifetime of the object attached to the AliEmcalTrackSelResultPtr using reference counting technique. Pointer instances created from the current pointer using the copy constructor or assignment operator connect to the common storage and disconnect once they are constructed. The last instance connected to a storage deletes it.
This class is foreseen to be used only from within AliEmcalTrackSelResultPtr.
Definition at line 140 of file AliEmcalTrackSelResultPtr.h.
AliEmcalTrackSelResultUserPtr::AliEmcalTrackSelResultUserPtr | ( | ) |
Dummy constructor.
Not handling object
Definition at line 183 of file AliEmcalTrackSelResultPtr.cxx.
AliEmcalTrackSelResultUserPtr::AliEmcalTrackSelResultUserPtr | ( | TObject * | o | ) |
Main constructor setting the data.
Allocating the storage for the data hanlding and initializes the reference count
o | Object to be handled by the user pointer |
Definition at line 190 of file AliEmcalTrackSelResultPtr.cxx.
AliEmcalTrackSelResultUserPtr::AliEmcalTrackSelResultUserPtr | ( | const AliEmcalTrackSelResultUserPtr & | ref | ) |
Copy constructor.
Creating a new pointer instance connected to the same storage
ref | Reference for the copy |
Definition at line 197 of file AliEmcalTrackSelResultPtr.cxx.
AliEmcalTrackSelResultUserPtr::AliEmcalTrackSelResultUserPtr | ( | AliEmcalTrackSelResultUserPtr && | ref | ) |
Move constructor.
Only transferring the storage, has no consequence on the reference count
ref | Object to be moved |
Definition at line 207 of file AliEmcalTrackSelResultPtr.cxx.
|
virtual |
Destructor.
Disconnects pointer instance from the common storage. If it is the last pointer instance conneted to the storage deletes the storage as well.
Definition at line 253 of file AliEmcalTrackSelResultPtr.cxx.
|
inline |
Get the object handled by the storage.
Definition at line 212 of file AliEmcalTrackSelResultPtr.h.
Referenced by PWG::EMCAL::AliEmcalTrackSelResultPtr::PrintStream().
AliEmcalTrackSelResultUserPtr & AliEmcalTrackSelResultUserPtr::operator= | ( | const AliEmcalTrackSelResultUserPtr & | ref | ) |
Assignment operator.
Connecting pointer instance to the storage connected to by ref. In case the pointer handles a storage itself disconnects from the storage
ref | Reference for assignment |
Definition at line 218 of file AliEmcalTrackSelResultPtr.cxx.
AliEmcalTrackSelResultUserPtr & AliEmcalTrackSelResultUserPtr::operator= | ( | AliEmcalTrackSelResultUserPtr && | ref | ) |
Move assignment operator.
Connecting pointer instance to the storage connected to by ref. In case the pointer handles a storage itself disconnects from the storage
ref | Object to be moved |
Definition at line 235 of file AliEmcalTrackSelResultPtr.cxx.
|
private |
Underlying user storage for reference counting.
Definition at line 215 of file AliEmcalTrackSelResultPtr.h.
Referenced by AliEmcalTrackSelResultUserPtr(), operator=(), and ~AliEmcalTrackSelResultUserPtr().