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

OMTF o2o upgrade #35876

Merged
merged 11 commits into from Nov 18, 2021
5 changes: 5 additions & 0 deletions CondCore/L1TPlugins/src/UpgradeRecords2.cc
Expand Up @@ -14,6 +14,9 @@
#include "CondFormats/DataRecord/interface/L1TMuonEndCapForestRcd.h"
#include "CondFormats/DataRecord/interface/L1TMuonEndCapForestO2ORcd.h"

#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h"
#include "CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionRcd.h"
#include "CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionO2ORcd.h"
#include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h"
#include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h"
#include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsO2ORcd.h"
Expand All @@ -32,13 +35,15 @@ REGISTER_PLUGIN(L1TMuonEndcapParamsRcd, L1TMuonEndCapParams); // Temporary copy

REGISTER_PLUGIN(L1TMuonEndCapParamsRcd, L1TMuonEndCapParams);
REGISTER_PLUGIN(L1TMuonEndCapForestRcd, L1TMuonEndCapForest);
REGISTER_PLUGIN(L1TMuonOverlapFwVersionRcd, L1TMuonOverlapFwVersion);
REGISTER_PLUGIN(L1TMuonOverlapParamsRcd, L1TMuonOverlapParams);
REGISTER_PLUGIN(L1TMuonBarrelParamsRcd, L1TMuonBarrelParams);
REGISTER_PLUGIN(L1TMuonBarrelKalmanParamsRcd, L1TMuonBarrelKalmanParams);
REGISTER_PLUGIN(L1TMuonGlobalParamsRcd, L1TMuonGlobalParams);

