Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mtosi committed Sep 29, 2017
1 parent 271311b commit 58f9e9a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DQM/HLTEvF/plugins/LumiMonitor.cc
Expand Up @@ -64,7 +64,7 @@ void LumiMonitor::bookHistograms(DQMStore::IBooker & ibooker,
std::string histname, histtitle;

std::string currentFolder = folderName_ ;
ibooker.setCurrentFolder(currentFolder.c_str());
ibooker.setCurrentFolder(currentFolder);

if ( doPixelLumi_ ) {
histname = "numberOfPixelClustersVsLS"; histtitle = "number of pixel clusters vs LS";
Expand Down Expand Up @@ -128,7 +128,7 @@ void LumiMonitor::analyze(edm::Event const& iEvent, edm::EventSetup const& iSetu
float scal_pu = -1.;
edm::Handle<LumiScalersCollection> lumiScalers;
iEvent.getByToken(lumiScalersToken_, lumiScalers);
if ( lumiScalers.isValid() && lumiScalers->size() ) {
if ( lumiScalers.isValid() && !lumiScalers->empty() ) {
LumiScalersCollection::const_iterator scalit = lumiScalers->begin();
scal_lumi = scalit->instantLumi();
scal_pu = scalit->pileup();
Expand Down
2 changes: 1 addition & 1 deletion DQM/HLTEvF/plugins/LumiMonitor.h
Expand Up @@ -41,7 +41,7 @@ class LumiMonitor : public DQMEDAnalyzer
{
public:
LumiMonitor( const edm::ParameterSet& );
~LumiMonitor() = default;
~LumiMonitor() override = default;
static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
static void fillHistoPSetDescription(edm::ParameterSetDescription & pset);
static void fillHistoLSPSetDescription(edm::ParameterSetDescription & pset);
Expand Down
10 changes: 5 additions & 5 deletions HLTrigger/Timer/plugins/FastTimerServiceClient.cc
Expand Up @@ -34,7 +34,7 @@ struct MEPSet {
class FastTimerServiceClient : public DQMEDHarvester {
public:
explicit FastTimerServiceClient(edm::ParameterSet const &);
~FastTimerServiceClient();
~FastTimerServiceClient() override;

static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
static void fillLumiMePSetDescription(edm::ParameterSetDescription & pset);
Expand Down Expand Up @@ -128,7 +128,7 @@ void
FastTimerServiceClient::fillProcessSummaryPlots(DQMStore::IBooker & booker, DQMStore::IGetter & getter, std::string const & current_path) {

MonitorElement * me = getter.get(current_path + "/event time_real");
if (me == 0)
if (me == nullptr)
// no FastTimerService DQM information
return;

Expand Down Expand Up @@ -229,13 +229,13 @@ FastTimerServiceClient::fillPathSummaryPlots(DQMStore::IBooker & booker, DQMStor

getter.setCurrentFolder(subsubdir);
std::vector<std::string> allmenames = getter.getMEs();
if ( allmenames.size() == 0 ) continue;
if ( allmenames.empty() ) continue;

MonitorElement * me_counter = getter.get( subsubdir + "/module_counter" );
MonitorElement * me_real_total = getter.get( subsubdir + "/module_time_real_total" );
MonitorElement * me_thread_total = getter.get( subsubdir + "/module_time_thread_total" );

if (me_counter == 0 or me_real_total == 0)
if (me_counter == nullptr or me_real_total == nullptr)
continue;

TH1D * counter = me_counter ->getTH1D();
Expand Down Expand Up @@ -378,7 +378,7 @@ FastTimerServiceClient::fillPlotsVsLumi(DQMStore::IBooker & booker, DQMStore::IG
menames.push_back(m);
}
// if no MEs available, return
if ( menames.size() == 0 )
if ( menames.empty() )
return;

// get info for getting the lumi VS LS histogram
Expand Down

0 comments on commit 58f9e9a

Please sign in to comment.