Skip to content

Add ATLAS_CHECK_THREAD_SAFETY to InDetPhysValMonitoring package

Susumu Oda requested to merge oda/athena:master-InDetPhysValMonitoring into master
  • Add ATLAS_CHECK_THREAD_SAFETY to InDetPhysValMonitoring package to check and keep thread safety
    • Add ATLAS_THREAD_SAFE macro to mutable Athena::MsgStreamMember m_msg
    • Add ATLAS_THREAD_SAFE macro to mutable variables with adding mutex guard or make them atomic
    • Add ATLAS_NOT_THREAD_SAFE to virtual Trk::Track* slim(const Trk::Track& track) const override; of InnerDetector/InDetValidation/InDetPhysValMonitoring/src/DummyTrackSlimmingTool.h because the interface declares it ATLAS_NOT_THREAD_SAFE.
    • Change static counters/checker to member variables using std::atomic
    • Remove unnecessary/wrong static keyword of a counter in InnerDetector/InDetValidation/InDetPhysValMonitoring/src/InDetPhysHitDecoratorAlg.cxx
    • Add ATLAS_NO_CHECK_FILE_THREAD_SAFETY to the following files because thread safety of the Xerces-C++ usage in this package is not clear.
      • InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ReadFromXmlDom.cxx
      • InnerDetector/InDetValidation/InDetPhysValMonitoring/src/ReadFromXmlDom.h
      • InnerDetector/InDetValidation/InDetPhysValMonitoring/src/xmlUtilities.h
    • Add ATLAS_NO_CHECK_FILE_THREAD_SAFETY to the following files because those tests use global variables
      • InnerDetector/InDetValidation/InDetPhysValMonitoring/test/HistogramDefinitionSvc_test.cxx
      • InnerDetector/InDetValidation/InDetPhysValMonitoring/test/IDPVM_GaudiFixtureBase.h
      • InnerDetector/InDetValidation/InDetPhysValMonitoring/test/XmlEntityInclusion_test.cxx
    • Introduce a cache mechanism in impledRMatchingTool using SlotSpecificObj
  • No result changes are expected.
  • Related to https://its.cern.ch/jira/browse/ATLASRECTS-5560

I ran https://gitlab.cern.ch/atlas/athena/blob/master/InnerDetector/InDetValidation/InDetPhysValMonitoring/test/test_mu20GeV_reco.sh

Reco_tf.py '--inputRDOFile' 'user.keli.mc16_13TeV.422035.ParticleGun_single_mu_Pt20.recon.RDO.e7967_e5984_s3126_r11774_tid20255026_00/RDO.20255026._000012.pool.root.1' '--outputNTUP_PHYSVALFile' 'physval.ntuple.root' '--outputAODFile' 'physval.AOD.root' '--steering' 'doRAWtoALL' '--checkEventCount' 'False' '--ignoreErrors' 'True' '--maxEvents' '-1' '--skipEvents' '0' '--valid' 'True' '--validationFlags' 'doInDet' '--autoConfiguration' 'everything' '--preExec' 'from InDetRecExample.InDetJobProperties import InDetFlags; \
      InDetFlags.doSlimming.set_Value_and_Lock(False); rec.doTrigger.set_Value_and_Lock(False); \
      from InDetPhysValMonitoring.InDetPhysValJobProperties import InDetPhysValFlags; \
      InDetPhysValFlags.doValidateTightPrimaryTracks.set_Value_and_Lock(True); \
      InDetPhysValFlags.doValidateTracksInJets.set_Value_and_Lock(False); \
      InDetPhysValFlags.doValidateGSFTracks.set_Value_and_Lock(False); \
      InDetPhysValFlags.doPhysValOutput.set_Value_and_Lock(True); \
      rec.doDumpProperties=True; rec.doCalo=False; rec.doEgamma=False; \
      rec.doForwardDet=False; rec.doInDet=True; rec.doJetMissingETTag=False; \
      rec.doLArg=False; rec.doLucid=False; rec.doMuon=False; rec.doMuonCombined=False; \
      rec.doSemiDetailedPerfMon=True; rec.doTau=False; rec.doTile=False;\
      from ParticleBuilderOptions.AODFlags import AODFlags;\
      AODFlags.ThinGeantTruth.set_Value_and_Lock(False);  \
      AODFlags.ThinNegativeEnergyCaloClusters.set_Value_and_Lock(False); \
      AODFlags.ThinNegativeEnergyNeutralPFOs.set_Value_and_Lock(False);\
      AODFlags.ThinInDetForwardTrackParticles.set_Value_and_Lock(False) '

without and with this MR and compared the output physval.ntuple.root using DCube. All comparisons were OK.

Edited by Susumu Oda

Merge request reports

Loading