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

[EventFilter] Move private headers in plugins dir; merge plugins cc/h files #34898

Merged
merged 2 commits into from
Sep 1, 2021
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
44 changes: 0 additions & 44 deletions EventFilter/CSCTFRawToDigi/interface/CSCTFAnalyzer.h

This file was deleted.

44 changes: 0 additions & 44 deletions EventFilter/CSCTFRawToDigi/interface/CSCTFPacker.h

This file was deleted.

47 changes: 0 additions & 47 deletions EventFilter/CSCTFRawToDigi/interface/CSCTFUnpacker.h

This file was deleted.

48 changes: 45 additions & 3 deletions EventFilter/CSCTFRawToDigi/plugins/CSCTFAnalyzer.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
#include "EventFilter/CSCTFRawToDigi/interface/CSCTFAnalyzer.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Utilities/interface/InputTag.h"

//consumes
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h"
#include "DataFormats/L1CSCTrackFinder/interface/L1CSCTrackCollection.h"
#include "DataFormats/L1CSCTrackFinder/interface/L1CSCStatusDigiCollection.h"
#include "DataFormats/L1CSCTrackFinder/interface/CSCTriggerContainer.h"
#include "DataFormats/L1CSCTrackFinder/interface/TrackStub.h"

#include <TTree.h>
#include <TFile.h>

class CSCTFAnalyzer : public edm::EDAnalyzer {
private:
edm::InputTag mbProducer, lctProducer, trackProducer, statusProducer;
TTree *tree;
TFile *file;
int dtPhi[12][2];

edm::EDGetTokenT<L1CSCStatusDigiCollection> L1CSCS_Tok;
edm::EDGetTokenT<CSCTriggerContainer<csctf::TrackStub> > CSCTC_Tok;
edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CSCCDC_Tok;
edm::EDGetTokenT<L1CSCTrackCollection> L1CST_Tok;

public:
void analyze(const edm::Event &e, const edm::EventSetup &c) override;

explicit CSCTFAnalyzer(const edm::ParameterSet &conf);
~CSCTFAnalyzer(void) override {
file->cd();
tree->Write();
file->Close();
}
};

#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

Expand All @@ -7,7 +46,7 @@
#include <iostream>
#include <iomanip>

