Database Service Interface Update Brandon Eberly August 11, - - PowerPoint PPT Presentation

database service interface update
SMART_READER_LITE
LIVE PREVIEW

Database Service Interface Update Brandon Eberly August 11, - - PowerPoint PPT Presentation

Database Service Interface Update Brandon Eberly August 11, 2015 The plan LarsoD will provide database retrieval services for two disFnct ways of


slide-1
SLIDE 1

Database ¡Service ¡Interface ¡Update ¡

Brandon ¡Eberly ¡

August ¡11, ¡2015 ¡

¡

slide-2
SLIDE 2

The ¡plan ¡

2 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

  • LarsoD ¡will ¡provide ¡database ¡retrieval ¡services ¡for ¡two ¡disFnct ¡ways ¡of ¡using ¡the ¡

Fermilab ¡condiFons ¡database ¡system ¡

  • The ¡single-­‑IOV ¡DB ¡used ¡by ¡MicroBooNE, ¡based ¡on ¡a ¡design ¡for ¡MINERvA ¡
  • ¡All ¡channels/elements ¡in ¡a ¡DB ¡folder ¡have ¡idenFcal ¡intervals ¡of ¡validity ¡

¡

  • The ¡mulF-­‑IOV ¡DB ¡used ¡by ¡DUNE, ¡based ¡on ¡a ¡design ¡for ¡NOvA ¡
  • Channels/elements ¡may ¡have ¡different ¡intervals ¡of ¡validity ¡
  • These ¡two ¡collecFons ¡of ¡services ¡should ¡be ¡designed ¡such ¡that ¡most ¡future ¡larsoD ¡

experiments ¡can ¡use ¡them ¡without ¡modificaFon ¡

  • Since ¡these ¡services ¡and ¡their ¡helper ¡classes ¡will ¡be ¡retrieving ¡the ¡same ¡kinds ¡of ¡

informaFon, ¡it ¡makes ¡sense ¡to ¡have ¡common ¡interfaces ¡

  • Provides ¡a ¡template ¡for ¡future ¡experiments ¡to ¡create ¡their ¡own ¡

implementaFons, ¡should ¡their ¡needs ¡not ¡be ¡met ¡by ¡LarsoD ¡

slide-3
SLIDE 3

The ¡plan ¡

3 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

One ¡DataProviderInterface ¡per ¡ database ¡folder ¡ One ¡service ¡interface ¡per ¡database ¡ folder ¡ diagram ¡by ¡E. ¡Snider ¡

slide-4
SLIDE 4

Pedestal ¡Provider ¡Interface ¡

4 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

This ¡interface ¡is ¡for ¡a ¡class ¡that ¡is ¡able ¡to ¡retrieve ¡pedestals ¡from ¡a ¡database ¡ and ¡maintain ¡a ¡local ¡cache ¡of ¡pedestal ¡constants ¡ ¡ (larevt/CalibraFonDBI/Interface/IDetPedestalProvider.h): ¡ The ¡single-­‑IOV ¡pedestal ¡retrieval ¡class ¡in ¡larsoD ¡has ¡been ¡converted ¡to ¡an ¡ implementaFon ¡of ¡this ¡interface ¡ ¡ (larevt/CalibraFonDBI/Providers/DetPedestalRetrievalAlg.h): ¡

Base ¡class ¡to ¡be ¡used ¡by ¡all ¡single-­‑IOV ¡ provider ¡implementaFons ¡

slide-5
SLIDE 5

Pedestal ¡Service ¡Interface ¡

5 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

This ¡interface ¡is ¡for ¡a ¡service ¡that ¡maintains ¡and ¡gives ¡access ¡ to ¡a ¡detector ¡pedestal ¡provider ¡ (larevt/CalibraFonDBI/Interface/IDetPedestalProvider.h): ¡ ¡

slide-6
SLIDE 6

Single-­‑IOV ¡Pedestal ¡Service ¡Impl ¡

6 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

And ¡larsoD ¡now ¡provides ¡the ¡single-­‑IOV ¡style ¡service ¡implementaFon ¡ (larevt/CalibraFonDBI/Services/SIOVDetPedestalService_service.cc): ¡ ¡

slide-7
SLIDE 7

Using ¡the ¡Single-­‑IOV ¡implementaFon ¡

7 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

  • The ¡previous ¡code ¡is ¡on ¡larevt ¡feature ¡branch ¡eberly_dbinterface ¡and ¡is ¡ready ¡

to ¡be ¡merged ¡with ¡develop ¡

  • lareventdisplay ¡and ¡uboonecode ¡are ¡both ¡updated ¡to ¡use ¡the ¡single-­‑IOV ¡

pedestal ¡retrieval ¡service ¡implementaFon ¡

  • both ¡on ¡feature ¡branch ¡eberly_dbinterface ¡

