From a06a61ea8093a93371e5506d602222b12c013211 Mon Sep 17 00:00:00 2001 From: Christopher Dilks Date: Thu, 13 Feb 2025 11:35:08 -0500 Subject: [PATCH] deleted: doc/design.md --- README.md | 1 - doc/design.md | 142 -------------------------------------------------- 2 files changed, 143 deletions(-) delete mode 100644 doc/design.md diff --git a/README.md b/README.md index 36bc578e..7c287586 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,6 @@ Iguana is not a framework for _reading_ data, rather it is a set of algorithms t 1. [All others: see the Iguana User's guide](https://jeffersonlab.github.io/iguana/doxygen) ### For Developers -1. [Design Notes](doc/design.md) 1. [Developing a new Algorithm](src/iguana/algorithms/example/ExampleAlgorithm/README.md) 1. [Algorithm Tests and Validators](doc/testing.md) 1. [Repository Maintenance](doc/maintenance.md) diff --git a/doc/design.md b/doc/design.md deleted file mode 100644 index 478feb62..00000000 --- a/doc/design.md +++ /dev/null @@ -1,142 +0,0 @@ -# Design - -## Graphs - -### Class Diagram - -```mermaid -flowchart LR - classDef cls fill:#88ff88,color:black - classDef algo fill:#ff8888,color:black - classDef other fill:#ff88ff,color:black - - subgraph services - Logger:::cls - Object:::cls - end - - subgraph algorithms - Algorithm:::cls - FiducialCuts:::algo - MomentumCorrection:::algo - AlgorithmSequence:::algo - bindings(language
bindings):::other - end - - FiducialCuts -.-> Algorithm - MomentumCorrection -.-> Algorithm - AlgorithmSequence -.-> Algorithm - Algorithm -.-> Object - - Object ---> Logger - AlgorithmSequence ---> MomentumCorrection - AlgorithmSequence ---> FiducialCuts - - AlgorithmSequence -.- bindings - -``` - -#### Legend - -```mermaid -flowchart TB - classDef cls fill:#88ff88,color:black - - subgraph Inheritance - b[Base Class]:::cls - d[Derived Class]:::cls - end - d -.-> b - - subgraph Ownership - c[Class]:::cls - o[Object owned by Class]:::cls - end - c ---> o -``` - -### Dependency Graph - -```mermaid -flowchart TB - classDef lib fill:#ffff88,color:black - classDef ext fill:#88ffff,color:black - - algorithms{{libIguanaAlgorithms}}:::lib - services{{libIguanaServices}}:::lib - - hipo{{libhipo4}}:::ext - fmt{{libfmt}}:::ext - - hipo ---> services - fmt ---> services - services ---> algorithms -``` - -## Algorithm Design - -### Common Methods - -Base class `Algorithm` has virtual methods: - -#### `Start` -- runs before any event processing -- configuration -- set up data structures - -#### `Run` -- runs on every event -- input and output are a set of banks -- runs the algorithm for a given event's bank(s) -- should be thread-safe, _e.g._, no modification of instance members -- usage: - - called on every event in an event loop - - part of a lambda for a data frame transformation -- analyses that operate on bank rows rather than full banks require exposure - of some function that does the _primary_ action of the algorithm - - useful to have - - wide variety of function signatures, so not easy to generalize and therefore not required - -#### `Stop` -- runs after event processing -- cleanup, if needed - - -### Usage Options for Users - -- Instantiate and run algorithms as they are - - No need for `AlgorithmSequence` instance - - Algorithms do not depend on `AlgorithmSequence`, just on services - - All algorithms are available in a separate shared library - - Drawback: language bindings are not planned at the algorithm level -- Use `AlgorithmSequence` - - `AlgorithmSequence` will only instantiate the algorithms the user intends to use, owning - an instance of each - - User runs the algorithms using `AlgorithmSequence` "sugar" - - Language bindings can be made available at this level - - -### Algorithm Types - -#### Filter -- return an input bank with some rows masked (or removed) - - masking preferred to preserve bank linking - - options for masking a row: - - zero all elements - - add a boolean item to the _end_ of the schema to store whether a row is masked -- public `bool Cut(float...)` function - - expose the _primary_ action of the algorithm for users that operate on bank rows - - not required, since difficult to generalize at the `Algorithm` (or `AlgorithmSequence`) level - - similar to `chanser`'s RG-A criteria implementations - -#### Transformer -- return an input bank with some elements modified -- public `Transorm(...)` function that exposes the _primary_ algorithm action would be useful, - but not required - -#### Creator -- return a new bank with a new schema -- many reconstruction algorithms are creators - -#### Hybrid -- any combination of the above