-
Notifications
You must be signed in to change notification settings - Fork 4.6k
add dictionary for std::pair<short,int>
#47346
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
Conversation
|
cms-bot internal usage |
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47346/43686 |
|
A new Pull Request was created by @missirol for master. It involves the following packages:
@aloeliger, @cmsbuild, @epalencia can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
| </ioread> | ||
|
|
||
| <class name="CombinationsWithBxInCond"/> | ||
| <class name="std::vector<CombinationsWithBxInCond>"/> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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>There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. Thanks.
There was a problem hiding this comment.
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).
e430f68 to
ec9225b
Compare
CombinationsWithBxInCondstd::pair<short,int>
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-47346/43688 |
|
Pull request #47346 was updated. @Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please check and sign again. |
|
please test |
|
+1 Size: This PR adds an extra 24KB to repository Comparison SummarySummary:
|
| <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>"/> |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, thanks @Dr15Jones.
|
Comparison differences are related to #47071 |
|
+core |
|
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) |
|
+1 |
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 ofCombinationsWithBxInCond(which is equal tostd::pair<short,int>) is a data member of theGlobalObjectMapclass (which in turn is used inGlobalObjectMapRecord, one of the data formats used in the RAW data tier).cmssw/DataFormats/L1TGlobal/interface/GlobalObjectMap.h
Line 111 in bf4d4fe
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.