Recommended Next Topics

Description of XTC

The original data objects are produced by on-line system and are shipped to offline in XTC format. LCLS XTC format inherited its main features from BaBar XTC format.

Data types corresponding to various components of XTC are defined in pdsdata package which is provided by on-line group. This package is a part of all standard PSDM releases. All references to class names refer to the C++ classes defined in this package.

XTC file consists of a sequence of the containers called datagrams. Reading process for XTC consists of the fetching individual datagrams into memory. There is no index of any kind to skip a number of datagrams or jump to arbitrary datagram. C++ class corresponding to datagram is called Dgram. Datagram objects contain few sub-objects: Sequence, Env, and Xtc. Sequence type contains several identification parameters for datagram: type, service, time, and few other bits. Service determines what kind of transition corresponds to the given datagram, following transitions are defined currently (in TransitionId class): Map/Unmap, Configure/Unconfigure, BeginRun/EndRun, BeginCalibCycle/EndCalibCycle, Pause/Resume, Enable/Disable, L1Accept. These transitions correspond to the events happening in the DAQ system.

Class Xtc is an extensible container type which can contain either object of some predefined C++ class or a sequence of other Xtc containers. The type of the objects that Xtc holds is determined by its contains field. Every Xtc has a "source" which can be determined from src field of class Src which defines physical and/or logical address of the originator. The addresses form a hierarchical address space corresponding to the organization of the DAQ system.

User data types contained within Xtc containers are defined in the same psdata package as regular C++ classes.

There are several convenience classes for reading and examining the content of the XTC files. XtcFileIterator is an iterator class for reading the sequence of datagrams from the XTC files. XtcIterator is an abstract base class for iteration over the content of the single Xtc object. O2OTranslator package has a specific implementation of this iterator called O2OXtcIterator (and friend class O2OXtcScannerI).

Transitions in XTC data

Every object in XTC is a part of the specific "transition" and interpretation of the object contents is done in the context of that particular transition. These types of the transitions are defined now:

  • Map and Unmap – allocation/deallocation of the resources
  • Configure and Unconfigure – configuration of the system
  • BeginRun and EndRun – happen at begin and end of run
  • BeginCalibCycle and EndCalibCycle – happen at begin and end of calibration cycle, many experiments have only one calibration cycle but there are experiments that use multiple cycles.
  • Pause and Resume
  • Enable and Disable
  • L1Accept – correspond to a single trigger or shot

The transitions in XTC file correspond to the transition in the Dataflow system and they are nested. Particularly Configure/Unconfigure transitions are nested inside Map/Unmap, BeginRun/EndRun are nested inside Configure/Unconfigure, BeginCalibCycle/EndCalibCycle are nested inside BeginRun/EndRun, and Pause/Resume and L1Accept are nested inside BeginCalibCycle/EndCalibCycle. There could be multiple nested transitions inside a single upper-level transition, this is certainly true for L1Accept transitions, but also can be the case for BeginCalibCycle/EndCalibCycle, BeginRun/EndRun, and Configure/Unconfigure too.

  • No labels