-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35876 from michalszleper/michals_o2o
OMTF o2o upgrade
- Loading branch information
Showing
27 changed files
with
717 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionO2ORcd.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
26
CondFormats/DataRecord/interface/L1TMuonOverlapFwVersionRcd.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
15
CondFormats/DataRecord/src/L1TMuonOverlapFwVersionO2ORcd.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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
49
CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h" |
4 changes: 4 additions & 0 deletions
4
CondFormats/L1TObjects/src/T_EventSetup_L1TMuonOverlapFwVersion.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include "CondFormats/L1TObjects/interface/L1TMuonOverlapFwVersion.h" | ||
#include "FWCore/Utilities/interface/typelookup.h" | ||
|
||
TYPELOOKUP_DATA_REG(L1TMuonOverlapFwVersion); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapFwVersionESProducer.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); |
24 changes: 24 additions & 0 deletions
24
L1Trigger/L1TMuonOverlap/plugins/L1TMuonOverlapFwVersionESProducer.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") | ||
) | ||
|
Oops, something went wrong.