Versions Compared

Key

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

...

  • filter out whole events from translation
  • filter out certain data, by data type, or by data source, or key string
  • write ndarray's that other modules add to the event store or configStore
  • write std::string's that other C++ modules add to the event store or configStore
  • include summary data for calib cycles
  • advanced: have a C++ module register a new type for translation

...

The translator will write NDarrays, C++ std::strings, and C++ types that the user registers.  Presently, registering new types is an advanced feature that requires familiarity with hdf5 programming. To add data to the translation, one must write a Psana module that adds this data into the event or configStore before the Translator.H5Output module runs.

Event vs. ConfigStore

Most user modules will add data to the event. Such data will be written into stacked datasets, that is a 1D dataset of a type X based on the user data. In this 1D dataset, there will be one entry for each event the user module added data. Alongside this data, in a dataset named "data" will be a dataset named "time". The "time" dataset will have the event id's corresponding to the Psana Events the from which the user module added data.

Data added to the configStore is not written out in "stacked" datasets. It is written out in "one shot". The intention is that users may add some configuration during begincalibcycle, and some summary information during endcalibcycle. It is not recommended that users add data to the configStore for the purpose of translation during regular events. During endcalibcycle, the Translator will check for new data in the configStore(). If it finds it, it will create a subgroup called EndData, such as

Code Block
/Configure:0000/Run:0000/CalibCycle:0000/EndData

In this way, when a user Psana module processes endcalibcycle, it can add summary data to the configStore that will be picked up by the Translator.

NDArrays and Strings

ndarrays (up to dimension 4 of the standard integral types, floats and doubles) as well as std::string's that are written into the event store will be written to the hdf5 by default.  ndarrays can be passed to the Translator by Python modules as well as C++ modules. These events can be filtered as well.  The example in The XTC-to-HDF5 Translator above illustrates the group names used for ndarrays and strings. Note, the type group name for ndarrays is fully qualified by the template arguments, some examples of type names are

...