Skip to content

J PET Framework v4

alekgajos edited this page Dec 14, 2016 · 3 revisions

Summary of changes with respect to v3:

  • New JPetEvent class
  • Updated unpacker version
  • Unzip option
  • New time synchronization classes
  • Internal refactorization
  • Various fixes and cleanups

Details:

  1. New JPetEvent class: Data class representing an event from a single emission. An event consists of one or more hits (JPetHit objects) registered in barrel slots. The class constructor and setHits by default order hits in the ascending time order. This behaviour can be turned off by the orderedByTime flag. Also, when using addHit method the order is not guaranteed anymore. It Is the user responsibility to assure it when using addHit method. The event type corresponds to the category of physical process e.g. 2 gamma or 3 gamma decay. A given type can be a logical combination of several types by using bit OR operators e.g. static_cast(JPetEventType::kGamma2|JPetEventType::kScattered). This means, that at given moment we don't know to which type it belongs.

  2. Updated unpacker version: The unpacker is now contained in a separate repository ans is used as a submodule of j-pet-framework. The former 3-step unpacking was merged into a single-step procedure without writing intermediate results to files on disk, increasing the unpacking speed and required disk space. The format of the unpacked HLD file was modified so as to produce compatible files with a standalone unpacker based on the Go4 program. Note: Due to the change of unpacked file format, v4 of the Framework will not work with hld.root produced (i.e. unpacked) by older versions of the Framework. Previously unpacked files need to be unpacked again to be used with version 4.

  3. Unzip option: The gzipped raw files (hld) can be processed by the Framework. The special -z flag was added. The orginal gzipped file is removed after unpacking.

  4. New time synchronization classes:

  5. Internal refactoring:

  • Rename JPetTaskExecutor to JPetTaskChainExecutor
  • The role of the JPetTaskChainExecutor is to execute task chain, all other "things" are delegated to JPetTaskChainExecutorUtils via preprocess() method. JPetTaskChainExecutorUtils contains all the "preprocessing tasks" e.g. unzipping, unpacking, generateParamManager (from file)
  • Add JPetOptionInterface -> JPetOptions is now a subtype of it
  • Small corrections e.g. missing initializations in JPetTimeWindow, JPetHLDReader, remove unused code, formatting
  • Remove inheritance JPetTaskInterface <--JPetTaskIO, and partially change the inheritance scheme that was bad anyway. We have two type of classes with Task in name which has nothing to do with each other. JPetTask is a "real" task (computing component/algorithm), while JPetTaskIO, JPetTaskLoader are more like manager which handle the tasks.
  • Refactor our task scheme to introduce properly Strategy pattern. It was implemented but not correctly (probably by accident). See e.g. https://en.wikipedia.org/wiki/Strategy_pattern .JPetTaskRunner is a context of the strategy pattern. JPetTaskInterface corresponds to the Strategy interface and JPetTasks are concrete realizations of different Strategies. This is the preparation for the second part of refactoring.
  1. Various fixes and cleanups:
  • Fixed a segfault at JPetStatistics destruction
  • Add error detection and error handling in case of the duplicated ids in the scope configuration file
  • fix progressbar.
  • more fixes, and code cleanups
Clone this wiki locally