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
L1Trigger/TrackTrigger: Update return type of produce to unique_ptr. #22174
L1Trigger/TrackTrigger: Update return type of produce to unique_ptr. #22174
Conversation
Replace shared_ptr class member with function temporary unique_ptr.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-22174/3320 |
A new Pull Request was created by @gartung (Patrick Gartung) for master. It involves the following packages: L1Trigger/TrackTrigger @nsmith-, @cmsbuild, @kpedro88, @thomreis, @rekovic can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
{ | ||
TTClusterAlgorithm< T >* TTClusterAlgo = | ||
new TTClusterAlgorithm_neighbor< T >( ); | ||
|
||
_theAlgo = std::shared_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo ); | ||
std::unique_ptr< TTClusterAlgorithm< T > > _theAlgo; | ||
_theAlgo = std::unique_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo ); | ||
return _theAlgo; |
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 should be possible to replace the entire body with
return std::make_unique<TTClusterAlgorithm_neighbor< T >>();
{ | ||
TTClusterAlgorithm< T >* TTClusterAlgo = | ||
new TTClusterAlgorithm_official< T >( mWidthCut ); | ||
|
||
_theAlgo = std::shared_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo ); | ||
std::unique_ptr< TTClusterAlgorithm< T > > _theAlgo; | ||
_theAlgo = std::unique_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo ); | ||
return _theAlgo; |
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.
return std::make_unique<TTClusterAlgorithm_official< T >>( mWidthCut );
@@ -112,7 +111,8 @@ class ES_TTStubAlgorithm_cbc3 : public edm::ESProducer | |||
const TrackerTopology* const theTrackerTopo = tTopoHandle.product(); | |||
|
|||
TTStubAlgorithm< T >* TTStubAlgo = new TTStubAlgorithm_cbc3< T >( theTrackerGeom, theTrackerTopo, mPerformZMatching2S ); | |||
_theAlgo = std::shared_ptr< TTStubAlgorithm< T > >( TTStubAlgo ); | |||
std::unique_ptr< TTStubAlgorithm< T > > _theAlgo; | |||
_theAlgo = std::unique_ptr< TTStubAlgorithm< T > >( TTStubAlgo ); | |||
return _theAlgo; |
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.
return std::make_unique<TTStubAlgorithm_cbc3< T >>( theTrackerGeom, theTrackerTopo, mPerformZMatching2S );
@@ -172,7 +171,8 @@ class ES_TTStubAlgorithm_official : public edm::ESProducer | |||
setBarrelCut, setRingCut, setTiltedCut, setBarrelNTilt, | |||
mPerformZMatchingPS, mPerformZMatching2S); | |||
|
|||
_theAlgo = std::shared_ptr< TTStubAlgorithm< T > >( TTStubAlgo ); | |||
std::unique_ptr< TTStubAlgorithm< T > > _theAlgo; | |||
_theAlgo = std::unique_ptr< TTStubAlgorithm< T > >( TTStubAlgo ); | |||
return _theAlgo; |
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.
return std::make_unique<TTStubAlgorithm_official< T >>( theTrackerGeom, theTrackerTopo,
setBarrelCut, setRingCut, setTiltedCut, setBarrelNTilt,
mPerformZMatchingPS, mPerformZMatching2S);
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-22174/3321 |
please test |
The tests are being triggered in jenkins. |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
Comparison is ready @slava77 comparisons for the following workflows were not done due to missing matrix map:
Comparison Summary:
|
+1 |
+1 |
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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
Replace shared_ptr class member with function temporary unique_ptr.