Programming Reference for VirtualLab Fusion  2026.1
Loading...
Searching...
No Matches
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.
 
new void DeserializationPostProcessing (ref List< FieldInfo > unfindableFields, RemainingData remainingData)
 Method for some post processing after deserialization.
 
 DetectorResultObject (IDocument data, string detectorName, string subDetector="")
 Constructor if the detector returns an IDocument object (for example a DataArrayBase object).
 
 DetectorResultObject (List< PhysicalValue > data, string description)
 Constructor if the detector returns a list of PhysicalValue objects.
 
 DetectorResultObject (List< PhysicalValueBase > data, string description)
 Constructor if the detector returns a list of PhysicalValueBase objects.
 
override bool Equals (object? otherObject, EqualityIntent equalityIntent)
 Determines whether the specified Object is equal to this instance.
 
IDocument GetDataAsDocument ()
 Gets the data as document.
 
override int GetHashCode ()
 
bool IsCalculated ()
 Flag which determines whether results are already inserted to the DetectorResultObject.
 
void Show (DetectingDeviceBaseOSE generatingDetectingDevice, SnippetWithSourceCode? snippet=null, string caption="", LightPathLog? logger=null)
 Shows the specified generating detecting device. Shows a reference.
 
void Show (Lightpath parentSetup, string caption="", LightPathLog logger=null)
 Shows the specified generating detecting device. Shows a reference.
 

Properties

string CompleteTitle [get]
 Gets the complete title (description [= detector name] + sub-detector.
 
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.
 
string SubDetector [get, set]
 Gets and sets the name of the sub-detector to which this result belongs.
 
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/3]

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/3]

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() [3/3]

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.

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.

◆ DeserializationPostProcessing()

new void DeserializationPostProcessing ( ref List< FieldInfo > unfindableFields,
RemainingData remainingData )

Method for some post processing after deserialization.

Parameters
unfindableFieldsFields which could not be deserialized.
remainingDataField data which are left and couldn't be matched to existing fields.

◆ 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.

◆ GetDataAsDocument()

IDocument GetDataAsDocument ( )

Gets the data as document.

Returns
The data as document. null of the data is a list of physical values.

◆ IsCalculated()

bool IsCalculated ( )

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

Returns
TRUE: Results have already been added.

◆ Show() [1/2]

void Show ( DetectingDeviceBaseOSE generatingDetectingDevice,
SnippetWithSourceCode? snippet = null,
string caption = "",
LightPathLog? logger = null )

Shows the specified generating detecting device. Shows a reference.

Parameters
generatingDetectingDeviceThe generating detecting device.
snippetOptional snippet that generated the result.
captionThe caption of the resulting document window. if this optional parameter is not specified, "{subDetectorString} � {detectorString}" is used.
loggerOptional logger (for Classic Field Tracing).

◆ Show() [2/2]

void Show ( Lightpath parentSetup,
string caption = "",
LightPathLog logger = null )

Shows the specified generating detecting device. Shows a reference.

Parameters
parentSetupThe parent Optical containing the detector (and maybe detector add-on) which generated the result.
captionThe caption of the resulting document window. if this optional parameter is not specified, "{subDetectorString} � {detectorString}" is used.
loggerOptional logger (for Classic Field Tracing).

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.