REGISTER_PLUGIN(L1TMuonEndCapParamsO2ORcd, L1TMuonEndCapParams);
REGISTER_PLUGIN(L1TMuonEndCapForestO2ORcd, L1TMuonEndCapForest);
REGISTER_PLUGIN(L1TMuonOverlapFwVersionO2ORcd, L1TMuonOverlapFwVersion);
REGISTER_PLUGIN(L1TMuonOverlapParamsO2ORcd, L1TMuonOverlapParams);
REGISTER_PLUGIN(L1TMuonBarrelParamsO2ORcd, L1TMuonBarrelParams);
REGISTER_PLUGIN(L1TMuonGlobalParamsO2ORcd, L1TMuonGlobalParams);
3 changes: 3 additions & 0 deletions CondCore/Utilities/plugins/Module_2XML.cc
Expand Up @@ -192,6 +192,7 @@ PAYLOAD_2XML_MODULE(pluginUtilities_payload2xml) {
PAYLOAD_2XML_CLASS(L1TMuonEndCapParams);
PAYLOAD_2XML_CLASS(L1TMuonGlobalParams);
PAYLOAD_2XML_CLASS(L1TMuonOverlapParams);
PAYLOAD_2XML_CLASS(L1TMuonOverlapFwVersion);
PAYLOAD_2XML_CLASS(L1TUtmAlgorithm);
PAYLOAD_2XML_CLASS(L1TUtmBin);
PAYLOAD_2XML_CLASS(L1TUtmCondition);
Expand All @@ -202,6 +203,8 @@ PAYLOAD_2XML_MODULE(pluginUtilities_payload2xml) {
PAYLOAD_2XML_CLASS(L1TUtmTriggerMenu);
PAYLOAD_2XML_CLASS(L1TriggerKey);
PAYLOAD_2XML_CLASS(L1TriggerKeyList);
PAYLOAD_2XML_CLASS(L1TriggerKeyExt);
PAYLOAD_2XML_CLASS(L1TriggerKeyListExt);
PAYLOAD_2XML_CLASS(LHCInfo);
PAYLOAD_2XML_CLASS(METCorrectorParametersCollection);
PAYLOAD_2XML_CLASS(MEtXYcorrectParametersCollection);
Expand Down
3 changes: 3 additions & 0 deletions CondCore/Utilities/src/CondFormats.h
Expand Up @@ -248,6 +248,7 @@
#include "CondFormats/L1TObjects/interface/L1TMuonEndCapParams.h"
#include "CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h"
#include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h"
#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h"
#include "CondFormats/L1TObjects/interface/L1TUtmAlgorithm.h"
#include "CondFormats/L1TObjects/interface/L1TUtmBin.h"
#include "CondFormats/L1TObjects/interface/L1TUtmCondition.h"
Expand All @@ -261,6 +262,8 @@
#include "CondFormats/L1TObjects/interface/L1TGlobalPrescalesVetosFract.h"
#include "CondFormats/L1TObjects/interface/L1TriggerKey.h"
#include "CondFormats/L1TObjects/interface/L1TriggerKeyList.h"
#include "CondFormats/L1TObjects/interface/L1TriggerKeyExt.h"
#include "CondFormats/L1TObjects/interface/L1TriggerKeyListExt.h"
#include "CondFormats/PhysicsToolsObjects/interface/Histogram3D.h"
#include "CondFormats/PhysicsToolsObjects/interface/PerformancePayload.h"
#include "CondFormats/PhysicsToolsObjects/interface/PerformancePayloadFromTFormula.h"
Expand Down
30 changes: 30 additions & 0 deletions CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionO2ORcd.h
@@ -0,0 +1,30 @@
#ifndef L1TMTFOverlapFwVersionRcd_L1TMuonOverlapFwVersionO2ORcd_h
#define L1TMTFOverlapFwVersionRcd_L1TMuonOverlapFwVersionO2ORcd_h
// -*- C++ -*-
//
// Package: CondFormats/DataRecord
// Class : L1TMuonOverlapFwVersionRcd
//
/**\class L1TMuonOverlapFwVersionRcd L1TMuonOverlapFwVersionRcd.h CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionRcd.h

Description: [one line class summary]

Usage:
<usage>

*/
//
// Author: Michal Szleper
// Created: Wed, 20 Oct 2020 13:55:50 GMT
//

#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"
#include "CondFormats/DataRecord/interface/L1TriggerKeyListExtRcd.h"
#include "CondFormats/DataRecord/interface/L1TriggerKeyExtRcd.h"
#include "CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionRcd.h"
class L1TMuonOverlapFwVersionO2ORcd
: public edm::eventsetup::DependentRecordImplementation<
L1TMuonOverlapFwVersionO2ORcd,
edm::mpl::Vector<L1TriggerKeyListExtRcd, L1TriggerKeyExtRcd, L1TMuonOverlapFwVersionRcd> > {};

#endif
26 changes: 26 additions & 0 deletions CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionRcd.h
@@ -0,0 +1,26 @@
#ifndef L1TMTFOverlapFwVersionRcd_L1TMTFOverlapFwVersionRcd_h
#define L1TMTFOverlapFwVersionRcd_L1TMTFOverlapFwVersionRcd_h
// -*- C++ -*-
//
// Package: CondFormats/DataRecord
// Class : L1TMuonOverlapFwVersionRcd
//
/**\class L1TMuonOverlapFwVersionRcd L1TMuonOverlapFwVersionRcd.h CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionRcd.h

Description: [one line class summary]

Usage:
<usage>

*/
//
// Author: Michal Szleper
// Created: Wed, 20 May 2020 13:50:35 GMT
//

#include "FWCore/Framework/interface/EventSetupRecordImplementation.h"

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

#endif
15 changes: 15 additions & 0 deletions CondFormats/DataRecord/src/L1TMuonOverlapFwVersionO2ORcd.cc
@@ -0,0 +1,15 @@
// -*- C++ -*-
//
// Package: CondFormats/DataRecord
// Class : L1TMuonOverlapFwVersionRcd
//
// Implementation:
// [Notes on implementation]
//
// Author: Michal Szleper
// Created: Wed, 20 Oct 2020 13:58:35 GMT

#include "CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionO2ORcd.h"
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"

EVENTSETUP_RECORD_REG(L1TMuonOverlapFwVersionO2ORcd);
15 changes: 15 additions & 0 deletions CondFormats/DataRecord/src/L1TMuonOverlapFwVersionRcd.cc
@@ -0,0 +1,15 @@
// -*- C++ -*-
//
// Package: CondFormats/DataRecord
// Class : L1TMuonOverlapFwVersionRcd
//
// Implementation:
// [Notes on implementation]
//
// Author: Michal Szleper
// Created: Wed, 20 Oct 2020 13:57:35 GMT

#include "CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionRcd.h"
#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h"

EVENTSETUP_RECORD_REG(L1TMuonOverlapFwVersionRcd);
49 changes: 49 additions & 0 deletions CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h
@@ -0,0 +1,49 @@
#ifndef L1TMuonOverlapFwVersion_h
#define L1TMuonOverlapFwVersion_h

#include <memory>
#include <iostream>
#include <vector>
#include <cmath>

#include "CondFormats/Serialization/interface/Serializable.h"
#include "CondFormats/L1TObjects/interface/LUT.h"

///////////////////////////////////////
///////////////////////////////////////
class L1TMuonOverlapFwVersion {
public:
L1TMuonOverlapFwVersion() {
algorithmVer_ = 0x110;
layersVer_ = 0x6;
patternsVer_ = 0x3;
synthDate_ = "2018-9-18 21:26:2";
}
L1TMuonOverlapFwVersion(unsigned algoV, unsigned layersV, unsigned patternsV, std::string sDate) {
algorithmVer_ = algoV;
layersVer_ = layersV;
patternsVer_ = patternsV;
synthDate_ = sDate;
}
~L1TMuonOverlapFwVersion() {}

unsigned algoVersion() const { return algorithmVer_; }
unsigned layersVersion() const { return layersVer_; }
unsigned fwVersion() const { return layersVer_; }
unsigned patternsVersion() const { return patternsVer_; }
std::string synthDate() const { return synthDate_; }
void setAlgoVersion(unsigned algoV) { algorithmVer_ = algoV; }
void setLayersVersion(unsigned layersV) { layersVer_ = layersV; }
void setFwVersion(unsigned layersV) { layersVer_ = layersV; }
void setPatternsVersion(unsigned patternsV) { patternsVer_ = patternsV; }
void setSynthDate(std::string sDate) { synthDate_ = sDate; }

///Firmware configuration parameters
unsigned algorithmVer_;
unsigned layersVer_;
unsigned patternsVer_;
std::string synthDate_;

COND_SERIALIZABLE;
};
#endif
1 change: 1 addition & 0 deletions CondFormats/L1TObjects/src/L1TMuonOverlapFwVersion.cc
@@ -0,0 +1 @@
#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h"
@@ -0,0 +1,4 @@
#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h"
#include "FWCore/Utilities/interface/typelookup.h"

TYPELOOKUP_DATA_REG(L1TMuonOverlapFwVersion);
3 changes: 3 additions & 0 deletions CondFormats/L1TObjects/src/classes.h
Expand Up @@ -51,6 +51,7 @@
#include "CondFormats/L1TObjects/interface/CaloConfig.h"

#include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h"
#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h"
#include "CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h"
#include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h"
#include "CondFormats/L1TObjects/interface/L1TMuonBarrelKalmanParams.h"
Expand Down Expand Up @@ -96,6 +97,8 @@ namespace CondFormats_L1TObjects {
// std::vector<L1RPCConeDefinition::TLPSize> dummy15;
// std::vector<L1RPCConeDefinition::TRingToTower> dummy15a;
// std::vector<L1RPCConeDefinition::TRingToLP> dummy15b;
L1TMuonOverlapFwVersion dummy15;

L1TMuonGlobalParams dummy16;
std::vector<L1TMuonGlobalParams::Node> dummy16a;

Expand Down
3 changes: 3 additions & 0 deletions CondFormats/L1TObjects/src/classes_def.xml
Expand Up @@ -11,6 +11,9 @@
<field name="uparams_" mapping="blob"/>
</class>

<class name="L1TMuonOverlapFwVersion">
</class>

<class name="L1TMuonEndCapParams">
</class>

Expand Down
5 changes: 5 additions & 0 deletions CondTools/L1TriggerExt/plugins/SealModule.cc
Expand Up @@ -61,6 +61,11 @@ REGISTER_L1_WRITER(L1TMuonEndCapParamsO2ORcd, L1TMuonEndCapParams);

REGISTER_L1_WRITER(L1TMuonEndCapForestO2ORcd, L1TMuonEndCapForest);

#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h"
#include "CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionO2ORcd.h"

REGISTER_L1_WRITER(L1TMuonOverlapFwVersionO2ORcd, L1TMuonOverlapFwVersion);

#include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h"
#include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsO2ORcd.h"

Expand Down
3 changes: 2 additions & 1 deletion CondTools/L1TriggerExt/python/L1CondEnumExt_cfi.py
Expand Up @@ -11,5 +11,6 @@ class L1CondEnumExt:
L1TCaloParams=7
L1TGlobalPrescalesVetosFract=8
L1TMuonEndCapForest=9
NumL1Cond=10
L1TMuonOverlapFwVersion=10
NumL1Cond=11

6 changes: 6 additions & 0 deletions CondTools/L1TriggerExt/python/L1ConfigTSCPayloadsExt_cff.py
Expand Up @@ -2,6 +2,7 @@
from L1TriggerConfig.L1TConfigProducers.L1TMuonBarrelParamsOnline_cfi import *
from L1TriggerConfig.L1TConfigProducers.L1TMuonGlobalParamsOnline_cfi import *
from L1TriggerConfig.L1TConfigProducers.L1TMuonOverlapParamsOnline_cfi import *
from L1TriggerConfig.L1TConfigProducers.L1TMuonOverlapFwVersionOnline_cfi import *
from L1TriggerConfig.L1TConfigProducers.L1TMuonEndCapParamsOnline_cfi import *
from L1TriggerConfig.L1TConfigProducers.L1TMuonEndCapForestOnline_cfi import *
from L1TriggerConfig.L1TConfigProducers.L1TCaloParamsOnline_cfi import *
Expand All @@ -16,6 +17,7 @@ def setTSCPayloadsDB(process, DBConnect, DBAuth, protoDBConnect, protoDBAuth):
process.L1TMuonEndCapForestOnlineProd.onlineDB = cms.string( DBConnect )
process.L1TMuonGlobalParamsOnlineProd.onlineDB = cms.string( DBConnect )
process.L1TMuonOverlapParamsOnlineProd.onlineDB = cms.string( DBConnect )
process.L1TMuonOverlapFwVersionOnlineProd.onlineDB = cms.string( DBConnect )
process.L1TUtmTriggerMenuOnlineProd.onlineDB = cms.string( DBConnect )

process.L1TCaloParamsOnlineProd.onlineAuthentication = cms.string( DBAuth )
Expand All @@ -25,15 +27,18 @@ def setTSCPayloadsDB(process, DBConnect, DBAuth, protoDBConnect, protoDBAuth):
process.L1TMuonEndCapForestOnlineProd.onlineAuthentication = cms.string( DBAuth )
process.L1TMuonGlobalParamsOnlineProd.onlineAuthentication = cms.string( DBAuth )
process.L1TMuonOverlapParamsOnlineProd.onlineAuthentication = cms.string( DBAuth )
process.L1TMuonOverlapFwVersionOnlineProd.onlineAuthentication = cms.string( DBAuth )
process.L1TUtmTriggerMenuOnlineProd.onlineAuthentication = cms.string( DBAuth )

process.l1caloparProtodb.connect = cms.string( protoDBConnect )
process.l1bmtfparProtodb.connect = cms.string( protoDBConnect )
process.l1emtfparProtodb.connect = cms.string( protoDBConnect )
# process.l1omtfparProtodb.connect = cms.string( protoDBConnect )
process.l1gmtparProtodb.connect = cms.string( protoDBConnect )
process.l1caloparProtodb.DBParameters.authenticationPath = cms.untracked.string( protoDBAuth )
process.l1bmtfparProtodb.DBParameters.authenticationPath = cms.untracked.string( protoDBAuth )
process.l1emtfparProtodb.DBParameters.authenticationPath = cms.untracked.string( protoDBAuth )
# process.l1omtfparProtodb.DBParameters.authenticationPath = cms.untracked.string( protoDBAuth )
process.l1gmtparProtodb.DBParameters.authenticationPath = cms.untracked.string( protoDBAuth )

def liftPayloadSafetyFor(process, systems):
Expand All @@ -55,4 +60,5 @@ def liftPayloadSafetyFor(process, systems):

if 'OMTF' in systems:
process.L1TMuonOverlapParamsOnlineProd.transactionSafe = cms.bool(False)
process.L1TMuonOverlapFwVersionOnlineProd.transactionSafe = cms.bool(False)

1 change: 1 addition & 0 deletions CondTools/L1TriggerExt/python/L1O2OTagsExt_cfi.py
Expand Up @@ -11,6 +11,7 @@ def initL1O2OTagsExt():
initL1O2OTagsExt.tagBaseVec[ L1CondEnumExt.L1TUtmTriggerMenu ] = "Stage2v0_hlt"
initL1O2OTagsExt.tagBaseVec[ L1CondEnumExt.L1TGlobalPrescalesVetosFract ] = "Stage2v0_hlt"
initL1O2OTagsExt.tagBaseVec[ L1CondEnumExt.L1TMuonBarrelParams ] = "Stage2v1_hlt"
initL1O2OTagsExt.tagBaseVec[ L1CondEnumExt.L1TMuonOverlapFwVersion ] = "Stage2v0_hlt"
initL1O2OTagsExt.tagBaseVec[ L1CondEnumExt.L1TMuonOverlapParams ] = "Stage2v0_hlt"
initL1O2OTagsExt.tagBaseVec[ L1CondEnumExt.L1TMuonEndCapParams ] = "Stage2v3_hlt"
initL1O2OTagsExt.tagBaseVec[ L1CondEnumExt.L1TMuonEndCapForest ] = "Stage2v1_hlt"
Expand Down
6 changes: 6 additions & 0 deletions CondTools/L1TriggerExt/python/L1SubsystemParamsExt_cfi.py
Expand Up @@ -41,6 +41,12 @@ def initL1SubsystemsExt( tagBaseVec = [],
type = cms.string('L1TMuonEndCapForest'),
key = cms.string(objectKey)
),
cms.PSet(
record = cms.string('L1TMuonOverlapFwVersionO2ORcd'),
tag = cms.string('L1TMuonOverlapFwVersion_' + tagBaseVec[ L1CondEnumExt.L1TMuonOverlapFwVersion ]),
type = cms.string('L1TMuonOverlapFwVersion'),
key = cms.string(objectKey)
),
michalszleper marked this conversation as resolved.
Show resolved Hide resolved
cms.PSet(
record = cms.string('L1TMuonOverlapParamsO2ORcd'),
tag = cms.string('L1TMuonOverlapParams_' + tagBaseVec[ L1CondEnumExt.L1TMuonOverlapParams ]),
Expand Down
@@ -0,0 +1,35 @@
#include "sstream"

// user include files
#include "FWCore/Framework/interface/ModuleFactory.h"
#include "FWCore/Framework/interface/ESProducer.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ESProducts.h"

#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h"
#include "CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionRcd.h"

#include "L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapFwVersionESProducer.h"

L1TMuonOverlapFwVersionESProducer::L1TMuonOverlapFwVersionESProducer(const edm::ParameterSet& theConfig) {
setWhatProduced(this, &L1TMuonOverlapFwVersionESProducer::produceFwVersion);

unsigned algoV = theConfig.getParameter<unsigned>("algoVersion");
unsigned layersV = theConfig.getParameter<unsigned>("layersVersion");
unsigned patternsV = theConfig.getParameter<unsigned>("patternsVersion");
std::string sDate = theConfig.getParameter<std::string>("synthDate");
params.setAlgoVersion(algoV);
params.setLayersVersion(layersV);
params.setPatternsVersion(patternsV);
params.setSynthDate(sDate);
}

L1TMuonOverlapFwVersionESProducer::~L1TMuonOverlapFwVersionESProducer() {}

L1TMuonOverlapFwVersionESProducer::ReturnType L1TMuonOverlapFwVersionESProducer::produceFwVersion(
const L1TMuonOverlapFwVersionRcd& iRecord) {
return std::make_unique<L1TMuonOverlapFwVersion>(params);
}

#include "FWCore/Framework/interface/MakerMacros.h"
DEFINE_FWK_EVENTSETUP_MODULE(L1TMuonOverlapFwVersionESProducer);
@@ -0,0 +1,24 @@
// system include files
#include <memory>

// user include files
#include "FWCore/Framework/interface/ModuleFactory.h"
#include "FWCore/Framework/interface/ESProducer.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/ESProducts.h"

#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h"
#include "CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionRcd.h"

class L1TMuonOverlapFwVersionESProducer : public edm::ESProducer {
public:
L1TMuonOverlapFwVersionESProducer(const edm::ParameterSet&);
~L1TMuonOverlapFwVersionESProducer() override;

using ReturnType = std::unique_ptr<L1TMuonOverlapFwVersion>;

ReturnType produceFwVersion(const L1TMuonOverlapFwVersionRcd&);

private:
L1TMuonOverlapFwVersion params;
};
18 changes: 18 additions & 0 deletions L1Trigger/L1TMuonOverlap/python/fakeOmtfFwVersion_cff.py
@@ -0,0 +1,18 @@
import FWCore.ParameterSet.Config as cms

omtfFwVersionSource = cms.ESSource(
"EmptyESSource",
recordName = cms.string('L1TMuonOverlapFwVersionRcd'),
iovIsRunNotTime = cms.bool(True),
firstValid = cms.vuint32(1)
)

###OMTF FW ESProducer.
omtfFwVersion = cms.ESProducer(
"L1TMuonOverlapFwVersionESProducer",
algoVersion = cms.uint32(0x110),
layersVersion = cms.uint32(6),
patternsVersion = cms.uint32(3),
synthDate = cms.string("2001-01-01 00:00")
)