#include <TGo4FitSlot.h>
Inheritance diagram for TGo4FitSlot:
Public Methods | |
TGo4FitSlot () | |
Default constructor. More... | |
TGo4FitSlot (TNamed *iOwner, TClass *iClass) | |
Creates TGo4FitSlot object. More... | |
TGo4FitSlot (const char *iName, const char *iTitle, TNamed *iOwner, TClass *iClass, Bool_t iNeeded=kFALSE, TObject *iObject=0, Bool_t iOwned=kFALSE) | |
Creates TGo4FitSlot object. More... | |
virtual | ~TGo4FitSlot () |
Destroys TFo4FitSlot object. More... | |
TClass * | GetClass () |
Return pointer on class for desired object. More... | |
void | SetDefaults (TNamed *iOwner, TClass *iClass) |
Set basic fields of slot. More... | |
void | SetSaveFlag (Int_t iSaveFlag) |
Set save flag for saving of object in slot, when slot stored to streamer: 0 - object will be saved if it owned, 1 - object always will be saved 2 - object never will be saved. More... | |
Int_t | GetSaveFlag () |
Returns save flag. More... | |
Bool_t | IsSuitable (TObject *obj) |
Checks, if object class corresponds to class, specified for slot. More... | |
Bool_t | SetObject (TObject *iObject, Bool_t iOwned=kFALSE, Bool_t CheckClass=kTRUE) |
Sets object to slot. More... | |
Bool_t | ConnectToSlot (TGo4FitSlot *slot) |
Connect this slot to provided slot. More... | |
Bool_t | CanConnectToSlot (TGo4FitSlot *slot) |
Checks, if slot can be connected to other. More... | |
TGo4FitSlot * | GetConnectedSlot () const |
Returns pointer to connected slot or 0, if not connected. More... | |
Bool_t | IsConnectedToSlot () const |
Returns kTRUE, if slot connected to another slot. More... | |
void | ClearConnectionToSlot () |
Clear connection to other slot. More... | |
TObject * | GetObject () const |
Return pointer on assigned object. More... | |
const char * | GetObjectName () const |
Return name of assigned object. More... | |
TObject * | CloneObject (const char *newname=0) |
Clone object in slot and returns pointer on new object. More... | |
void | Clear () |
Clear pointer on object in slot. More... | |
Bool_t | GetOwned () |
Return ownership flag. More... | |
void | SetOwned (Bool_t iOwned=kTRUE) |
Explicity sets ownership flag. More... | |
Bool_t | GetNeeded () |
Return requirement status for slot. More... | |
void | SetNeeded (Bool_t iNeeded) |
Set requirement flag for object. More... | |
Bool_t | IsEmpty () const |
Return kTRUE, if no object in slot. More... | |
Bool_t | IsObject () const |
Return kTRUE, if object assigned to slot. More... | |
Bool_t | IsRequired () const |
Returns kTRUE, if object required, but not yet set. More... | |
virtual void | Print (Option_t *option) const |
Print information on standard output. More... | |
Protected Methods | |
void | SetSaveSettings (Int_t save=-1, Int_t own=-1) |
Bool_t | HasSaveSettings () |
Bool_t | WillBeSaved () |
void | CheckOwnership () |
Sets up ownership relation between object and owner of slot. More... | |
Protected Attributes | |
TClass * | fxClass |
Class of object, which should be assigned to slot. More... | |
Int_t | fiSaveFlag |
Describe saving of object in slot. More... | |
Bool_t | fbOwned |
Ownership flag of object. More... | |
Bool_t | fbNeeded |
Flag, is this object should always be set. More... | |
TObject * | fxObject |
Pointer on assigned object. More... | |
Int_t | fiSaveSlot |
Int_t | fiSaveOwnership |
Friends | |
class | TGo4FitSlotList |
General purpose of this object - store pointer on any kind of object (derived from TObject) with/without ownership and provide a general interface to set/get and store/restore this object. Slot always belong to another object (has owner). Slot always knows, what kind of object should be assigned to it (via Class property). Slots may be distributed in different places of fitter: in data object (typically for assigning data like TH1, TGraph or other), sometimes in model object (like in TGo4FitModelFromData in slot TGo4FitData object should be placed to provide bins for model component) or complex hierarchy of these objects possible. Fitter has a method to collect a list of all slots from all possible places. Once all slots are collected, fitter know, how many and what kind of objects should be (or can be) assigned to fitter before start fitting. Fitter (see TGo4FitterAbstract description) has a set of function for manipulating with objects in slots.
Definition at line 29 of file TGo4FitSlot.h.
|
Default constructor.
Definition at line 23 of file TGo4FitSlot.cxx. |
|
Creates TGo4FitSlot object. This constructor should be called in default constrcutor of object, where slot situated. Constructor only sets owner of slot, desired class of object and if this object should be always owned. The rest values (name, title, object and so on) should be restored by streamer, which typically calls default constructor. Definition at line 27 of file TGo4FitSlot.cxx. References TGo4FitNamed::SetOwner(). |
|
Creates TGo4FitSlot object. This constrcutor should be placed in normal constructor of object, where slot is situated. Constructor sets name and title of slot, owner of slot, desired class of object and if this object always should be owned. Optionally, requirements of object (is it always needed or not, default - not), pointer on object and ownership flag can be specified. Definition at line 33 of file TGo4FitSlot.cxx. |
|
Destroys TFo4FitSlot object.
Definition at line 41 of file TGo4FitSlot.cxx. |
|
Return pointer on class for desired object.
Definition at line 63 of file TGo4FitSlot.h. References fxClass. Referenced by CanConnectToSlot(), TGo4FitSlotList::CheckObjects(), TGo4FitPanelSlots::FillPopupForSlot(), TGo4FitPanelSlots::FindSlotStatusForDraw(), IsSuitable(), TGo4FitterAbstract::ProcessObjects(), and SetObject(). |
|
Set basic fields of slot. See proper constructor for description. Normally should not be called by user. Definition at line 46 of file TGo4FitSlot.cxx. References fxClass, and TGo4FitNamed::SetOwner(). |
|
Set save flag for saving of object in slot, when slot stored to streamer: 0 - object will be saved if it owned, 1 - object always will be saved 2 - object never will be saved.
Definition at line 77 of file TGo4FitSlot.h. References fiSaveFlag. Referenced by TGo4FitSlotList::SetSaveFlagForObjects(). |
|
Returns save flag.
Definition at line 82 of file TGo4FitSlot.h. References fiSaveFlag. |
|
Checks, if object class corresponds to class, specified for slot.
Definition at line 73 of file TGo4FitSlot.cxx. References GetClass(), GetConnectedSlot(), and IsConnectedToSlot(). Referenced by TGo4FitPanelSlots::DropEvent(), TGo4FitPanelSlots::ExecutePopupForSlot(), TGo4FitPanelSlots::FillPopupForSlot(), TGo4FitterAbstract::ProcessObjects(), TGo4FitSlotList::SetObject(), and TGo4FitPanelSlots::UpdateObjectReferenceFor(). |
|
Sets object to slot. First, if before another object was set to slot with ownership flag, it will be destroyd. Then, if object should always be owned by slot, but object is assigning without ownersip, it will be cloned and clone will be assigned with ownership flag. if CheckClass==kTRUE (default), slot will refuse unsuitable object class. If object owned by slot, it always be destroyed by slot. Definition at line 79 of file TGo4FitSlot.cxx. References CheckOwnership(), fbOwned, fxObject, GetClass(), GetConnectedSlot(), and IsConnectedToSlot(). Referenced by Clear(), TGo4FitPanelSlots::DropEvent(), TGo4FitPanelSlots::ExecutePopupForSlot(), TGo4FitterAbstract::ProcessObjects(), TGo4FitPanelSlots::RemovePanelFromSlotsStatusList(), TGo4FitDataRidge::SetData(), TGo4FitModelFromData::SetDataAsModel(), TGo4FitDataGraph::SetGraph(), TGo4FitDataHistogram::SetHistogram(), TGo4FitSlotList::SetObject(), TGo4FitDataProfile::SetProfile(), TGo4FitPanelSlots::UpdateObjectReferenceFor(), and TGo4FitPanelSlots::UpdateObjectReferenceInSlots(). |
|
Connect this slot to provided slot. This means, that objects, containing in slot will be also return by GetObject() of current slot. Class of slots should be compatible Returns kTRUE, if operation successfull Definition at line 49 of file TGo4FitSlot.cxx. References CanConnectToSlot(), fbOwned, and fxObject. Referenced by TGo4FitSlotList::ConnectSlots(), and TGo4FitPanelSlots::ExecutePopupForSlot(). |
|
Checks, if slot can be connected to other.
Definition at line 57 of file TGo4FitSlot.cxx. References GetClass(), and GetConnectedSlot(). Referenced by ConnectToSlot(), and TGo4FitPanelSlots::FillPopupForSlot(). |
|
Returns pointer to connected slot or 0, if not connected.
Definition at line 114 of file TGo4FitSlot.h. Referenced by CanConnectToSlot(), TGo4Fitter::CheckSlotsBeforeDelete(), TGo4FitSlotList::ClearSlot(), TGo4FitPanelSlots::FillPopupForSlot(), GetObject(), IsConnectedToSlot(), IsSuitable(), Print(), SetObject(), and TGo4FitPanelSlots::Wiz_GetSlotSourceInfo(). |
|
Returns kTRUE, if slot connected to another slot.
Definition at line 119 of file TGo4FitSlot.h. References GetConnectedSlot(). Referenced by TGo4FitSlotList::CheckDuplicatesOnSlot(), CheckOwnership(), ClearConnectionToSlot(), TGo4FitSlotList::ClearSlot(), GetObject(), IsSuitable(), TGo4FitSlotList::PrepareSlotsForWriting(), Print(), and SetObject(). |
|
Clear connection to other slot.
Definition at line 66 of file TGo4FitSlot.cxx. References fbOwned, fxObject, and IsConnectedToSlot(). Referenced by TGo4Fitter::CheckSlotsBeforeDelete(), and TGo4FitPanelSlots::ExecutePopupForSlot(). |
|
Return pointer on assigned object.
Definition at line 93 of file TGo4FitSlot.cxx. References fxObject, GetConnectedSlot(), and IsConnectedToSlot(). Referenced by TGo4FitSlotList::CheckDuplicatesOnSlot(), TGo4FitSlotList::ClearSlot(), CloneObject(), TGo4FitComponent::CollectParsTo(), TGo4FitData::GetAxisTrans(), TGo4FitDataRidge::GetData(), TGo4FitModelFromData::GetDataAsModel(), TGo4FitDataGraph::GetGraph(), TGo4FitDataHistogram::GetHistogram(), GetObjectName(), TGo4FitDataProfile::GetProfile(), IsEmpty(), IsObject(), TGo4FitSlotList::IsObjectInSlots(), TGo4FitSlotList::PrepareSlotsForWriting(), TGo4FitterAbstract::ProcessObjects(), TGo4FitPanelSlots::UpdateItem(), and TGo4FitPanelSlots::UpdateSlotsStatusList(). |
|
Return name of assigned object.
Definition at line 98 of file TGo4FitSlot.cxx. References GetObject(). Referenced by Print(). |
|
Clone object in slot and returns pointer on new object. Name of new object can be optionally specified. Definition at line 104 of file TGo4FitSlot.cxx. References GetObject(). Referenced by TGo4FitPanelSlots::ExecutePopupForSlot(). |
|
Clear pointer on object in slot. If object owned, it will be destroyed. Definition at line 146 of file TGo4FitSlot.h. References SetObject(). Referenced by TGo4FitSlotList::ClearSlot(). |
|
Return ownership flag.
Definition at line 151 of file TGo4FitSlot.h. References fbOwned. Referenced by TGo4FitSlotList::CheckDuplicatesOnSlot(), TGo4FitSlotList::ClearSlot(), TGo4FitComponent::CollectParsTo(), TGo4FitPanelSlots::FillPopupForSlot(), TGo4FitSlotList::IsObjectInSlots(), TGo4FitSlotList::PrepareSlotsForWriting(), and TGo4FitPanelSlots::UpdateSlotsStatusList(). |
|
Explicity sets ownership flag. Normally should not be called by user. Definition at line 157 of file TGo4FitSlot.h. References fbOwned. Referenced by TGo4FitSlotList::CheckDuplicatesOnSlot(), TGo4FitSlotList::ClearSlot(), and TGo4FitSlotList::PrepareSlotsForWriting(). |
|
Return requirement status for slot. If kTRUE, object should always be sets before any fitting become possible. Definition at line 163 of file TGo4FitSlot.h. References fbNeeded. |
|
Set requirement flag for object.
Definition at line 168 of file TGo4FitSlot.h. References fbNeeded. |
|
Return kTRUE, if no object in slot.
Definition at line 173 of file TGo4FitSlot.h. References GetObject(). Referenced by TGo4FitSlotList::IsEmptySlots(), IsRequired(), and TGo4FitSlotList::SetObject(). |
|
Return kTRUE, if object assigned to slot.
Definition at line 178 of file TGo4FitSlot.h. References GetObject(). Referenced by TGo4FitPanelSlots::FillPopupForSlot(). |
|
Returns kTRUE, if object required, but not yet set.
Definition at line 183 of file TGo4FitSlot.h. References fbNeeded, and IsEmpty(). Referenced by TGo4FitSlotList::CheckObjects(), and TGo4FitterAbstract::ProcessObjects(). |
|
Print information on standard output.
Reimplemented from TGo4FitNamed. Definition at line 110 of file TGo4FitSlot.cxx. References fbNeeded, fbOwned, fxClass, fxObject, GetConnectedSlot(), GetObjectName(), and IsConnectedToSlot(). Referenced by TGo4FitDataProfile::Print(), TGo4FitDataHistogram::Print(), and TGo4FitDataGraph::Print(). |
|
Definition at line 136 of file TGo4FitSlot.cxx. References fiSaveOwnership, and fiSaveSlot. Referenced by TGo4FitSlotList::PrepareSlotsForWriting(). |
|
Definition at line 141 of file TGo4FitSlot.cxx. References fiSaveOwnership, and fiSaveSlot. Referenced by TGo4FitSlotList::PrepareSlotsForWriting(). |
|
Definition at line 132 of file TGo4FitSlot.cxx. References fbOwned, and fiSaveFlag. Referenced by TGo4FitSlotList::PrepareSlotsForWriting(). |
|
Sets up ownership relation between object and owner of slot. If object owned by slot and object drived from TGo4FitNamed class, the owner of slot becames the owned of object. This gives an ability to combine FullName of TGo4FitNamed object according ownership relation. Definition at line 124 of file TGo4FitSlot.cxx. References fbOwned, TGo4FitNamed::GetOwner(), IsConnectedToSlot(), and TGo4FitNamed::SetOwner(). Referenced by SetObject(). |
|
Definition at line 193 of file TGo4FitSlot.h. |
|
Class of object, which should be assigned to slot.
Definition at line 211 of file TGo4FitSlot.h. Referenced by GetClass(), Print(), and SetDefaults(). |
|
Describe saving of object in slot.
Definition at line 216 of file TGo4FitSlot.h. Referenced by GetSaveFlag(), SetSaveFlag(), and WillBeSaved(). |
|
Ownership flag of object.
Definition at line 222 of file TGo4FitSlot.h. Referenced by CheckOwnership(), ClearConnectionToSlot(), ConnectToSlot(), GetOwned(), Print(), SetObject(), SetOwned(), WillBeSaved(), and ~TGo4FitSlot(). |
|
Flag, is this object should always be set.
Definition at line 227 of file TGo4FitSlot.h. Referenced by GetNeeded(), IsRequired(), Print(), and SetNeeded(). |
|
Pointer on assigned object.
Definition at line 232 of file TGo4FitSlot.h. Referenced by ClearConnectionToSlot(), ConnectToSlot(), GetObject(), Print(), SetObject(), and ~TGo4FitSlot(). |
|
Definition at line 234 of file TGo4FitSlot.h. Referenced by HasSaveSettings(), and SetSaveSettings(). |
|
Definition at line 235 of file TGo4FitSlot.h. Referenced by HasSaveSettings(), and SetSaveSettings(). |