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

migrate modules used by the HLT menu to multithreading (L1) (75x) #10968

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 13 additions & 44 deletions L1Trigger/L1TCalorimeter/plugins/L1TCaloUpgradeToGCTConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@
#include "CondFormats/DataRecord/interface/L1EmEtScaleRcd.h"
#include "FWCore/Framework/interface/ESHandle.h"

using namespace std;
using namespace edm;
using namespace l1t;

L1TCaloUpgradeToGCTConverter::L1TCaloUpgradeToGCTConverter(const ParameterSet& iConfig):
bxMin_(iConfig.getParameter<int>("bxMin")),
bxMax_(iConfig.getParameter<int>("bxMax"))
// register what you consume and keep token for later access:
EGammaToken_( consumes<EGammaBxCollection>(iConfig.getParameter<InputTag>("InputCollection")) ),
RlxTauToken_( consumes<TauBxCollection>(iConfig.getParameter<InputTag>("InputRlxTauCollection")) ),
IsoTauToken_( consumes<TauBxCollection>(iConfig.getParameter<InputTag>("InputIsoTauCollection")) ),
JetToken_( consumes<JetBxCollection>(iConfig.getParameter<InputTag>("InputCollection")) ),
EtSumToken_( consumes<EtSumBxCollection>(iConfig.getParameter<InputTag>("InputCollection")) ),
HfSumsToken_( consumes<CaloSpareBxCollection>(iConfig.getParameter<edm::InputTag>("InputHFSumsCollection")) ),
HfCountsToken_( consumes<CaloSpareBxCollection>(iConfig.getParameter<edm::InputTag>("InputHFCountsCollection")) ),
bxMin_( iConfig.getParameter<int>("bxMin") ),
bxMax_( iConfig.getParameter<int>("bxMax") )
{
produces<L1GctEmCandCollection>("isoEm");
produces<L1GctEmCandCollection>("nonIsoEm");
Expand All @@ -40,28 +50,12 @@ L1TCaloUpgradeToGCTConverter::L1TCaloUpgradeToGCTConverter(const ParameterSet& i
produces<L1GctInternHtMissCollection>();
produces<L1GctHFBitCountsCollection>();
produces<L1GctHFRingEtSumsCollection>();

// register what you consume and keep token for later access:
EGammaToken_ = consumes<EGammaBxCollection>(iConfig.getParameter<InputTag>("InputCollection"));
RlxTauToken_ = consumes<TauBxCollection>(iConfig.getParameter<InputTag>("InputRlxTauCollection"));
IsoTauToken_ = consumes<TauBxCollection>(iConfig.getParameter<InputTag>("InputIsoTauCollection"));
JetToken_ = consumes<JetBxCollection>(iConfig.getParameter<InputTag>("InputCollection"));
EtSumToken_ = consumes<EtSumBxCollection>(iConfig.getParameter<InputTag>("InputCollection"));
HfSumsToken_ = consumes<CaloSpareBxCollection>(iConfig.getParameter<edm::InputTag>("InputHFSumsCollection"));
HfCountsToken_ = consumes<CaloSpareBxCollection>(iConfig.getParameter<edm::InputTag>("InputHFCountsCollection"));
}


L1TCaloUpgradeToGCTConverter::~L1TCaloUpgradeToGCTConverter()
{
}




// ------------ method called to produce the data ------------
void
L1TCaloUpgradeToGCTConverter::produce(Event& e, const EventSetup& es)
L1TCaloUpgradeToGCTConverter::produce(StreamID, Event& e, const EventSetup& es) const
{
LogDebug("l1t|stage 1 Converter") << "L1TCaloUpgradeToGCTConverter::produce function called...\n";

Expand Down Expand Up @@ -346,31 +340,6 @@ L1TCaloUpgradeToGCTConverter::produce(Event& e, const EventSetup& es)
e.put(internalHtMissResult);
}

// ------------ method called once each job just before starting event loop ------------
void
L1TCaloUpgradeToGCTConverter::beginJob()
{
}

// ------------ method called once each job just after ending the event loop ------------
void
L1TCaloUpgradeToGCTConverter::endJob() {
}

// ------------ method called when starting to processes a run ------------

void
L1TCaloUpgradeToGCTConverter::beginRun(Run const&iR, EventSetup const&iE){

}

// ------------ method called when ending the processing of a run ------------
void
L1TCaloUpgradeToGCTConverter::endRun(Run const& iR, EventSetup const& iE){

}


// ------------ method fills 'descriptions' with the allowed parameters for the module ------------
void
L1TCaloUpgradeToGCTConverter::fillDescriptions(ConfigurationDescriptions& descriptions) {
Expand Down
49 changes: 20 additions & 29 deletions L1Trigger/L1TCalorimeter/plugins/L1TCaloUpgradeToGCTConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDProducer.h"
#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
Expand All @@ -42,39 +42,30 @@

#include <vector>

using namespace std;
using namespace edm;


//
// class declaration
//

class L1TCaloUpgradeToGCTConverter : public EDProducer {
public:
explicit L1TCaloUpgradeToGCTConverter(const ParameterSet&);
~L1TCaloUpgradeToGCTConverter();

static void fillDescriptions(ConfigurationDescriptions& descriptions);

private:
virtual void produce(Event&, EventSetup const&) override;
virtual void beginJob();
virtual void endJob();
virtual void beginRun(Run const&iR, EventSetup const&iE);
virtual void endRun(Run const& iR, EventSetup const& iE);

EDGetToken EGammaToken_;
EDGetToken RlxTauToken_;
EDGetToken IsoTauToken_;
EDGetToken JetToken_;
EDGetToken EtSumToken_;
EDGetToken HfSumsToken_;
EDGetToken HfCountsToken_;

int bxMin_;
int bxMax_;

};
class L1TCaloUpgradeToGCTConverter : public edm::global::EDProducer<> {
public:
explicit L1TCaloUpgradeToGCTConverter(const edm::ParameterSet&);
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

private:
virtual void produce(edm::StreamID, edm::Event&, edm::EventSetup const&) const override;

const edm::EDGetToken EGammaToken_;
const edm::EDGetToken RlxTauToken_;
const edm::EDGetToken IsoTauToken_;
const edm::EDGetToken JetToken_;
const edm::EDGetToken EtSumToken_;
const edm::EDGetToken HfSumsToken_;
const edm::EDGetToken HfCountsToken_;

const int bxMin_;
const int bxMax_;
};

#endif