public void EmitFunction() { var fso1 = new FinalStateObject() { Name = "J1", BaseDefinition = null }; var fso2 = new FinalStateObject() { Name = "J2", BaseDefinition = null }; var fpv = new FunctionPhysicalQuantity() { ArgumentList = "J1.pT > 20, ET > 0, J2", Name = "NTrack", RefersToObjects = new FinalStateObject[] { fso1, fso2 } }; var ms = new StringWriter(); fpv.Emit(ms); var text = ms.ToString().Trim(); Assert.AreEqual("atlas:functionQuantity0 rdf:type dfs:PhysicalQuantity ;\r\n dfs:refersToObject atlas:J1 , atlas:J2 ;\r\n dfs:hasQuantity \"NTrack(J1.pT > 20, ET > 0, J2)\" .", text); }
/// <summary> /// Return a function's referenced items. /// </summary> /// <param name="functionPhysicalQuantity"></param> /// <returns></returns> private IEnumerable<FinalStateObject> ExtractFSOReferences(FunctionPhysicalQuantity functionPhysicalQuantity) { return functionPhysicalQuantity.RefersToObjects; }