Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored code in StorageFactory #35435

Merged
merged 6 commits into from
Oct 1, 2021

Conversation

Dr15Jones
Copy link
Contributor

PR description:

  • moved all code into edm::storage namespace
  • Removed diamond inheritance in Storage, IOChannel, File relationship by having File contain a IOChannel instead of inheriting from it.

PR validation:

Code compiles.
Framework unit tests all pass.

Changing inheritance to containment avoids diamond inheritance with Storage.
Removed some unused methods.
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35435/25568

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

  • FWCore/Services (core)
  • IOPool/Common (core)
  • IOPool/Input (core)
  • IOPool/Streamer (core)
  • IOPool/TFileAdaptor (core)
  • Utilities/DCacheAdaptor (core)
  • Utilities/LStoreAdaptor (core)
  • Utilities/StorageFactory (core)
  • Utilities/XrdAdaptor (core)

@makortel, @smuzaffar, @cmsbuild, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @wddgit this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

-1

Failed Tests: Build HeaderConsistency
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9c5581/19153/summary.html
COMMIT: 99218bb
CMSSW: CMSSW_12_1_X_2021-09-27-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/35435/19153/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation error when building:

>> Package IORawData/SiPixelInputSources built
Entering library rule at IORawData/SiPixelInputSources
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-09-27-1100/src/IORawData/SiPixelInputSources/src/SealModule.cc
>> Compiling edm plugin /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-09-27-1100/src/IORawData/SiPixelInputSources/src/PixelSLinkDataInputSource.cc
In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-09-27-1100/src/IORawData/SiPixelInputSources/src/PixelSLinkDataInputSource.cc:24:
/data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-09-27-1100/src/IORawData/SiPixelInputSources/interface/PixelSLinkDataInputSource.h:52:19: error: 'Storage' was not declared in this scope; did you mean 'edm::storage::Storage'?
   52 |   std::unique_ptr storage;
      |                   ^~~~~~~
      |                   edm::storage::Storage
In file included from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-09-27-1100/src/IORawData/SiPixelInputSources/interface/PixelSLinkDataInputSource.h:33,
                 from /data/cmsbld/jenkins/workspace/ib-run-pr-tests/CMSSW_12_1_X_2021-09-27-1100/src/IORawData/SiPixelInputSources/src/PixelSLinkDataInputSource.cc:24:


@Dr15Jones
Copy link
Contributor Author

@makortel @dan131riley An additional posssible refactoring would be removing the interfaces IOInput, IOOutput and IOChannel all together as nothing in our system actually wants to talk just to those interfaces. I think this is all left over from the SEAL import. Thoughts on keeping or removing said interfaces?

@Dr15Jones
Copy link
Contributor Author

Dr15Jones commented Sep 28, 2021

Here is a system diagram for the storage code
StorageFactory System.pdf

@dan131riley
Copy link

@Dr15Jones I would definitely get rid of IOChannel, it's not a useful abstraction for the way we use StorageFactory, and its effect on the class hierarchy is pernicious. Getting rid of the IOInput and IOOutput sounds ok, but I don't feel nearly as strongly about them.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-35435/25605

@cmsbuild
Copy link
Contributor

Pull request #35435 was updated. @SiewYan, @smuzaffar, @Dr15Jones, @mkirsano, @malbouis, @makortel, @Saptaparna, @cmsbuild, @GurpreetSinghChahal, @yuanchao, @agrohsje, @alberto-sanchez, @francescobrivio, @tvami can you please check and sign again.

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-9c5581/19211/summary.html
COMMIT: c48b59c
CMSSW: CMSSW_12_1_X_2021-09-28-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/35435/19211/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 40
  • DQMHistoTests: Total histograms compared: 3211080
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3211058
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 39 files compared)
  • Checked 169 log files, 37 edm output root files, 40 DQM output files
  • TriggerResults: no differences found

@@ -47,6 +47,7 @@ namespace lhef {
class LHEReader::FileSource : public LHEReader::Source {
public:
FileSource(const std::string &fileURL) {
using namespace edm::storage;
auto storage = StorageFactory::get()->open(fileURL, IOFlags::OpenRead);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Dr15Jones : Shouldn't it be edm::Storage::StorageFactory in this line according to our coding rules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been unable to determine which coding rule to which you refer. Could you point me to the reference?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought I got that comment once but indeed I cannot spot in the rules. Let me sign.

@agrohsje
Copy link

+generators

@Dr15Jones
Copy link
Contributor Author

@agrohsje our coding rules say not to use using namespace ... in global scope in header files. It is perfectly fine to use them anywhere in .cc files or inside functions or class definitions (in both .cc or .h files).

@tvami
Copy link
Contributor

tvami commented Sep 30, 2021

+alca

  • signature is needed for IORawData/SiPixelInputSources, which looks fine
  • tests pass w no failures

@makortel
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Oct 1, 2021

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants