Skip to content
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

Change the return type of ESProducer templates L1ConfigOnlineProdBase… #22146

Merged
merged 6 commits into from Mar 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h
Expand Up @@ -41,11 +41,12 @@ class L1ObjectKeysOnlineProdBase : public edm::ESProducer {
L1ObjectKeysOnlineProdBase(const edm::ParameterSet&);
~L1ObjectKeysOnlineProdBase() override;

typedef std::shared_ptr<L1TriggerKey> ReturnType;
typedef std::unique_ptr<L1TriggerKey> ReturnType;
typedef std::unique_ptr<L1TriggerKey>::pointer FillType;

ReturnType produce(const L1TriggerKeyRcd&);

virtual void fillObjectKeys( ReturnType pL1TriggerKey ) = 0 ;
virtual void fillObjectKeys(FillType) = 0;
private:
// ----------member data ---------------------------
protected:
Expand Down
4 changes: 2 additions & 2 deletions CondTools/L1Trigger/src/L1ObjectKeysOnlineProdBase.cc
Expand Up @@ -95,10 +95,10 @@ L1ObjectKeysOnlineProdBase::produce(const L1TriggerKeyRcd& iRecord)
}

// Copy L1TriggerKey to new object.
std::shared_ptr<L1TriggerKey> pL1TriggerKey = std::make_shared< L1TriggerKey >( *subsystemKeys ) ;
std::unique_ptr<L1TriggerKey> pL1TriggerKey = std::make_unique< L1TriggerKey >( *subsystemKeys ) ;

// Get object keys.
fillObjectKeys( pL1TriggerKey ) ;
fillObjectKeys( pL1TriggerKey.get() ) ;

return pL1TriggerKey ;
}
Expand Down
Expand Up @@ -6,7 +6,7 @@ class CSCTFObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
CSCTFObjectKeysOnlineProd(const edm::ParameterSet& iConfig) ;
~CSCTFObjectKeysOnlineProd() override {}

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType ) override ;
private:
bool m_enableConfiguration ;
bool m_enablePtLut ;
Expand Down
Expand Up @@ -7,7 +7,7 @@ CSCTFObjectKeysOnlineProd::CSCTFObjectKeysOnlineProd( const edm::ParameterSet& i
m_enablePtLut( iConfig.getParameter< bool >( "enablePtLut" ) )
{}

void CSCTFObjectKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
void CSCTFObjectKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{
std::string csctfKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kCSCTF ) ;

Expand Down
Expand Up @@ -37,10 +37,10 @@ L1MuCSCPtLutConfigOnlineProd::newObject( const std::string& objectKey )

edm::LogInfo( "L1-O2O: L1MuCSCPtLutConfigOnlineProd" ) << "Returning L1MuCSCPtLut";

L1MuCSCPtLut* CSCTFPtLut = new L1MuCSCPtLut();
std::shared_ptr< L1MuCSCPtLut > CSCTFPtLut = std::make_shared< L1MuCSCPtLut >();
CSCTFPtLut->readFromDBS(ptlut);

return std::shared_ptr< L1MuCSCPtLut >( CSCTFPtLut ) ;
return CSCTFPtLut;
}

DEFINE_FWK_EVENTSETUP_MODULE(L1MuCSCPtLutConfigOnlineProd);
4 changes: 2 additions & 2 deletions L1TriggerConfig/DTTrackFinder/src/DTTFRSKeysOnlineProd.cc
Expand Up @@ -33,7 +33,7 @@ class DTTFRSKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
DTTFRSKeysOnlineProd(const edm::ParameterSet&);
~DTTFRSKeysOnlineProd() override;

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType ) override ;
private:
// ----------member data ---------------------------
};
Expand Down Expand Up @@ -69,7 +69,7 @@ DTTFRSKeysOnlineProd::~DTTFRSKeysOnlineProd()

// ------------ method called to produce the data ------------
void
DTTFRSKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
DTTFRSKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{
// SELECT HW_SETTINGS FROM CMS_DT_TF.DTTF_SETTINGS_KEY_CURRENT
l1t::OMDSReader::QueryResults rsKeyResults =
Expand Down
Expand Up @@ -33,7 +33,7 @@ class DTTFTSCObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
DTTFTSCObjectKeysOnlineProd(const edm::ParameterSet&);
~DTTFTSCObjectKeysOnlineProd() override;

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType ) override ;
private:
// ----------member data ---------------------------
};
Expand Down Expand Up @@ -69,7 +69,7 @@ DTTFTSCObjectKeysOnlineProd::~DTTFTSCObjectKeysOnlineProd()

// ------------ method called to produce the data ------------
void
DTTFTSCObjectKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
DTTFTSCObjectKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{
std::string dttfKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kDTTF ) ;

Expand Down
Expand Up @@ -26,14 +26,14 @@ class L1MuGMTParametersKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
}
~L1MuGMTParametersKeysOnlineProd() override {}

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType ) override ;
private:
};



void
L1MuGMTParametersKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
L1MuGMTParametersKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{

std::string subsystemKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kGMT ) ;
Expand Down
Expand Up @@ -21,7 +21,7 @@ class L1MuGMTRSKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
L1MuGMTRSKeysOnlineProd(const edm::ParameterSet& iConfig) ;
~L1MuGMTRSKeysOnlineProd() override {}

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType pL1TriggerKey ) override ;
private:
bool m_enableL1MuGMTChannelMask ;
};
Expand All @@ -33,7 +33,7 @@ L1MuGMTRSKeysOnlineProd::L1MuGMTRSKeysOnlineProd(const edm::ParameterSet& iConfi
}

void
L1MuGMTRSKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
L1MuGMTRSKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{
if( m_enableL1MuGMTChannelMask )
{
Expand Down
Expand Up @@ -6,7 +6,7 @@ class L1GctRSObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
L1GctRSObjectKeysOnlineProd(const edm::ParameterSet& iConfig) ;
~L1GctRSObjectKeysOnlineProd() override {}

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType pL1TriggerKey ) override ;
private:
bool m_enableL1GctChannelMask ;
};
Expand All @@ -18,7 +18,7 @@ L1GctRSObjectKeysOnlineProd::L1GctRSObjectKeysOnlineProd(const edm::ParameterSet
}

void
L1GctRSObjectKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
L1GctRSObjectKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{
if( m_enableL1GctChannelMask )
{
Expand Down
Expand Up @@ -7,12 +7,12 @@ class L1GctTSCObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
: L1ObjectKeysOnlineProdBase( iConfig ) {}
~L1GctTSCObjectKeysOnlineProd() override {}

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType pL1TriggerKey ) override ;
private:
};

void
L1GctTSCObjectKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
L1GctTSCObjectKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{
// kMYSUBSYSTEM = kCSCTF, kDTTF, kRPC, kGMT, kRCT, kGCT, kGT, or kTSP0
// subsystemKey = TRIGGERSUP_CONF.{CSCTF_KEY, DTTF_KEY, RPC_KEY, GMT_KEY, RCT_KEY, GCT_KEY, GT_KEY}
Expand Down
Expand Up @@ -34,7 +34,7 @@ class L1GtRsObjectKeysOnlineProd :
~L1GtRsObjectKeysOnlineProd() override;

/// public methods
void fillObjectKeys(ReturnType pL1TriggerKey) override;
void fillObjectKeys(FillType pL1TriggerKey) override;

private:

Expand Down
Expand Up @@ -34,7 +34,7 @@ class L1GtTscObjectKeysOnlineProd :
~L1GtTscObjectKeysOnlineProd() override;

/// public methods
void fillObjectKeys(ReturnType pL1TriggerKey) override;
void fillObjectKeys(FillType pL1TriggerKey) override;

private:

Expand Down
Expand Up @@ -238,7 +238,7 @@ std::string L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskVetoTechTrig(const std
}

// public methods
void L1GtRsObjectKeysOnlineProd::fillObjectKeys(ReturnType pL1TriggerKey) {
void L1GtRsObjectKeysOnlineProd::fillObjectKeys(FillType pL1TriggerKey) {

const std::string gtSchema = "CMS_GT";

Expand Down
Expand Up @@ -124,7 +124,7 @@ std::string L1GtTscObjectKeysOnlineProd::keyL1GtPsbSetup(
}

// public methods
void L1GtTscObjectKeysOnlineProd::fillObjectKeys(ReturnType pL1TriggerKey) {
void L1GtTscObjectKeysOnlineProd::fillObjectKeys(FillType pL1TriggerKey) {

// kMYSUBSYSTEM = kCSCTF, kDTTF, kRPC, kGMT, kRCT, mkGCT, kGT, or kTSP0
// subsystemKey = TRIGGERSUP_CONF.{CSCTF_KEY, DTTF_KEY, RPC_KEY, GMT_KEY, RCT_KEY, GCT_KEY, GT_KEY}
Expand Down
Expand Up @@ -31,7 +31,7 @@ class L1MuTriggerScaleKeysOnlineProd : public L1ObjectKeysOnlineProdBase {

~L1MuTriggerScaleKeysOnlineProd() override {}

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType pL1TriggerKey ) override ;

private:
std::vector<std::string> m_objectTypes;
Expand All @@ -40,7 +40,7 @@ class L1MuTriggerScaleKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
};

void
L1MuTriggerScaleKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
L1MuTriggerScaleKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{

std::string subsystemKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kGMT ) ;
Expand Down
Expand Up @@ -36,7 +36,7 @@ class L1RCT_RSKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
L1RCT_RSKeysOnlineProd(const edm::ParameterSet& iConfig);
~L1RCT_RSKeysOnlineProd() override {}

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType pL1TriggerKey ) override ;
private:
// ----------member data ---------------------------
bool m_enableL1RCTChannelMask;
Expand Down Expand Up @@ -67,7 +67,7 @@ L1RCT_RSKeysOnlineProd::L1RCT_RSKeysOnlineProd(const edm::ParameterSet& iConfig)

// ------------ method called to produce the data ------------
void
L1RCT_RSKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
L1RCT_RSKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{

if( m_enableL1RCTChannelMask )
Expand Down
Expand Up @@ -34,7 +34,7 @@ class RCTObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
RCTObjectKeysOnlineProd(const edm::ParameterSet&);
~RCTObjectKeysOnlineProd() override;

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType pL1TriggerKey ) override ;
private:
// ----------member data ---------------------------
};
Expand Down Expand Up @@ -70,7 +70,7 @@ RCTObjectKeysOnlineProd::~RCTObjectKeysOnlineProd()

// ------------ method called to produce the data ------------
void
RCTObjectKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
RCTObjectKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{
std::string rctKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kRCT ) ;

Expand Down
Expand Up @@ -33,7 +33,7 @@ class RPCObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
RPCObjectKeysOnlineProd(const edm::ParameterSet&);
~RPCObjectKeysOnlineProd() override;

void fillObjectKeys( ReturnType pL1TriggerKey ) override ;
void fillObjectKeys( FillType pL1TriggerKey ) override ;
private:
// ----------member data ---------------------------
bool m_enableL1RPCConfig ;
Expand Down Expand Up @@ -77,7 +77,7 @@ RPCObjectKeysOnlineProd::~RPCObjectKeysOnlineProd()

// ------------ method called to produce the data ------------
void
RPCObjectKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
RPCObjectKeysOnlineProd::fillObjectKeys( FillType pL1TriggerKey )
{
std::string rpcKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kRPC ) ;

Expand Down