¡

  • It ¡is ¡also ¡possible ¡to ¡just ¡use ¡the ¡pedestal ¡providers ¡outside ¡of ¡the ¡service ¡
  • WARNING: ¡If ¡you ¡wrote ¡code ¡that ¡uses ¡DetPedestalRetrievalAlg, ¡ ¡you ¡will ¡

need ¡to ¡update ¡your ¡code ¡(see ¡next ¡slide) ¡and ¡fcl ¡files ¡to ¡use ¡the ¡service, ¡or: ¡ ¡ 1) ¡In ¡CMakeLists.txt, ¡change: ¡

CalibrationDBI_WebDBI à CalibrationDBI_Providers

2) ¡In ¡your ¡code:

#include "CalibrationDBI/Providers/DetPedestalRetrievalAlg.h” //.... fPedestalRetrievalAlg.Update( evt.time().value() );

slide-8
SLIDE 8

Using ¡the ¡Single-­‑IOV ¡implementaFon ¡

8 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

  • Using ¡DetSim/SimWireMicroBooNE_module.cc ¡in ¡uboonecode ¡as ¡an ¡example: ¡
  • Include ¡the ¡interfaces: ¡
  • Then ¡ask ¡for ¡the ¡service ¡handle: ¡
  • And ¡use ¡it! ¡
slide-9
SLIDE 9

Using ¡the ¡Single-­‑IOV ¡implementaFon ¡

9 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

  • fcl ¡configuraFon: ¡I’ll ¡assume ¡that ¡you ¡understand ¡the ¡basics ¡of ¡configuring ¡a ¡

service ¡via ¡fcl ¡

  • Just ¡remember ¡to ¡specify ¡which ¡implementaFon ¡of ¡the ¡service ¡you ¡wish ¡to ¡

use! ¡ ¡

  • Example ¡(uboonecode: ¡services_microboone_simulaFon.fcl) ¡

¡ ¡ ¡

  • Example ¡(larevt: ¡database_standard.fcl) ¡
slide-10
SLIDE 10

More ¡on ¡FCL ¡

10 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

  • From ¡evdservices_microboone.fcl ¡in ¡uboonecode ¡

Library ¡problem ¡ when ¡this ¡is ¡ uncommented ¡

slide-11
SLIDE 11

Other ¡Changes ¡

11 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

  • You ¡may ¡have ¡noFced ¡other ¡changes ¡to ¡the ¡single-­‑IOV ¡pedestal ¡provider: ¡
  • Update() ¡now ¡takes ¡a ¡uint64_t ¡Fmestamp ¡
  • The ¡uint64_t ¡Fmestamp ¡is ¡converted ¡to ¡a ¡DB-­‑friendly ¡Fmestamp ¡ONLY ¡

aDer ¡checking ¡whether ¡the ¡database ¡is ¡being ¡used ¡

  • No ¡more ¡Fmestamp-­‑related ¡crashes ¡for ¡jobs ¡that ¡do ¡not ¡use ¡the ¡

database ¡ ¡

  • Conversion ¡from ¡uint64_t ¡Fmestamp ¡to ¡DB-­‑friendly ¡Fmestamp ¡is ¡

handled ¡by ¡the ¡single-­‑IOV ¡implementaFon ¡

  • All ¡experiments ¡using ¡the ¡larsoD ¡single-­‑IOV ¡are ¡forced ¡to ¡use ¡this ¡

conversion ¡

  • Not ¡ideal, ¡but ¡can ¡only ¡be ¡avoided ¡by ¡making ¡the ¡data ¡provider ¡

art-­‑dependent ¡(implement ¡Fmestamp ¡conversion ¡as ¡a ¡service) ¡

slide-12
SLIDE 12

Next ¡

12 ¡

Brandon ¡Eberly, ¡ ¡SLAC ¡

  • Write ¡single-­‑IOV ¡implementaFons ¡of ¡the ¡larproperFes ¡and ¡

detectorproperFes ¡interfaces ¡(waiFng ¡for ¡Jon ¡Paley ¡to ¡finish ¡the ¡interfaces) ¡

  • OrganizaFon: ¡can ¡larevt/CalibraFonDBI ¡be ¡the ¡home ¡for ¡all ¡DB-­‑related ¡

classes? ¡

  • three ¡directories: ¡ ¡Interface, ¡SingleIOV, ¡MulFIOV ¡
  • I ¡will ¡work ¡on ¡other ¡interfaces ¡(e.g., ¡PMTs) ¡and ¡single-­‑IOV ¡database ¡write ¡

scripts ¡as ¡demanded ¡by ¡MicroBooNE ¡

  • Maybe ¡35t ¡will ¡want ¡some ¡interfaces ¡first? ¡