-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
MuonAlignment ASAN bug fix and DB output update #36145
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,8 +251,8 @@ void MuonAlignment::saveDTSurveyToDB(void) { | |
throw cms::Exception("NotAvailable") << "PoolDBOutputService not available"; | ||
|
||
// Get alignments and errors | ||
Alignments dtAlignments{}; | ||
SurveyErrors dtSurveyErrors{}; | ||
Alignments* dtAlignments = new Alignments(); | ||
SurveyErrors* dtSurveyErrors = new SurveyErrors(); | ||
|
||
align::Alignables alignableList; | ||
recursiveList(theAlignableMuon->DTBarrel(), alignableList); | ||
|
@@ -268,13 +268,13 @@ void MuonAlignment::saveDTSurveyToDB(void) { | |
(*alignable)->id()); | ||
SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors()); | ||
|
||
dtAlignments.m_align.push_back(value); | ||
dtSurveyErrors.m_surveyErrors.push_back(error); | ||
dtAlignments->m_align.push_back(value); | ||
dtSurveyErrors->m_surveyErrors.push_back(error); | ||
} | ||
|
||
// Store DT alignments and errors | ||
poolDbService->writeOneIOV<Alignments>(dtAlignments, poolDbService->currentTime(), theDTSurveyRecordName); | ||
poolDbService->writeOneIOV<SurveyErrors>(dtSurveyErrors, poolDbService->currentTime(), theDTSurveyErrorRecordName); | ||
poolDbService->writeOneIOV<Alignments>(*dtAlignments, poolDbService->currentTime(), theDTSurveyRecordName); | ||
poolDbService->writeOneIOV<SurveyErrors>(*dtSurveyErrors, poolDbService->currentTime(), theDTSurveyErrorRecordName); | ||
} | ||
|
||
void MuonAlignment::saveCSCSurveyToDB(void) { | ||
|
@@ -284,8 +284,8 @@ void MuonAlignment::saveCSCSurveyToDB(void) { | |
throw cms::Exception("NotAvailable") << "PoolDBOutputService not available"; | ||
|
||
// Get alignments and errors | ||
Alignments cscAlignments{}; | ||
SurveyErrors cscSurveyErrors{}; | ||
Alignments* cscAlignments = new Alignments(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here the original was the preferred solution |
||
SurveyErrors* cscSurveyErrors = new SurveyErrors(); | ||
|
||
align::Alignables alignableList; | ||
recursiveList(theAlignableMuon->CSCEndcaps(), alignableList); | ||
|
@@ -301,13 +301,13 @@ void MuonAlignment::saveCSCSurveyToDB(void) { | |
(*alignable)->id()); | ||
SurveyError error((*alignable)->alignableObjectId(), (*alignable)->id(), (*alignable)->survey()->errors()); | ||
|
||
cscAlignments.m_align.push_back(value); | ||
cscSurveyErrors.m_surveyErrors.push_back(error); | ||
cscAlignments->m_align.push_back(value); | ||
cscSurveyErrors->m_surveyErrors.push_back(error); | ||
} | ||
|
||
// Store CSC alignments and errors | ||
poolDbService->writeOneIOV<Alignments>(cscAlignments, poolDbService->currentTime(), theCSCSurveyRecordName); | ||
poolDbService->writeOneIOV<SurveyErrors>(cscSurveyErrors, poolDbService->currentTime(), theCSCSurveyErrorRecordName); | ||
poolDbService->writeOneIOV<Alignments>(*cscAlignments, poolDbService->currentTime(), theCSCSurveyRecordName); | ||
poolDbService->writeOneIOV<SurveyErrors>(*cscSurveyErrors, poolDbService->currentTime(), theCSCSurveyErrorRecordName); | ||
} | ||
|
||
void MuonAlignment::saveSurveyToDB(void) { | ||
|
@@ -322,13 +322,13 @@ void MuonAlignment::saveDTtoDB(void) { | |
throw cms::Exception("NotAvailable") << "PoolDBOutputService not available"; | ||
|
||
// Get alignments and errors | ||
Alignments dt_Alignments = *(theAlignableMuon->dtAlignments()); | ||
AlignmentErrorsExtended dt_AlignmentErrorsExtended = *(theAlignableMuon->dtAlignmentErrorsExtended()); | ||
const Alignments* dt_Alignments = theAlignableMuon->dtAlignments(); | ||
const AlignmentErrorsExtended* dt_AlignmentErrorsExtended = theAlignableMuon->dtAlignmentErrorsExtended(); | ||
|
||
// Store DT alignments and errors | ||
poolDbService->writeOneIOV<Alignments>(dt_Alignments, poolDbService->currentTime(), theDTAlignRecordName); | ||
poolDbService->writeOneIOV<Alignments>(*dt_Alignments, poolDbService->currentTime(), theDTAlignRecordName); | ||
poolDbService->writeOneIOV<AlignmentErrorsExtended>( | ||
dt_AlignmentErrorsExtended, poolDbService->currentTime(), theDTErrorRecordName); | ||
*dt_AlignmentErrorsExtended, poolDbService->currentTime(), theDTErrorRecordName); | ||
} | ||
|
||
void MuonAlignment::saveCSCtoDB(void) { | ||
|
@@ -338,13 +338,13 @@ void MuonAlignment::saveCSCtoDB(void) { | |
throw cms::Exception("NotAvailable") << "PoolDBOutputService not available"; | ||
|
||
// Get alignments and errors | ||
Alignments csc_Alignments = *(theAlignableMuon->cscAlignments()); | ||
AlignmentErrorsExtended csc_AlignmentErrorsExtended = *(theAlignableMuon->cscAlignmentErrorsExtended()); | ||
const Alignments* csc_Alignments = theAlignableMuon->cscAlignments(); | ||
const AlignmentErrorsExtended* csc_AlignmentErrorsExtended = theAlignableMuon->cscAlignmentErrorsExtended(); | ||
|
||
// Store CSC alignments and errors | ||
poolDbService->writeOneIOV<Alignments>(csc_Alignments, poolDbService->currentTime(), theCSCAlignRecordName); | ||
poolDbService->writeOneIOV<Alignments>(*csc_Alignments, poolDbService->currentTime(), theCSCAlignRecordName); | ||
poolDbService->writeOneIOV<AlignmentErrorsExtended>( | ||
csc_AlignmentErrorsExtended, poolDbService->currentTime(), theCSCErrorRecordName); | ||
*csc_AlignmentErrorsExtended, poolDbService->currentTime(), theCSCErrorRecordName); | ||
} | ||
|
||
void MuonAlignment::saveGEMtoDB(void) { | ||
|
@@ -354,13 +354,13 @@ void MuonAlignment::saveGEMtoDB(void) { | |
throw cms::Exception("NotAvailable") << "PoolDBOutputService not available"; | ||
|
||
// Get alignments and errors | ||
Alignments gem_Alignments = *(theAlignableMuon->gemAlignments()); | ||
AlignmentErrorsExtended gem_AlignmentErrorsExtended = *(theAlignableMuon->gemAlignmentErrorsExtended()); | ||
const Alignments* gem_Alignments = theAlignableMuon->gemAlignments(); | ||
const AlignmentErrorsExtended* gem_AlignmentErrorsExtended = theAlignableMuon->gemAlignmentErrorsExtended(); | ||
|
||
// Store CSC alignments and errors | ||
poolDbService->writeOneIOV<Alignments>(gem_Alignments, poolDbService->currentTime(), theGEMAlignRecordName); | ||
poolDbService->writeOneIOV<Alignments>(*gem_Alignments, poolDbService->currentTime(), theGEMAlignRecordName); | ||
poolDbService->writeOneIOV<AlignmentErrorsExtended>( | ||
gem_AlignmentErrorsExtended, poolDbService->currentTime(), theGEMErrorRecordName); | ||
*gem_AlignmentErrorsExtended, poolDbService->currentTime(), theGEMErrorRecordName); | ||
} | ||
|
||
void MuonAlignment::saveToDB(void) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think the
= default;
is the recommended way of doing thisThere 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.
The code-format tool changed this. do you want to keep
= default;
?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.
Interesting, @makortel @smuzaffar I thought the
default
was the preferred optionThere 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.
Oh, ok.
I copied the module from an old version.
I understood now what happened.
I will close this PR and make a new one.
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.
It is, and I'm a bit surprised that code-checks would change away from
= default
. We have plenty of those in.cc
files.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.
no, it was my mistake.