Skip to content

Conversation

@missirol
Copy link
Contributor

@missirol missirol commented Feb 13, 2025

PR description:

This PR adds ROOT dictionaries for std::pair<short,int> and (nested) vectors of that data type. This is motivated by the fact that a vector of CombinationsWithBxInCond (which is equal to std::pair<short,int> ) is a data member of the GlobalObjectMap class (which in turn is used in GlobalObjectMapRecord, one of the data formats used in the RAW data tier).

std::vector<CombinationsWithBxInCond> m_combinationWithBxVector;

The creation of these dictionaries was missed in #47030, and it likely led to the problem described in #47287.

PR validation:

None.

If this PR is a backport, please specify the original PR and why you need to backport that PR. If this PR will be backported, please specify to which release cycle the backport is meant for:

CMSSW_15_0_X

#47030 introduced this bug in CMSSW_15_0_0_pre2, and a backport of this PR should fix that.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 13, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @missirol for master.

It involves the following packages:

  • DataFormats/L1TGlobal (l1)

@aloeliger, @cmsbuild, @epalencia can you please review it and eventually sign? Thanks.
@mmusich, @rovere this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

</ioread>

<class name="CombinationsWithBxInCond"/>
<class name="std::vector<CombinationsWithBxInCond>"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that tis is really a std::vector<std::vector<std::pair<short,int>>> this should be declared in the DataFormats/StdDictionaries package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So like this instead ?

diff --git a/DataFormats/StdDictionaries/src/classes_def_pair.xml b/DataFormats/StdDictionaries/src/classes_def_pair.xml
index d49e991534f..a33c818cd4b 100644
--- a/DataFormats/StdDictionaries/src/classes_def_pair.xml
+++ b/DataFormats/StdDictionaries/src/classes_def_pair.xml
@@ -40,6 +40,7 @@
  <class name="std::pair<short,short>"/>
  <class name="std::pair<short,std::vector<short> >"/>
  <class name="std::pair<short,unsigned int>"/>
+ <class name="std::pair<short,int>"/>
  <class name="std::pair<std::basic_string<char>,bool>"/>
  <class name="std::pair<std::basic_string<char>,std::basic_string<char> >"/>
  <class name="std::pair<std::basic_string<char>,std::map<std::basic_string<char>,std::basic_string<char> > >"/>
diff --git a/DataFormats/StdDictionaries/src/classes_def_vector.xml b/DataFormats/StdDictionaries/src/classes_def_vector.xml
index 375300b416b..6a0f1d454d9 100644
--- a/DataFormats/StdDictionaries/src/classes_def_vector.xml
+++ b/DataFormats/StdDictionaries/src/classes_def_vector.xml
@@ -47,4 +47,7 @@
  <class name="std::vector<std::unique_ptr<int> >" />
  <class name="std::vector<std::pair<int,std::bitset<6> > >" />
  <class name="std::pair<int,std::bitset<6>>"/>
+ <class name="std::vector<std::pair<short,int>>" />
+ <class name="std::vector<std::vector<std::pair<short,int>>>" />
+ <class name="std::vector<std::vector<std::vector<std::pair<short,int>>>>" />
 </lcgdict>

Copy link
Contributor

Choose a reason for hiding this comment

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

yes. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I repurposed this PR instead of creating a new one. Now it's under core (and not l1t).

@missirol missirol force-pushed the devel_addL1TCondDict branch from e430f68 to ec9225b Compare February 13, 2025 22:04
@missirol missirol changed the title add dictionary for CombinationsWithBxInCond add dictionary for std::pair<short,int> Feb 13, 2025
@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Pull request #47346 was updated. @Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please check and sign again.

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

+1

Size: This PR adds an extra 24KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-afe5d8/44381/summary.html
COMMIT: ec9225b
CMSSW: CMSSW_15_1_X_2025-02-13-1100/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmssw/47346/44381/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • You potentially removed 1 lines from the logs
  • Reco comparison results: 5 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3905420
  • DQMHistoTests: Total failures: 76
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3905324
  • DQMHistoTests: Total skipped: 20
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 48 files compared)
  • Checked 214 log files, 184 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

<class name="std::pair<short,short>"/>
<class name="std::pair<short,std::vector<short> >"/>
<class name="std::pair<short,unsigned int>"/>
<class name="std::pair<short,int>"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to make sure: here I use short, but in #47030 I used int16_t. Do I leave things as they are, or is it better to be consistent (if so, would you suggest to change type here, or in [1]) ?

[1]

typedef int16_t L1TObjBxIndexType;

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm of the opinion that you should keep it the way it is. The DataFormats/StdDictionaries is meant to allow sharing of the dictionaries across different packages. If another package has the same use of std::pair they might only declare it as short. Given short is the actual fundamental type, I'd stick with that. The use of int16_t in the typedef is also useful since it is effective documentation stating why they want that size.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, thanks @Dr15Jones.

@makortel
Copy link
Contributor

Comparison differences are related to #47071

@makortel
Copy link
Contributor

+core

@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. @rappoccio, @sextonkennedy, @mandrenguyen, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2)

@mandrenguyen
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit c4cc1e9 into cms-sw:master Feb 14, 2025
20 checks passed
@missirol missirol deleted the devel_addL1TCondDict branch February 17, 2025 23:36
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.

5 participants