Skip to content

Commit

Permalink
code-checks fix
Browse files Browse the repository at this point in the history
  • Loading branch information
panoskatsoulis committed Jul 14, 2021
1 parent 61a6883 commit a1e3263
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

class L1TMuonBarrelParamsRcd : public edm::eventsetup::EventSetupRecordImplementation<L1TMuonBarrelParamsRcd> {};

class L1TMuonBarrelKalmanParamsRcd :
public edm::eventsetup::EventSetupRecordImplementation<L1TMuonBarrelKalmanParamsRcd> {};
class L1TMuonBarrelKalmanParamsRcd
: public edm::eventsetup::EventSetupRecordImplementation<L1TMuonBarrelKalmanParamsRcd> {};

#endif
4 changes: 2 additions & 2 deletions CondFormats/L1TObjects/src/L1TMuonBarrelKalmanParams.cc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "CondFormats/L1TObjects/interface/L1TMuonBarrelKalmanParams.h"

L1TMuonBarrelKalmanParams::L1TMuonBarrelKalmanParams()
: pnodes_(NUM_BMTF_PARAM_NODES)//, l1mudttfmasks_(1)
: pnodes_(NUM_BMTF_PARAM_NODES) //, l1mudttfmasks_(1)
{
version_ = Version;
pnodes_[CONFIG].type_ = "unspecified";
pnodes_[CONFIG].fwVersion_ = 0; //default to recognize a RCD that is not filled
pnodes_[CONFIG].fwVersion_ = 0; //default to recognize a RCD that is not filled
// pnodes_[CONFIG].sparams_.clear();
// pnodes_[CONFIG].iparams_.resize(NUM_CONFIG_PARAMS);
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ESProducts.h"

#include "CondFormats/L1TObjects/interface/L1TMuonBarrelKalmanParams.h" //changed
#include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h" //changed
#include "CondFormats/L1TObjects/interface/L1TMuonBarrelKalmanParams.h"
#include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h"
#include "L1Trigger/L1TMuon/interface/MicroGMTLUTFactories.h"

#include "FWCore/ParameterSet/interface/FileInPath.h"
Expand All @@ -28,7 +28,7 @@
#include "L1Trigger/L1TCommon/interface/Parameter.h"
#include "L1Trigger/L1TCommon/interface/Mask.h"

#include "L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelParamsHelper.h" //to check
#include "L1Trigger/L1TMuonBarrel/interface/L1TMuonBarrelParamsHelper.h"

// class declaration
//
Expand Down Expand Up @@ -59,7 +59,7 @@ class L1TMuonBarrelKalmanParamsESProducer : public edm::ESProducer {
//
L1TMuonBarrelKalmanParamsESProducer::L1TMuonBarrelKalmanParamsESProducer(const edm::ParameterSet& iConfig) {
// the following line is needed to tell the framework what data is being produced
setWhatProduced(this); //???
setWhatProduced(this);

// basic configurables needed (now set static)
kalman_params.pnodes_[kalman_params.CONFIG].fwVersion_ = iConfig.getParameter<unsigned>("fwVersion");
Expand All @@ -75,7 +75,8 @@ L1TMuonBarrelKalmanParamsESProducer::~L1TMuonBarrelKalmanParamsESProducer() {}
//

// ------------ method called to produce the data ------------
L1TMuonBarrelKalmanParamsESProducer::ReturnType L1TMuonBarrelKalmanParamsESProducer::produce(const L1TMuonBarrelKalmanParamsRcd& iRecord) {
L1TMuonBarrelKalmanParamsESProducer::ReturnType L1TMuonBarrelKalmanParamsESProducer::produce(
const L1TMuonBarrelKalmanParamsRcd& iRecord) {
return std::make_unique<L1TMuonBarrelKalmanParams>(kalman_params);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class L1TMuonBarrelKalmanParamsViewer : public edm::EDAnalyzer {
public:
void analyze(const edm::Event &, const edm::EventSetup &) override;

L1TMuonBarrelKalmanParamsViewer(const edm::ParameterSet &) {};
L1TMuonBarrelKalmanParamsViewer(const edm::ParameterSet &){};
~L1TMuonBarrelKalmanParamsViewer(void) override {}
};

Expand Down Expand Up @@ -64,7 +64,7 @@ void L1TMuonBarrelKalmanParamsViewer::analyze(const edm::Event &iEvent, const ed
// Get the nodes and print out
auto pnodes = ptr->pnodes_[ptr->CONFIG];
cout << "version : " << ptr->version_ << endl;
cout << "fwVersion : " << hex << pnodes.fwVersion_ << dec << endl;
cout << "fwVersion : " << hex << pnodes.fwVersion_ << dec << endl;
cout << "LUTsPath : " << pnodes.kalmanLUTsPath_ << endl;

// typedef std::map<short, short, std::less<short> > LUT;
Expand Down
7 changes: 4 additions & 3 deletions L1TriggerConfig/Utilities/src/L1TMuonBarrelParamsWriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "FWCore/Framework/interface/ESHandle.h"

#include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsO2ORcd.h"
#include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h" // includes both Old-Phase1 and Kalman Rcds
#include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h" // includes both Old-Phase1 and Kalman Rcds
#include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h"
#include "CondFormats/L1TObjects/interface/L1TMuonBarrelKalmanParams.h"

Expand Down Expand Up @@ -46,9 +46,10 @@ void L1TMuonBarrelParamsWriter::analyze(const edm::Event& iEvent, const edm::Eve
edm::Service<cond::service::PoolDBOutputService> poolDb;
if (poolDb.isAvailable()) {
cond::Time_t firstSinceTime = poolDb->beginOfTime();
poolDb->writeOne( ptr1.get(), firstSinceTime, (isO2Opayload ? "L1TMuonBarrelParamsO2ORcd" : "L1TMuonBarrelParamsRcd") );
poolDb->writeOne(
ptr1.get(), firstSinceTime, (isO2Opayload ? "L1TMuonBarrelParamsO2ORcd" : "L1TMuonBarrelParamsRcd"));
if (not isO2Opayload)
poolDb->writeOne( ptr2.get(), firstSinceTime, ("L1TMuonBarrelKalmanParamsRcd") );
poolDb->writeOne(ptr2.get(), firstSinceTime, ("L1TMuonBarrelKalmanParamsRcd"));
}
}

Expand Down

0 comments on commit a1e3263

Please sign in to comment.