CSCTFAnalyzer::CSCTFAnalyzer(const edm::ParameterSet& conf) : edm::EDAnalyzer() {
CSCTFAnalyzer::CSCTFAnalyzer(const edm::ParameterSet &conf) : edm::EDAnalyzer() {
mbProducer = conf.getUntrackedParameter<edm::InputTag>("mbProducer", edm::InputTag("csctfunpacker"));
lctProducer = conf.getUntrackedParameter<edm::InputTag>("lctProducer", edm::InputTag("csctfunpacker"));
trackProducer = conf.getUntrackedParameter<edm::InputTag>("trackProducer", edm::InputTag("csctfunpacker"));
Expand Down Expand Up @@ -46,7 +85,7 @@ CSCTFAnalyzer::CSCTFAnalyzer(const edm::ParameterSet& conf) : edm::EDAnalyzer()
L1CST_Tok = consumes<L1CSCTrackCollection>(edm::InputTag(trackProducer.label(), trackProducer.instance()));
}

void CSCTFAnalyzer::analyze(const edm::Event& e, const edm::EventSetup& c) {
void CSCTFAnalyzer::analyze(const edm::Event &e, const edm::EventSetup &c) {
/* edm::Handle<FEDRawDataCollection> rawdata;
e.getByToken("source","",rawdata);

Expand Down Expand Up @@ -192,3 +231,6 @@ void CSCTFAnalyzer::analyze(const edm::Event& e, const edm::EventSetup& c) {
edm::LogInfo("CSCTFAnalyzer") << " No valid L1CSCTrackCollection products found";
}
}

#include "FWCore/Framework/interface/MakerMacros.h"
DEFINE_FWK_MODULE(CSCTFAnalyzer);
44 changes: 43 additions & 1 deletion EventFilter/CSCTFRawToDigi/plugins/CSCTFPacker.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,43 @@
#include "EventFilter/CSCTFRawToDigi/interface/CSCTFPacker.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"

#include "FWCore/Framework/interface/one/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/Utilities/interface/InputTag.h"

#include "DataFormats/L1CSCTrackFinder/interface/L1CSCTrackCollection.h"
#include "DataFormats/L1CSCTrackFinder/interface/CSCTriggerContainer.h"
#include "DataFormats/L1CSCTrackFinder/interface/TrackStub.h"

#include <string>

class CSCTFPacker : public edm::one::EDProducer<> {
private:
edm::InputTag lctProducer, mbProducer, trackProducer;

bool zeroSuppression;
unsigned short nTBINs;
unsigned short activeSectors;
bool putBufferToEvent;

bool swapME1strips;

FILE* file;

int m_minBX, m_maxBX, central_lct_bx, central_sp_bx;

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CSCCDC_Tok;
edm::EDGetTokenT<CSCTriggerContainer<csctf::TrackStub> > CSCTC_Tok;
edm::EDGetTokenT<L1CSCTrackCollection> L1CSCTr_Tok;

public:
void produce(edm::Event& e, const edm::EventSetup& c) override;

explicit CSCTFPacker(const edm::ParameterSet& conf);
~CSCTFPacker(void) override;
};

#include "EventFilter/CSCTFRawToDigi/src/CSCTFEvent.h"

#include <strings.h>
Expand Down Expand Up @@ -397,3 +436,6 @@ void CSCTFPacker::produce(edm::Event& e, const edm::EventSetup& c) {
if (file)
fwrite(spDDUrecord, 2, pos - spDDUrecord, file);
}

#include "FWCore/Framework/interface/MakerMacros.h"
DEFINE_FWK_MODULE(CSCTFPacker);
46 changes: 45 additions & 1 deletion EventFilter/CSCTFRawToDigi/plugins/CSCTFUnpacker.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,45 @@
#include "EventFilter/CSCTFRawToDigi/interface/CSCTFUnpacker.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/Framework/interface/ConsumesCollector.h"
#include <FWCore/ParameterSet/interface/ParameterSet.h>
#include <FWCore/Utilities/interface/InputTag.h>

//CSC Track Finder Raw Data Format
#include "EventFilter/CSCTFRawToDigi/src/CSCTFEvent.h"

//FEDRawData
#include "DataFormats/FEDRawData/interface/FEDRawData.h"
#include "DataFormats/FEDRawData/interface/FEDNumbering.h"
#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"

#include <vector>
#include <string>

class CSCTriggerMapping;

class CSCTFUnpacker : public edm::stream::EDProducer<> {
private:
int m_minBX, m_maxBX;
bool swapME1strips;

CSCTriggerMapping* mapping; // redundant, but needed

CSCTFEvent tfEvent; // TF data container

// geometry may not be properly set in CSC TF data
// make an artificial assignment of each of 12 SPs (slots 6-11 and 16-21) to 12 sectors (1-12, 0-not assigned)
std::vector<int> slot2sector;

// label of the module which produced raw data
edm::InputTag producer;

edm::EDGetTokenT<FEDRawDataCollection> Raw_token;

public:
void produce(edm::Event& e, const edm::EventSetup& c) override;

CSCTFUnpacker(const edm::ParameterSet& pset);
~CSCTFUnpacker(void) override;
};

//Framework stuff
#include "DataFormats/Common/interface/Handle.h"
Expand Down Expand Up @@ -330,3 +371,6 @@ void CSCTFUnpacker::produce(edm::Event& e, const edm::EventSetup& c) {
e.put(std::move(trackProduct));
e.put(std::move(statusProduct));
}

#include "FWCore/Framework/interface/MakerMacros.h"
DEFINE_FWK_MODULE(CSCTFUnpacker);
8 changes: 0 additions & 8 deletions EventFilter/CSCTFRawToDigi/plugins/SealModule.cc

This file was deleted.

Loading