Skip to content

Commit

Permalink
Merge CMSSW_7_5_X into CMSSW_7_6_X.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsbuild committed Jun 24, 2015
2 parents 913a399 + f9bbfee commit 68b4ccf
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 10 deletions.
6 changes: 6 additions & 0 deletions FWCore/PrescaleService/interface/PrescaleService.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef FWCore_PrescaleService_PrescaleService_h
#define FWCore_PrescaleService_PrescaleService_h

#include "DataFormats/Provenance/interface/ParameterSetID.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/SaveConfiguration.h"

Expand All @@ -12,6 +13,8 @@
namespace edm {
class ActivityRegistry;
class ConfigurationDescriptions;
class PathsAndConsumesOfModulesBase;
class ProcessContext;

namespace service {

Expand Down Expand Up @@ -47,6 +50,7 @@ namespace edm {
//
// private member functions
//
void preBeginJob(PathsAndConsumesOfModulesBase const&, ProcessContext const&);
void postBeginJob();

//
Expand All @@ -57,8 +61,10 @@ namespace edm {
const unsigned int lvl1Default_;
const std::vector<ParameterSet> vpsetPrescales_;
PrescaleTable_t prescaleTable_;
ParameterSetID processParameterSetID_;
};
}
}

#endif

15 changes: 11 additions & 4 deletions FWCore/PrescaleService/src/PrescaleService.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#include "FWCore/PrescaleService/interface/PrescaleService.h"
#include "FWCore/ServiceRegistry/interface/ActivityRegistry.h"
#include "FWCore/ParameterSet/interface/Registry.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/ServiceRegistry/interface/ProcessContext.h"
#include "FWCore/Utilities/interface/Exception.h"

#include <iostream>
Expand All @@ -29,6 +29,7 @@ namespace edm {
, vpsetPrescales_(iPS.getParameterSetVector("prescaleTable"))
, prescaleTable_()
{
iReg.watchPreBeginJob(this, &PrescaleService::preBeginJob);
iReg.watchPostBeginJob(this, &PrescaleService::postBeginJob);

// Sanity check
Expand Down Expand Up @@ -61,11 +62,17 @@ namespace edm {

// member functions

void PrescaleService::preBeginJob(PathsAndConsumesOfModulesBase const&,
ProcessContext const& processContext) {
if(!processParameterSetID_.isValid()) {
processParameterSetID_ = processContext.parameterSetID();
}
}

void PrescaleService::postBeginJob() {

// Acesss to Process ParameterSet needed - can't be done in c'tor
const ParameterSet prcPS = getProcessParameterSet();

// Acess to Process ParameterSet needed - can't be done in c'tor
ParameterSet const& prcPS = edm::getParameterSet(processParameterSetID_);
// Label of HLTPrescaler on each path, keyed on pathName
std::map<std::string,std::string> path2module;
// Name of path for each HLTPrescaler, keyed on moduleLabel
Expand Down
3 changes: 2 additions & 1 deletion FastSimulation/Tracking/src/TrackingLayer.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "FastSimulation/Tracking/interface/TrackingLayer.h"


const TrackingLayer::eqfct TrackingLayer::_eqfct;

TrackingLayer::TrackingLayer():
_subDet(Det::UNKNOWN),
_side(Side::BARREL),
Expand Down
1 change: 0 additions & 1 deletion Utilities/StaticAnalyzers/scripts/data-class-funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@
exact= r"^" + re.escape(flaggedclass) + r"$"
exactmatch=re.match(exact,dataclass)
if exactmatch:
if re.match(flaggedclass,dataclass):
print "Flagged event setup data class '"+dataclass+"' is accessed in call stack '",
path = nx.shortest_path(G,tfunc,dataclassfunc)
for p in path:
Expand Down
2 changes: 1 addition & 1 deletion Utilities/StaticAnalyzers/src/ClassChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ void ClassChecker::checkASTDecl(const clang::CXXRecordDecl *RD, clang::ento::Ana
WalkAST walker(this,BR, mgr.getAnalysisDeclContext(RD), (*(RD->ctor_begin()))->getMostRecentDecl() ) ;
std::string buf;
llvm::raw_string_ostream os(buf);
os << "Mutable member '" <<t.getAsString()<<" "<<*D << "' in data class '"<<support::getQualifiedName(*RD)<<"', might be thread-unsafe when accessing via a const handle.";
os << "Mutable member '" <<t.getCanonicalType().getAsString()<<" "<<*D << "' in data class '"<<support::getQualifiedName(*RD)<<"', might be thread-unsafe when accessing via a const handle.";
BR.EmitBasicReport(D, this, "Mutable member in data class",
"Data Class Const Correctness", os.str(), DLoc);
std::string pname = support::getQualifiedName(*(RD));
Expand Down
5 changes: 3 additions & 2 deletions Utilities/StaticAnalyzers/src/CmsSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ std::string support::getQualifiedName(const clang::NamedDecl &d) {
bool support::isSafeClassName(const std::string &cname) {

static const std::vector<std::string> names = {
"std::atomic",
"struct std::atomic",
"atomic<",
"std::atomic<",
"struct std::atomic<",
"std::__atomic_",
"std::mutex",
"std::recursive_mutex",
Expand Down
2 changes: 1 addition & 1 deletion Utilities/StaticAnalyzers/src/MutableMemberChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void MutableMemberChecker::checkASTDecl(const clang::FieldDecl *D,
if ( ! support::isDataClass( D->getParent()->getQualifiedNameAsString() ) ) return;
std::string buf;
llvm::raw_string_ostream os(buf);
os << "Mutable member'" <<t.getAsString()<<" "<<*D << "' in class '"<<D->getParent()->getQualifiedNameAsString()<<"', might be thread-unsafe when accessing via a const handle.";
os << "Mutable member'" <<t.getCanonicalType().getAsString()<<" "<<*D << "' in class '"<<D->getParent()->getQualifiedNameAsString()<<"', might be thread-unsafe when accessing via a const handle.";
BR.EmitBasicReport(D, this, "mutable member",
"ThreadSafety", os.str(), DLoc);
return;
Expand Down

0 comments on commit 68b4ccf

Please sign in to comment.