Programming Reference for VirtualLab Fusion  2022.1
Public Member Functions | Properties | List of all members
DetectorResultObject Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class representing a the result of a detector. The result can be either a list of physical values or a single physical value, a VirtualLab document type, or a special object combining field data and view properties (ComplexAmplitudeView or HarmonicFieldsSetView). More...

Inheritance diagram for DetectorResultObject:

Public Member Functions

override object Clone ()
 Creates a new object that is a copy of the current instance. More...
 
 DetectorResultObject (ComplexAmplitude data, string detectorName, string subDetector="")
 Constructor if the detector returns a ComplexAmplitude object. This constructor creates internally a ComplexAmplitudeView to set as data as the parameter run provides nice Combined Outputs only for a ComplexAmplitudeView, not a ComplexAmplitude. More...
 
 DetectorResultObject (HarmonicFieldsSet data, string detectorName, string subDetector="")
 Constructor if the detector returns a HarmonicFieldsSet object. This constructor creates internally a HarmonicFieldsSetView to set as data as the parameter run provides nice Combined Outputs only for a HarmonicFieldsSetView, not a HarmonicFieldsSet. More...
 
 DetectorResultObject (IDocument data, string detectorName, string subDetector="")
 Constructor if the detector returns an IDocument object (for example a DataArrayBase object). More...
 
 DetectorResultObject (List< PhysicalValue > data, string description)
 Constructor if the detector returns a list of PhysicalValue objects. More...
 
 DetectorResultObject (List< PhysicalValueBase > data, string description)
 Constructor if the detector returns a list of PhysicalValueBase objects. More...
 
 DetectorResultObject (PhysicalValueBase data, string description)
 Constructor if the detector returns a single PhysicalValueBase object. More...
 
override bool Equals (object otherObject, EqualityIntent equalityIntent)
 Determines whether the specified Object is equal to this instance. More...
 
bool IsCalculated ()
 Flag which determines whether results are already inserted to the DetectorResultObject. More...
 
int Show (LightPathLog logger)
 Shows the DetectorResultObject either in the "Detector Results" panel of the main window or as separate document. More...
 

Properties

string CompleteTitle [get]
 Gets the complete title (description [= detector name] + sub-detector. More...
 
object Data [get]
 Gets the result data of the detector.
 
string Description [get, set]
 Gets and sets the name of the detector to which this result belongs. More...
 
string SubDetector [get, set]
 Gets and sets the name of the sub-detector to which this result belongs. More...
 
Type Type [get]
 Gets the type of the result data.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class representing a the result of a detector. The result can be either a list of physical values or a single physical value, a VirtualLab document type, or a special object combining field data and view properties (ComplexAmplitudeView or HarmonicFieldsSetView).

Constructor & Destructor Documentation

◆ DetectorResultObject() [1/6]

DetectorResultObject ( IDocument  data,
string  detectorName,
string  subDetector = "" 
)

Constructor if the detector returns an IDocument object (for example a DataArrayBase object).

Parameters
dataThe result data of the detector.
detectorNameThe name of the detector to which this result belongs.
subDetectorOptional name of the sub-detector to which this result belongs.
Exceptions
System.ArgumentExceptionThe given document is not serializable.

◆ DetectorResultObject() [2/6]

DetectorResultObject ( ComplexAmplitude  data,
string  detectorName,
string  subDetector = "" 
)

Constructor if the detector returns a ComplexAmplitude object. This constructor creates internally a ComplexAmplitudeView to set as data as the parameter run provides nice Combined Outputs only for a ComplexAmplitudeView, not a ComplexAmplitude.

Parameters
dataThe result data of the detector.
detectorNameThe name of the detector to which this result belongs.
subDetectorOptional name of the sub-detector to which this result belongs.

◆ DetectorResultObject() [3/6]

DetectorResultObject ( HarmonicFieldsSet  data,
string  detectorName,
string  subDetector = "" 
)

Constructor if the detector returns a HarmonicFieldsSet object. This constructor creates internally a HarmonicFieldsSetView to set as data as the parameter run provides nice Combined Outputs only for a HarmonicFieldsSetView, not a HarmonicFieldsSet.

Parameters
dataThe result data of the detector.
detectorNameThe name of the detector to which this result belongs.
subDetectorOptional name of the sub-detector to which this result belongs.

◆ DetectorResultObject() [4/6]

DetectorResultObject ( List< PhysicalValue data,
string  description 
)

Constructor if the detector returns a list of PhysicalValue objects.

Parameters
dataThe result data of the detector.
descriptionThe description of the detector.

◆ DetectorResultObject() [5/6]

DetectorResultObject ( List< PhysicalValueBase data,
string  description 
)

Constructor if the detector returns a list of PhysicalValueBase objects.

Parameters
dataThe result data of the detector.
descriptionThe description of the detector.

◆ DetectorResultObject() [6/6]

DetectorResultObject ( PhysicalValueBase  data,
string  description 
)

Constructor if the detector returns a single PhysicalValueBase object.

Parameters
dataThe result data of the detector.
descriptionThe description of the detector.

Member Function Documentation

◆ Clone()

override object Clone ( )

Creates a new object that is a copy of the current instance.

Returns
A new object that is a copy of this instance.

◆ Equals()

override bool Equals ( object  otherObject,
EqualityIntent  equalityIntent 
)

Determines whether the specified Object is equal to this instance.

Parameters
otherObjectThe Object to compare with this instance.
equalityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or just physical equality.
Returns
true if the specified Object is equal to this instance; otherwise, false.

◆ IsCalculated()

bool IsCalculated ( )

Flag which determines whether results are already inserted to the DetectorResultObject.

Returns
TRUE: Results have already been added.

◆ Show()

int Show ( LightPathLog  logger)

Shows the DetectorResultObject either in the "Detector Results" panel of the main window or as separate document.

Parameters
loggerThe logger of the parent light path. If you use this function for an analyzer, insert "null" as there is no logging concept for analyzers.
Returns
The index of the resulting document window if there is one. Otherwise -1 is returned.

Property Documentation

◆ CompleteTitle

string CompleteTitle
get

Gets the complete title (description [= detector name] + sub-detector.

Only the Description if SubDetector is empty or null, "{SubDetector} � {Description}" otherwise.

◆ Description

string Description
getset

Gets and sets the name of the detector to which this result belongs.


◆ SubDetector

string SubDetector
getset

Gets and sets the name of the sub-detector to which this result belongs.