Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="471e62fc12de2b1c-c0ef67c1-44e14013-ae7ea2ac-3950bc872971541bf2c759cf"><ac:plain-text-body><![CDATA[

self.configBool(param_name[,default])

returns value of parameter as a boolean value, strings "yes", "true", "True", "on", "1" represent true value, strings "no", "false", "False", "off", "0" represent false value, any other string will raise exception. If parameter is not defined in a file then default value is returned without conversion, if default value was not given then exception is raised.

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="eee6d488d2062e5b-849f65e9-4c4042b1-9d03aeae-3c2c4719f2c58e135e1a5475"><ac:plain-text-body><![CDATA[

self.configInt(param_name[,default])

returns value of parameter as integer value. If parameter is not defined in a file then default value is returned without conversion, if default value was not given then exception is raised. If conversion from string to integer fails the standard exception is raised.

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="baa3e727809b164a-5ea70ccf-45fd4087-90219fd0-479c30e35914cb741ef0f83e"><ac:plain-text-body><![CDATA[

self.configFloat(param_name[,default])

returns value of parameter as floating point value. If parameter is not defined in a file then default value is returned without conversion, if default value was not given then exception is raised. If conversion from string to floating point fails the standard exception is raised.

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3543bcc3d1574dd4-f8a9512e-4b2546b8-86ca8de9-0205ff20f88f4417311bddfd"><ac:plain-text-body><![CDATA[

self.configStr(param_name[,default])

returns value of parameter as string. If parameter is not defined in a file then default value is returned without conversion, if default value was not given then exception is raised.

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="5638559d35fed62a-ffd618c8-420e4d59-ad8f8dba-702a8372aac951c3b3d47036"><ac:plain-text-body><![CDATA[

self.configSrc(param_name[,default])

returns value of parameter as "source address" string. If parameter is not defined in a file then default value is returned without conversion, if default value was not given then exception is raised. This method does the same as self.configStr but it may also check correctness of the source string format.

]]></ac:plain-text-body></ac:structured-macro>

self.configListBool(param_name)

returns value of parameter as a list of boolean values. If parameter is not defined in a file then empty list is returned, otherwise every word in a parameter value is converted to boolean (according to same rules as defined for self.configBool) and all values are returned in one list.

self.configListInt(param_name)

returns value of parameter as a list of integers. If parameter is not defined in a file then empty list is returned, otherwise every word in a parameter value is converted to integers and all numbers are returned in one list. Conversion errors will raise exception.

self.configListFloat(param_name)

returns value of parameter as a list of floating point numbers. If parameter is not defined in a file then empty list is returned, otherwise every word in a parameter value is converted to float and all numbers are returned in one list. Conversion errors will raise exception.

self.configListStr(param_name)

returns value of parameter as a list of strings. If parameter is not defined in a file then empty list is returned, otherwise parameter value is split into words which are returned in one list.

self.configListSrc(param_name)

returns value of parameter as a list of "source address" strings. If parameter is not defined in a file then empty list is returned, otherwise parameter value is split into words which are returned in one list.

...

Differences in data classes

Acqiris

Tables below provide summary of differences between data objects inside pyana and psana.

For pyana the pieces of code imply that following import statement appears somewhere in the module file:

Code Block

from pypdsdata import xtc

for psana this import should be replaced with

Code Block

import psana

In both pyana and psana the source address can be set with:

Code Block

        self.m_src = self.configSrc('source', '')

As it is discussed above pyana code can be run inside psana in compatibility mode. In this case the code needs changes only if data classes provide different interfaces.

Acqiris

pyana

psana

_pdsdata.acqiris

Psana.Acqiris

config = env.getConfig(xtc.TypeId.Type.Id_AcqConfig, self.m_src)

config = env.configStore().get(psana.Acqiris.Config, self.m_src)

acqData = evt.get(xtc.TypeId.Type.Id_AcqWaveform, self.m_src)

acqData = evt.get(psana.Acqiris.DataDesc, self.m_src)

access to data also differs...

 

Bld

pyana

psana

data = evt.get

pyana

psana

_pdsdata.acqiris

Psana.Acqiris

config = env.getConfig(xtc.TypeId.Type.Id_AcqConfigFEEGasDetEnergy, self.m_src)

config data = envevt.configStoreget().get("Psana::Acqiris::Config"psana.Bld.BldDataFEEGasDetEnergy, self.m_src)

acqData data = evt.get(xtc.TypeId.Type.Id_AcqWaveformEBeam, self.m_src)

acqData data = evt.get("Psana::Acqiris::DataDesc", self.m_src).data_list()

access to data also differs...

 

Bld

psana.Bld.BldDataEBeam, self.m_src

pyana

psana

data = evt.get(xtc.TypeId.Type.Id_FEEGasDetEnergyPhaseCavity, self.m_src)

{{}}

data = evt.get(xtcpsana.TypeId.Type.Id_EBeamBld.BldDataPhaseCavity, self.m_src) {{}}

data = evt.get(xtc.TypeId.Type.Id_PhaseCavityGMD, self.m_src)

{{}}

data = evt.get(xtcpsana.TypeId.Type.Id_GMDBld.BldDataGMD, self.m_src)

{{}}

{{}}

{{}}

{{}}

{{}}

CSPad

pyana

psana

{{}}

{{}}

CSPad2x2

...