DUNE so(ware architecture DUNE SW and compuDng David - - PowerPoint PPT Presentation

dune so ware architecture dune sw and compudng
SMART_READER_LITE
LIVE PREVIEW

DUNE so(ware architecture DUNE SW and compuDng David - - PowerPoint PPT Presentation

DUNE so(ware architecture DUNE SW and compuDng David Adams BNL February 2, 2016 Goals for so(ware Comprehensibility Non-expert users should be


slide-1
SLIDE 1

DUNE ¡so(ware ¡architecture ¡

David ¡Adams ¡ BNL ¡ February ¡2, ¡2016 ¡

DUNE ¡SW ¡and ¡compuDng ¡

slide-2
SLIDE 2

Goals ¡for ¡so(ware ¡

Comprehensibility ¡

  • Non-­‑expert ¡users ¡should ¡be ¡able ¡to ¡understand ¡
  • What ¡is ¡possible ¡to ¡do ¡with ¡our ¡SW ¡
  • What ¡a ¡parDcular ¡job ¡does ¡given ¡its ¡configuraDon ¡(i.e. ¡top-­‑level ¡FCL ¡file) ¡
  • How ¡to ¡reconfigure ¡a ¡job ¡to ¡do ¡something ¡different ¡
  • How ¡to ¡add ¡new ¡capabiliDes ¡to ¡the ¡SW ¡
  • The ¡above ¡should ¡be ¡intuiDve ¡and ¡as ¡easy ¡as ¡reasonably ¡possible ¡

Extensibility ¡

  • Should ¡be ¡easy ¡to ¡add ¡new ¡capabiliDes ¡to ¡the ¡SW ¡
  • New ¡ways ¡to ¡carry ¡out ¡old ¡acDons ¡(e.g. ¡a ¡new ¡ZS ¡algorithm) ¡
  • And ¡new ¡unforeseen ¡acDons, ¡e.g. ¡wirecell ¡approach ¡

Portability ¡

  • SW ¡should ¡run ¡and ¡be ¡developed ¡on ¡many ¡plaVorms ¡
  • To ¡use ¡exisDng ¡resources ¡for ¡producDons ¡and ¡development ¡
  • Most ¡or ¡all ¡capabiliDes ¡available ¡outside ¡of ¡art ¡jobs ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

2 ¡

slide-3
SLIDE 3

AcDons ¡and ¡components ¡

DUNE ¡SW ¡is ¡(and ¡will ¡be ¡more) ¡complex ¡

  • Many ¡stages ¡of ¡simulaDon ¡and ¡reconstrucDon ¡
  • Many ¡acDons ¡to ¡carry ¡out ¡in ¡each ¡stage ¡
  • Many ¡alternaDves ¡for ¡each ¡acDon ¡
  • AlternaDve ¡may ¡be ¡a ¡separate ¡implementaDon ¡(different ¡code) ¡
  • Or ¡different ¡configuraDon ¡(different ¡parameter ¡values) ¡
  • Hierarchy ¡of ¡acDons ¡(one ¡acDon ¡carries ¡out ¡others) ¡

Map ¡each ¡acDon ¡to ¡an ¡abstract ¡interface ¡

  • AlternaDve ¡can ¡be ¡a ¡separate ¡implementaDons ¡

Allow ¡configuraDon ¡of ¡each ¡implementaDon ¡

  • In ¡the ¡art ¡world, ¡construct ¡from ¡an ¡FCL ¡block ¡
  • Other ¡FWs ¡could ¡use ¡FCL ¡or ¡some ¡other ¡configuraDon ¡language ¡
  • Easiest ¡to ¡use ¡FCL ¡but ¡could ¡be ¡alternate ¡ctor ¡e.g. ¡from ¡python ¡

Code ¡for ¡each ¡acDon ¡should ¡reside ¡in ¡a ¡separate ¡component ¡

  • Natural ¡for ¡each ¡component ¡to ¡be ¡a ¡C++ ¡class ¡
  • Simple ¡acDon ¡with ¡no ¡configuraDon ¡can ¡be ¡a ¡funcDon ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

3 ¡

slide-4
SLIDE 4

Job ¡configuraDon ¡

Job ¡configuraDon ¡specifies ¡how ¡data ¡is ¡to ¡be ¡(or ¡was) ¡processed ¡

  • InformaDon ¡is ¡in ¡environment ¡and ¡on ¡command ¡line ¡
  • Environment ¡specifies ¡which ¡release ¡is ¡used ¡
  • For ¡larso( ¡(command ¡lar), ¡CL ¡specifies ¡top-­‑level ¡FCL ¡file ¡
  • Typically ¡opDons ¡to ¡override ¡input ¡data ¡file, ¡# ¡events, ¡output ¡file ¡names ¡
  • Most ¡of ¡the ¡job ¡specificaDon ¡is ¡in ¡this ¡top-­‑level ¡FCL ¡file ¡
  • Very ¡important ¡that ¡FCL ¡is ¡comprehensible, ¡extensible ¡and ¡portable ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

4 ¡

slide-5
SLIDE 5

art ¡categories ¡of ¡so(ware ¡components ¡

art ¡Module ¡

  • Singleton ¡instanDated ¡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 ¡instanDated ¡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 ¡

UDlity ¡

  • InstanDated ¡and ¡called ¡by ¡client ¡
  • Typically ¡no ¡FCL ¡and ¡no ¡sharing ¡
  • Easily ¡used ¡inside ¡or ¡outside ¡art ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

5 ¡

slide-6
SLIDE 6

Where ¡to ¡put ¡the ¡acDon ¡code? ¡

Code ¡in ¡module ¡

  • Lose ¡portability ¡because ¡module ¡cannot ¡be ¡called ¡outside ¡art ¡✗ ¡
  • Granularity ¡o(en ¡too ¡large ¡✗ ¡
  • Many ¡acDons ¡carried ¡out ¡in ¡one ¡module ¡but ¡would ¡like ¡to ¡have ¡a ¡separate ¡

component ¡for ¡each ¡acDon ¡

Code ¡in ¡uDlity ¡

  • OK ¡where ¡no ¡configuraDon ¡is ¡required ¡✔ ¡
  • But ¡o(en ¡have ¡parameters ¡associated ¡with ¡an ¡acDon ¡✗ ¡

Code ¡in ¡service ¡

  • art ¡provides ¡instanDaDon ¡with ¡FCL ¡configuraDon ¡✔ ¡
  • 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 ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

6 ¡

slide-7
SLIDE 7

AcDon ¡code ¡in ¡service ¡

Of ¡these, ¡service ¡looks ¡best ¡for ¡acDon ¡code ¡ ConfiguraDon ¡

  • MulDple ¡named ¡FCL ¡blocks ¡can ¡be ¡made ¡for ¡any ¡acDon ¡interface ¡
  • Corresponding ¡to ¡different ¡implementaDons ¡or ¡configuraDons ¡
  • One ¡name ¡can ¡be ¡mapped ¡to ¡the ¡service ¡interface ¡

Access ¡

  • Module ¡or ¡other ¡client ¡accesses ¡this ¡instance ¡with ¡ServiceHandle ¡
  • art ¡will ¡instanDate ¡this ¡service ¡with ¡first ¡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 ¡outside ¡art ¡and ¡insist ¡on ¡not ¡linking ¡against ¡

art ¡libraries ¡

  • Can ¡handle ¡this ¡by ¡providing ¡alternaDve ¡(e.g. ¡null) ¡implementaDons ¡of ¡

the ¡three ¡service ¡macros ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

7 ¡

slide-8
SLIDE 8

FCL ¡for ¡acDon ¡as ¡service ¡

How ¡does ¡FCL ¡code ¡look ¡for ¡acDon ¡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 ¡acDons: ¡
  • Extract ¡energy ¡deposits ¡from ¡SimChannel ¡data ¡product ¡
  • Add ¡noise, ¡add ¡pedestals, ¡do ¡ZS, ¡add ¡digital ¡distorDon ¡(sDcky ¡bits), ¡

compress ¡

  • Write ¡raw ¡data ¡product ¡(code ¡for ¡this ¡is ¡in ¡module) ¡

Module ¡and ¡service ¡configuraDons ¡reside ¡in ¡low-­‑level ¡FCL ¡

  • I.e. ¡in ¡FCL ¡files ¡included ¡by ¡the ¡top-­‑level ¡FCL ¡file ¡
  • ConfiguraDons ¡are ¡assigned ¡a ¡name ¡inside ¡prolog ¡
  • The ¡configuraDon ¡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 ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

8 ¡

slide-9
SLIDE 9

Example ¡FCL: ¡top ¡level ¡

¡ ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

9 ¡

#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 ¡

slide-10
SLIDE 10

Example ¡FCL: ¡low ¡level ¡

¡ ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

10 ¡

# 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 }

slide-11
SLIDE 11

Example ¡FCL: ¡low ¡level ¡(2) ¡

¡ ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

11 ¡ # ¡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 ] } #***********************************************************************

slide-12
SLIDE 12

Example ¡FCL: ¡low ¡level ¡(3) ¡

¡ ¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

12 ¡ 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

slide-13
SLIDE 13

LArSo( ¡parern ¡

LArSo( ¡is ¡following ¡a ¡different ¡parern ¡

  • Introduces ¡category ¡called ¡algorithm ¡similar ¡to ¡uDlity ¡here ¡
  • AcDon ¡or ¡group ¡of ¡acDons ¡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 ¡acDon ¡

  • 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 ¡wriDng ¡and ¡maintaining ¡providers ¡ ¡
  • Provider ¡needs ¡to ¡know ¡(i.e. ¡depends ¡on) ¡the ¡concrete ¡types ¡for ¡all ¡

acDons ¡it ¡supports ¡

  • Client ¡needs ¡dependency ¡on ¡service ¡and ¡provider ¡
  • We ¡don’t ¡want ¡to ¡do ¡this ¡for ¡every ¡type ¡of ¡acDon ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

13 ¡

slide-14
SLIDE 14

Tools ¡

It ¡would ¡be ¡nice ¡to ¡get ¡past ¡the ¡singleton ¡limitaDon ¡of ¡services ¡

  • Not ¡very ¡difficult ¡to ¡extend ¡this ¡to ¡allow ¡mulDple ¡named ¡instances ¡
  • Call ¡these ¡tools ¡

C++ ¡interface ¡

In ¡addiDon ¡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 ¡definiDon ¡

Replace ¡prolog ¡

mytool: { service_provider: MyType … }

with ¡non-­‑prolog ¡

tools.mytool: { service_provider: MyType … }

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

14 ¡

slide-15
SLIDE 15

Tools ¡(2) ¡

All ¡tool ¡definiDons ¡in ¡FCL ¡would ¡be ¡available ¡at ¡run ¡Dme ¡

  • Nice ¡for ¡interacDve ¡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 ¡ definiDons.) ¡

Clients ¡specify ¡their ¡tools ¡in ¡their ¡configuraDon ¡

  • Either ¡have ¡tool ¡name ¡as ¡FCL ¡parameter ¡

client.MyToolName: “mytool”

  • Or ¡(berer) ¡allow ¡ToolHandle ¡itself ¡to ¡be ¡a ¡FCL ¡type ¡

client.MyTool: tools.mytool

It ¡would ¡be ¡best ¡to ¡put ¡this ¡in ¡art ¡

  • But ¡we ¡could ¡probably ¡layer ¡this ¡on ¡top ¡

¡

  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

15 ¡

slide-16
SLIDE 16

Conclusions ¡

Proposal ¡1 ¡for ¡DUNE ¡SW ¡architecture ¡

  • IdenDfy ¡the ¡non-­‑trivial ¡acDons ¡we ¡take ¡in ¡our ¡SW ¡
  • I.e. ¡those ¡that ¡require ¡configuraDon ¡or ¡might ¡ever ¡have ¡mulDple ¡

implementaDons ¡

  • Define ¡a ¡service ¡interface ¡for ¡each ¡
  • Provide ¡a ¡service ¡implementaDon ¡for ¡each ¡
  • Have ¡clients ¡access ¡these ¡though ¡their ¡interfaces ¡
  • Already ¡done ¡for ¡DetSim ¡
  • Avoid ¡and ¡argue ¡against ¡the ¡more-­‑complex ¡provider ¡parern ¡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 ¡berer ¡tool ¡configuraDon ¡itself) ¡becomes ¡a ¡FCL ¡parameter ¡
  • D. ¡Adams, ¡BNL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡and ¡compuDng ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡DUNE ¡SW ¡architecture ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡February ¡2, ¡2016 ¡

16 ¡