Skip to content

Commit

Permalink
Mark functions as thread safe
Browse files Browse the repository at this point in the history
Use attribute to mark some functions thread safe
that are falsely flagged as a problem by the static
analyzer.
  • Loading branch information
wddgit committed May 6, 2014
1 parent 2548f13 commit 7439cec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions DataFormats/TrackReco/interface/Track.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "DataFormats/TrackReco/interface/TrackExtra.h"
#include "DataFormats/TrackReco/interface/TrackExtraFwd.h"
#include "DataFormats/TrackingRecHit/interface/TrackingRecHitFwd.h"
#include "FWCore/Utilities/interface/thread_safety_macros.h"

namespace reco {

Expand Down Expand Up @@ -51,9 +52,9 @@ namespace reco {
/// innermost trajectory state curvilinear errors
CovarianceMatrix innerStateCovariance() const { return extra_->innerStateCovariance(); }
/// fill outermost trajectory state curvilinear errors
CovarianceMatrix & fillOuter( CovarianceMatrix & v ) const { return extra_->fillOuter( v ); }
CovarianceMatrix & fillOuter CMS_THREAD_SAFE ( CovarianceMatrix & v ) const { return extra_->fillOuter( v ); }
/// fill outermost trajectory state curvilinear errors
CovarianceMatrix & fillInner( CovarianceMatrix & v ) const { return extra_->fillInner( v ); }
CovarianceMatrix & fillInner CMS_THREAD_SAFE ( CovarianceMatrix & v ) const { return extra_->fillInner( v ); }
/// DetId of the detector on which surface the outermost state is located
unsigned int outerDetId() const { return extra_->outerDetId(); }
/// DetId of the detector on which surface the innermost state is located
Expand Down
5 changes: 3 additions & 2 deletions DataFormats/TrackReco/interface/TrackExtra.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "DataFormats/TrackReco/interface/TrackResiduals.h"
#include "DataFormats/TrajectorySeed/interface/PropagationDirection.h"
#include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
#include "FWCore/Utilities/interface/thread_safety_macros.h"

namespace reco {
class TrackExtra : public TrackExtraBase {
Expand Down Expand Up @@ -109,9 +110,9 @@ namespace reco {
/// innermost trajectory state curvilinear errors
CovarianceMatrix innerStateCovariance() const;
/// fill outermost trajectory state curvilinear errors
CovarianceMatrix & fillOuter( CovarianceMatrix & v ) const;
CovarianceMatrix & fillOuter CMS_THREAD_SAFE ( CovarianceMatrix & v ) const;
/// fill outermost trajectory state curvilinear errors
CovarianceMatrix & fillInner( CovarianceMatrix & v ) const;
CovarianceMatrix & fillInner CMS_THREAD_SAFE ( CovarianceMatrix & v ) const;
/// DetId of the detector on which surface the outermost state is located
unsigned int outerDetId() const { return outerDetId_; }
/// DetId of the detector on which surface the innermost state is located
Expand Down

0 comments on commit 7439cec

Please sign in to comment.