DUNE so(ware architecture DUNE SW and compuEng David - - PowerPoint PPT Presentation
DUNE so(ware architecture DUNE SW and compuEng David - - PowerPoint PPT Presentation
DUNE so(ware architecture DUNE SW and compuEng David Adams BNL February 9, 2016 Goals for so(ware Comprehensibility Non-expert (and expert) users
Goals ¡for ¡so(ware ¡
Comprehensibility ¡
- Non-‑expert ¡(and ¡expert) ¡users ¡should ¡be ¡able ¡to ¡understand ¡
- What ¡is ¡possible ¡to ¡do ¡with ¡our ¡SW ¡
- What ¡a ¡parEcular ¡job ¡does ¡given ¡its ¡configuraEon ¡(i.e. ¡top-‑level ¡FCL ¡file) ¡
- How ¡to ¡reconfigure ¡a ¡job ¡to ¡do ¡something ¡different ¡
- How ¡to ¡add ¡new ¡capabiliEes ¡to ¡the ¡SW ¡
- The ¡above ¡should ¡be ¡intuiEve ¡and ¡as ¡easy ¡as ¡reasonably ¡possible ¡
Extensibility ¡
- Should ¡be ¡easy ¡to ¡add ¡new ¡capabiliEes ¡to ¡the ¡SW ¡
- New ¡ways ¡to ¡carry ¡out ¡old ¡acEons ¡(e.g. ¡a ¡new ¡ZS ¡algorithm) ¡
- And ¡new ¡unforeseen ¡acEons, ¡e.g. ¡wirecell ¡approach ¡
Portability ¡
- SW ¡should ¡run ¡and ¡be ¡developed ¡on ¡many ¡plaWorms ¡
- To ¡use ¡exisEng ¡resources ¡for ¡producEons ¡and ¡development ¡
- Most ¡or ¡all ¡capabiliEes ¡available ¡outside ¡of ¡art ¡jobs ¡
- Other ¡frameworks, ¡Root, ¡user ¡main, ¡… ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
2 ¡
AcEons ¡and ¡components ¡
DUNE ¡SW ¡is ¡(and ¡will ¡be ¡more) ¡complex ¡
- Many ¡stages ¡of ¡simulaEon ¡and ¡reconstrucEon ¡
- Many ¡acEons ¡to ¡carry ¡out ¡in ¡each ¡stage ¡
- Many ¡alternaEves ¡for ¡each ¡acEon ¡
- AlternaEve ¡may ¡be ¡a ¡separate ¡implementaEon ¡(different ¡code) ¡
- Or ¡different ¡configuraEon ¡(different ¡parameter ¡values) ¡
- Hierarchy ¡of ¡acEons ¡(one ¡acEon ¡carries ¡out ¡others) ¡
Map ¡each ¡acEon ¡to ¡an ¡abstract ¡interface ¡(see ¡following) ¡
- AlternaEve ¡can ¡be ¡a ¡separate ¡implementaEons ¡
Allow ¡configuraEon ¡of ¡each ¡implementaEon ¡
- In ¡the ¡art ¡world, ¡construct ¡from ¡an ¡FCL ¡block ¡
- Other ¡FWs ¡could ¡use ¡FCL ¡or ¡some ¡other ¡configuraEon ¡language ¡
- Easiest ¡to ¡use ¡FCL ¡but ¡could ¡be ¡alternate ¡ctor ¡e.g. ¡from ¡python ¡
Code ¡for ¡each ¡acEon ¡should ¡reside ¡in ¡a ¡separate ¡component ¡
- Natural ¡for ¡each ¡component ¡to ¡be ¡a ¡C++ ¡class ¡
- Simple ¡acEon ¡with ¡no ¡configuraEon ¡can ¡be ¡a ¡funcEon ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
3 ¡
Abstract ¡interfaces ¡
Favor ¡abstract ¡interface ¡for ¡each ¡idenEfied ¡acEon ¡
- So ¡a ¡second ¡implementaEon ¡of ¡the ¡acEon ¡can ¡be ¡plugged ¡in ¡without ¡
any ¡change ¡to ¡the ¡client ¡code ¡
- Client ¡has ¡no ¡physical ¡dependence ¡on ¡the ¡code ¡for ¡the ¡
implementaEon(s) ¡
- No ¡include ¡of ¡header ¡
- No ¡need ¡to ¡list ¡library ¡in ¡CMakeLists.txt ¡
– Users ¡now ¡expend ¡a ¡lot ¡of ¡effort ¡finding ¡required ¡libraries ¡
- Interface ¡class ¡provides ¡clean ¡specificaEon ¡of ¡the ¡interface ¡
- ImplementaEon ¡may ¡have ¡extra ¡methods ¡(helpers, ¡etc.) ¡
- Separate ¡design ¡forums ¡
- Public ¡interface ¡can ¡and ¡should ¡be ¡presented ¡in ¡public ¡forum ¡
- Users ¡can ¡make ¡private ¡or ¡shared ¡implementaEons ¡
Drawbacks ¡
- Client ¡may ¡need ¡to ¡specify ¡dependencies ¡at ¡run ¡Eme ¡
- Need ¡to ¡maintain ¡two ¡classes ¡
- But ¡interface ¡can ¡be ¡pure ¡virtual ¡è ¡no ¡library ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
4 ¡
Job ¡configuraEon ¡
Job ¡configuraEon ¡specifies ¡how ¡data ¡is ¡to ¡be ¡(or ¡was) ¡processed ¡
- InformaEon ¡is ¡in ¡environment ¡and ¡on ¡command ¡line ¡
- Environment ¡specifies ¡which ¡release ¡is ¡used ¡
- For ¡larso( ¡(command ¡lar), ¡CL ¡specifies ¡top-‑level ¡FCL ¡file ¡
- Typically ¡opEons ¡to ¡override ¡input ¡data ¡file, ¡# ¡events, ¡output ¡file ¡names ¡
- Most ¡of ¡the ¡job ¡specificaEon ¡is ¡in ¡this ¡top-‑level ¡FCL ¡file ¡
- Very ¡important ¡that ¡FCL ¡is ¡comprehensible, ¡extensible ¡and ¡portable ¡
- Documents ¡what ¡was ¡done ¡in ¡a ¡producEon ¡job ¡
– Along ¡with ¡dunetpc ¡version ¡
- User ¡should ¡find ¡it ¡easy ¡to ¡create ¡their ¡own ¡configuraEon ¡starEng ¡from ¡a ¡
producEon ¡example ¡or ¡from ¡scratch ¡
Very ¡useful ¡if ¡FCL ¡configuraEon ¡can ¡be ¡used ¡outside ¡art ¡
- So ¡high-‑level ¡acEons ¡can ¡easily ¡be ¡carried ¡out ¡in ¡same ¡way ¡
- May ¡be ¡excepEons ¡where ¡a ¡different ¡FW ¡requires ¡a ¡different ¡
configuraEon ¡language ¡but ¡prefer ¡to ¡avoid ¡this ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
5 ¡
art ¡categories ¡of ¡so(ware ¡components ¡
art ¡Module ¡
- Singleton ¡instanEated ¡by ¡FW ¡from ¡FCL ¡
- Called ¡by ¡FW ¡once ¡for ¡each ¡event ¡
- Reads ¡and ¡writes ¡event ¡data ¡
- Cannot ¡easily ¡be ¡used ¡outside ¡art ¡
art ¡Service ¡
- Singleton ¡instanEated ¡by ¡FW ¡from ¡FCL ¡
- Shared ¡instance ¡called ¡by ¡clients ¡(e.g. ¡modules) ¡
- Can ¡be ¡used ¡outside ¡art ¡
- Issues ¡for ¡run-‑dependent ¡services ¡that ¡use ¡art ¡callbacks ¡
UElity ¡
- InstanEated ¡and ¡called ¡by ¡client ¡
- Typically ¡no ¡FCL ¡and ¡no ¡sharing ¡
- Easily ¡used ¡inside ¡or ¡outside ¡art ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
6 ¡
Where ¡to ¡put ¡the ¡acEon ¡code? ¡
Code ¡in ¡module ¡
- Lose ¡portability ¡because ¡module ¡cannot ¡be ¡called ¡outside ¡art ¡✗ ¡
- Granularity ¡o(en ¡too ¡large ¡✗ ¡
- Many ¡acEons ¡carried ¡out ¡in ¡one ¡module ¡but ¡would ¡like ¡to ¡have ¡a ¡separate ¡
component ¡for ¡each ¡acEon ¡
Code ¡in ¡uElity ¡
- OK ¡where ¡no ¡configuraEon ¡is ¡required ¡✔ ¡
- But ¡o(en ¡have ¡parameters ¡associated ¡with ¡an ¡acEon ¡✗ ¡
Code ¡in ¡service ¡
- art ¡provides ¡instanEaEon ¡with ¡FCL ¡configuraEon ¡✔ ¡
- Portable ¡(services ¡can ¡be ¡used ¡outside ¡art) ¡✔ ¡
- Service ¡can ¡have ¡an ¡abstract ¡interface ¡✔ ¡
- Hierarchy ¡allowed ¡(services ¡call ¡other ¡services) ¡✔ ¡
- Service ¡only ¡accessible ¡as ¡singleton ¡✗ ¡
- Typically ¡sufficient ¡within ¡a ¡job ¡
- Easy ¡to ¡generalize ¡from ¡service ¡to ¡tool ¡to ¡circumvent ¡this—see ¡later ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
7 ¡
AcEon ¡code ¡in ¡service ¡
Of ¡these, ¡service ¡looks ¡best ¡for ¡acEon ¡code ¡ ConfiguraEon ¡
- MulEple ¡named ¡FCL ¡blocks ¡can ¡be ¡made ¡for ¡any ¡acEon ¡interface ¡
- Corresponding ¡to ¡different ¡implementaEons ¡or ¡configuraEons ¡
- One ¡name ¡can ¡be ¡mapped ¡to ¡the ¡service ¡interface ¡
Access ¡
- Module ¡or ¡other ¡client ¡accesses ¡this ¡instance ¡with ¡ServiceHandle ¡
- art ¡will ¡instanEate ¡this ¡service ¡with ¡first ¡use ¡of ¡handle ¡(I ¡think) ¡
Working ¡outside ¡art ¡
- The ¡above ¡work ¡inside ¡the ¡art ¡framework ¡or ¡in ¡another ¡framework ¡
linking ¡against ¡the ¡art ¡libraries ¡
- One ¡might ¡want ¡to ¡work ¡enErely ¡outside ¡art ¡
- i.e. ¡insist ¡on ¡not ¡linking ¡against ¡art ¡libraries ¡
- Can ¡handle ¡this ¡by ¡providing ¡alternaEve ¡(e.g. ¡null) ¡implementaEons ¡of ¡the ¡
three ¡service ¡macros ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
8 ¡
FCL ¡for ¡acEon ¡as ¡service ¡
How ¡does ¡FCL ¡code ¡look ¡for ¡acEon ¡as ¡a ¡service? ¡
- FCL ¡syntax ¡is ¡very ¡important ¡for ¡comprehensibility ¡
- As ¡an ¡example ¡take ¡the ¡new ¡DetSimDUNE ¡module ¡
- See ¡dunetpc/dune/detsimmodules_dune.fcl
- DetSim ¡acEons: ¡
- Extract ¡energy ¡deposits ¡from ¡SimChannel ¡data ¡product ¡
- Add ¡noise, ¡add ¡pedestals, ¡do ¡ZS, ¡add ¡digital ¡distorEon ¡(sEcky ¡bits), ¡
compress ¡
- Write ¡raw ¡data ¡product ¡(code ¡for ¡this ¡is ¡in ¡module) ¡
Module ¡and ¡service ¡configuraEons ¡reside ¡in ¡low-‑level ¡FCL ¡
- I.e. ¡in ¡FCL ¡files ¡included ¡by ¡the ¡top-‑level ¡FCL ¡file ¡
- ConfiguraEons ¡are ¡assigned ¡a ¡name ¡inside ¡prolog ¡
- The ¡configuraEon ¡names ¡can ¡be ¡referenced ¡(with ¡“@local::”) ¡in ¡the ¡
top-‑level ¡FCL ¡but ¡do ¡not ¡appear ¡in ¡the ¡final ¡job ¡
- Service ¡instances ¡are ¡specified ¡by ¡(abstract) ¡type ¡name ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
9 ¡
Example ¡FCL: ¡top ¡level ¡
¡ ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
10 ¡
#include “detsimmodules_dune.fcl” physics: { producers: { daq: @local::dune_detsim } } # DetSim services. services.SimChannelExtractService: @local::scxgeneric services.ChannelNoiseService: @local::chnoiseold services.IDetPedestalService: @local::pedlegacy services.PedestalAdditionService: @local::padprovided services.AdcSuppressService: @local::zsonline services.AdcCompressService: @local::cmpreplace services.AdcDistortService: @local::stuckbits # DetSim flags. physics.producers.daq.NoiseOn: true . . .
Taken ¡from ¡prolog ¡
Example ¡FCL: ¡low ¡level ¡
¡ ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
11 ¡
# detsimmodules_dune.fcl #include "detsimmodules.fcl" BEGIN_PROLOG #*********************************************************************** # DetSim module dune_detsim: { module_type: "SimWireDUNE" SimChannelLabel: "largeant" NoiseOn: false PedestalOn: false SuppressOn: false DistortOn: false } #*********************************************************************** scxgeneric: { service_provider: GenericSimChannelExtractService }
For ¡module, ¡specify ¡ type ¡(class ¡name) ¡and ¡ parameters ¡ Remainder ¡is ¡services. ¡ ConEnued ¡on ¡
- followingpages. ¡
Example ¡FCL: ¡low ¡level ¡(2) ¡
¡ ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
12 ¡ # ¡signal ¡extractor ¡service ¡for ¡dune ¡dual-‑phase ¡detector ¡ scxdp: ¡{ ¡ ¡ ¡service_provider: ¡DPhaseSimChannelExtractService ¡ ¡ ¡DPGainPerView: ¡10.0 ¡ } ¡ ¡ scx35t: { service_provider: Dune35tSimChannelExtractService FractHorizGapUCollect: [ 0.1, 0.0 ] FractHorizGapUMiss: [ 0.8, 0.0 ] FractHorizGapVCollect: [ 0.1, 0.0 ] FractHorizGapVMiss: [ 0.8, 0.0 ] FractHorizGapZMiss: [ 0.8, 0.0 ] FractUUCollect: [ 0.5, 0.0 ] FractUUMiss: [ 0.2, 0.0 ] FractUVCollect: [ 0.1, 0.0 ] FractUVMiss: [ 0.2, 0.0 ] FractVUCollect: [ 0.5, 0.0 ] FractVUMiss: [ 0.2, 0.0 ] FractVVCollect: [ 0.1, 0.0 ] FractVVMiss: [ 0.2, 0.0 ] FractVertGapUCollect: [ 0.1, 0.0 ] FractVertGapUMiss: [ 0.8, 0.0 ] FractVertGapVCollect: [ 0.1, 0.0 ] FractVertGapVMiss: [ 0.8, 0.0 ] FractVertGapZMiss: [ 0.8, 0.0 ] FractZUMiss: [ 0.2, 0.0 ] FractZVMiss: [ 0.2, 0.0 ] } #***********************************************************************
For ¡service, ¡specify ¡ type ¡(class ¡name) ¡and ¡ parameters ¡
Example ¡FCL: ¡low ¡level ¡(3) ¡
¡ ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
13 ¡ zsnone: { service_provider: FixedZeroSuppressService } zslegacy: { service_provider: Legacy35tZeroSuppressService AdcThreshold: 10.0 TickRange: 10 MinTickGap: 2 SuppressStickyBits: true } zsonline: { service_provider: Dune35tZeroSuppressService NS: 5 NL: 15 ND: 5 NT: 3 TS: 3 TL: 7 TD: 5 } . . . END_PROLOG
LArSo( ¡pasern ¡
LArSo( ¡is ¡following ¡a ¡different ¡pasern ¡
- Introduces ¡category ¡called ¡algorithm ¡similar ¡to ¡uElity ¡here ¡
- AcEon ¡or ¡group ¡of ¡acEons ¡is ¡implemented ¡as ¡an ¡algorithm ¡
- Also ¡adds ¡a ¡category ¡provider ¡
- Create ¡a ¡provider ¡for ¡each ¡service ¡
- Client ¡uses ¡service ¡to ¡create ¡provider ¡and ¡the ¡provider ¡to ¡carry ¡out ¡the ¡
service ¡acEon ¡
- Advantage ¡is ¡that ¡non-‑art ¡user ¡can ¡use ¡the ¡algorithm ¡with ¡no ¡need ¡to ¡
bring ¡in ¡art ¡libraries ¡(I ¡think) ¡
- art ¡user ¡instead/also ¡uses ¡service ¡è ¡different ¡client ¡code? ¡
I ¡don’t ¡like ¡this ¡more ¡complex ¡model ¡
- Extra ¡complexity ¡of ¡wriEng ¡and ¡maintaining ¡providers ¡ ¡
- Provider ¡needs ¡to ¡know ¡(i.e. ¡depends ¡on) ¡the ¡concrete ¡types ¡for ¡all ¡
acEons ¡it ¡supports ¡
- Client ¡needs ¡dependency ¡on ¡service ¡and ¡provider ¡
- We ¡don’t ¡want ¡to ¡do ¡this ¡for ¡every ¡type ¡of ¡acEon ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
14 ¡
Tools ¡
It ¡would ¡be ¡nice ¡to ¡get ¡past ¡the ¡singleton ¡limitaEon ¡of ¡services ¡
- Not ¡very ¡difficult ¡to ¡extend ¡this ¡to ¡allow ¡mulEple ¡named ¡instances ¡
- Call ¡these ¡tools ¡
C++ ¡interface ¡
In ¡addiEon ¡to ¡the ¡singleton ¡access ¡
ServiceHandle<MyInterface> hsvc;
allow ¡access ¡to ¡named ¡instances ¡with ¡
ToolHandle<MyInterface> hsvc(“mytool”);
- Current ¡service ¡classes ¡can ¡be ¡used ¡without ¡change. ¡
- I.e. ¡every ¡service ¡would ¡be ¡also ¡be ¡a ¡tool. ¡
FCL ¡definiEon ¡
Replace ¡prolog ¡
mytool: { service_provider: MyType … }
with ¡non-‑prolog ¡
tools.mytool: { service_provider: MyType … }
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
15 ¡
Aside: ¡We ¡can ¡ and ¡should ¡use ¡ this ¡syntax ¡
- now. ¡IMHO. ¡
Tools ¡(2) ¡
All ¡tool ¡definiEons ¡in ¡FCL ¡would ¡be ¡available ¡at ¡run ¡Eme ¡
- Nice ¡for ¡interacEve ¡running ¡
- And ¡for ¡browsing ¡the ¡FCL ¡
- (Even ¡without ¡tool ¡support, ¡we ¡can ¡and ¡should ¡use ¡the ¡above ¡syntax ¡to ¡
define ¡our ¡service ¡instances ¡sot ¡that ¡we ¡can ¡brose ¡all ¡available ¡ definiEons.) ¡
Clients ¡specify ¡their ¡tools ¡in ¡their ¡configuraEon ¡
- Either ¡have ¡tool ¡name ¡as ¡FCL ¡parameter ¡
client.MyToolName: “mytool”
- Or ¡(beser) ¡allow ¡ToolHandle ¡itself ¡to ¡be ¡a ¡FCL ¡type ¡
client.MyTool: tools.mytool
- Very ¡nice ¡for ¡comprehensibility ¡to ¡have ¡tool ¡name ¡as ¡part ¡of ¡client ¡
configuraEon ¡
It ¡would ¡be ¡best ¡to ¡put ¡this ¡in ¡art ¡
- But ¡we ¡could ¡probably ¡layer ¡this ¡on ¡top ¡
¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
16 ¡
Conclusions ¡
Proposal ¡1 ¡for ¡DUNE ¡SW ¡architecture ¡
- IdenEfy ¡the ¡non-‑trivial ¡acEons ¡we ¡take ¡in ¡our ¡SW ¡
- I.e. ¡those ¡that ¡require ¡configuraEon ¡or ¡might ¡ever ¡have ¡mulEple ¡
implementaEons ¡
- Define ¡a ¡service ¡interface ¡for ¡each ¡
- Provide ¡a ¡service ¡implementaEon ¡for ¡each ¡
- Have ¡clients ¡access ¡these ¡though ¡their ¡interfaces ¡
- Already ¡done ¡for ¡DetSim ¡
- Avoid ¡and ¡argue ¡against ¡the ¡more-‑complex ¡provider ¡pasern ¡in ¡LArSo( ¡
Proposal ¡2 ¡
- Add ¡support ¡for ¡tools ¡to ¡art ¡or ¡layer ¡over ¡art ¡
- Current ¡services ¡are ¡then ¡also ¡accessible ¡as ¡tools ¡
- Modify ¡clients ¡to ¡access ¡these ¡as ¡named ¡tools ¡instead ¡of ¡services ¡where ¡
appropriate ¡
- Name ¡(or ¡beser ¡tool ¡configuraEon ¡itself) ¡becomes ¡a ¡FCL ¡parameter ¡
Proposal ¡3, ¡… ¡
- I ¡have ¡many ¡more ¡ideas ¡to ¡meet ¡the ¡goals ¡outlined ¡earlier ¡
- D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuEng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡9, ¡2016 ¡
17 ¡