From a576efc1ca89f09d9fbe52c30d021520ececa7a3 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Tue, 20 Oct 2020 16:33:16 +0200 Subject: [PATCH] clean BuildFiles in EventFilter --- DQM/L1TMonitor/src/L1TStage2CaloLayer1.cc | 4 +- EventFilter/CSCTFRawToDigi/test/BuildFile.xml | 1 - EventFilter/L1TXRawToDigi/BuildFile.xml | 1 + .../{plugins => interface}/UCTAMCRawData.h | 0 .../{plugins => interface}/UCTCTP7RawData.h | 0 .../{plugins => interface}/UCTDAQRawData.h | 0 .../L1TXRawToDigi/plugins/BuildFile.xml | 1 + .../plugins/L1TCaloLayer1RawToDigi.cc | 6 +- .../plugins/L1TTwinMuxRawToDigi.cc | 61 +++++++++++++- .../plugins/L1TTwinMuxRawToDigi.h | 81 ------------------- EventFilter/L1TXRawToDigi/test/BuildFile.xml | 6 +- .../L1TXRawToDigi/test/testUCTUnpacker.cpp | 6 +- 12 files changed, 71 insertions(+), 96 deletions(-) create mode 100644 EventFilter/L1TXRawToDigi/BuildFile.xml rename EventFilter/L1TXRawToDigi/{plugins => interface}/UCTAMCRawData.h (100%) rename EventFilter/L1TXRawToDigi/{plugins => interface}/UCTCTP7RawData.h (100%) rename EventFilter/L1TXRawToDigi/{plugins => interface}/UCTDAQRawData.h (100%) delete mode 100644 EventFilter/L1TXRawToDigi/plugins/L1TTwinMuxRawToDigi.h diff --git a/DQM/L1TMonitor/src/L1TStage2CaloLayer1.cc b/DQM/L1TMonitor/src/L1TStage2CaloLayer1.cc index 8fe9c7353f79a..4086e7b3cce06 100644 --- a/DQM/L1TMonitor/src/L1TStage2CaloLayer1.cc +++ b/DQM/L1TMonitor/src/L1TStage2CaloLayer1.cc @@ -14,8 +14,8 @@ #include "CondFormats/RunInfo/interface/RunInfo.h" #include "CondFormats/DataRecord/interface/RunSummaryRcd.h" -#include "EventFilter/L1TXRawToDigi/plugins/UCTDAQRawData.h" -#include "EventFilter/L1TXRawToDigi/plugins/UCTAMCRawData.h" +#include "EventFilter/L1TXRawToDigi/interface/UCTDAQRawData.h" +#include "EventFilter/L1TXRawToDigi/interface/UCTAMCRawData.h" L1TStage2CaloLayer1::L1TStage2CaloLayer1(const edm::ParameterSet& ps) : ecalTPSourceRecd_(consumes(ps.getParameter("ecalTPSourceRecd"))), diff --git a/EventFilter/CSCTFRawToDigi/test/BuildFile.xml b/EventFilter/CSCTFRawToDigi/test/BuildFile.xml index 1fbc304e229ba..28e3a7736e08f 100644 --- a/EventFilter/CSCTFRawToDigi/test/BuildFile.xml +++ b/EventFilter/CSCTFRawToDigi/test/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/EventFilter/L1TXRawToDigi/BuildFile.xml b/EventFilter/L1TXRawToDigi/BuildFile.xml new file mode 100644 index 0000000000000..e8095ee5b2f95 --- /dev/null +++ b/EventFilter/L1TXRawToDigi/BuildFile.xml @@ -0,0 +1 @@ + diff --git a/EventFilter/L1TXRawToDigi/plugins/UCTAMCRawData.h b/EventFilter/L1TXRawToDigi/interface/UCTAMCRawData.h similarity index 100% rename from EventFilter/L1TXRawToDigi/plugins/UCTAMCRawData.h rename to EventFilter/L1TXRawToDigi/interface/UCTAMCRawData.h diff --git a/EventFilter/L1TXRawToDigi/plugins/UCTCTP7RawData.h b/EventFilter/L1TXRawToDigi/interface/UCTCTP7RawData.h similarity index 100% rename from EventFilter/L1TXRawToDigi/plugins/UCTCTP7RawData.h rename to EventFilter/L1TXRawToDigi/interface/UCTCTP7RawData.h diff --git a/EventFilter/L1TXRawToDigi/plugins/UCTDAQRawData.h b/EventFilter/L1TXRawToDigi/interface/UCTDAQRawData.h similarity index 100% rename from EventFilter/L1TXRawToDigi/plugins/UCTDAQRawData.h rename to EventFilter/L1TXRawToDigi/interface/UCTDAQRawData.h diff --git a/EventFilter/L1TXRawToDigi/plugins/BuildFile.xml b/EventFilter/L1TXRawToDigi/plugins/BuildFile.xml index 91c85c3837826..b2358b0a26c23 100644 --- a/EventFilter/L1TXRawToDigi/plugins/BuildFile.xml +++ b/EventFilter/L1TXRawToDigi/plugins/BuildFile.xml @@ -1,6 +1,7 @@ + diff --git a/EventFilter/L1TXRawToDigi/plugins/L1TCaloLayer1RawToDigi.cc b/EventFilter/L1TXRawToDigi/plugins/L1TCaloLayer1RawToDigi.cc index 790e16cf8a9d2..75208a4f0338a 100644 --- a/EventFilter/L1TXRawToDigi/plugins/L1TCaloLayer1RawToDigi.cc +++ b/EventFilter/L1TXRawToDigi/plugins/L1TCaloLayer1RawToDigi.cc @@ -54,9 +54,9 @@ #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h" #include "DataFormats/L1CaloTrigger/interface/L1CaloRegion.h" -#include "UCTDAQRawData.h" -#include "UCTAMCRawData.h" -#include "UCTCTP7RawData.h" +#include "EventFilter/L1TXRawToDigi/interface/UCTDAQRawData.h" +#include "EventFilter/L1TXRawToDigi/interface/UCTAMCRawData.h" +#include "EventFilter/L1TXRawToDigi/interface/UCTCTP7RawData.h" using namespace edm; diff --git a/EventFilter/L1TXRawToDigi/plugins/L1TTwinMuxRawToDigi.cc b/EventFilter/L1TXRawToDigi/plugins/L1TTwinMuxRawToDigi.cc index 59ed3287bc7fc..300d68347f08c 100644 --- a/EventFilter/L1TXRawToDigi/plugins/L1TTwinMuxRawToDigi.cc +++ b/EventFilter/L1TXRawToDigi/plugins/L1TTwinMuxRawToDigi.cc @@ -21,7 +21,15 @@ // //-------------------------------------------------- -#include "L1TTwinMuxRawToDigi.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h" +#include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h" +#include "DataFormats/L1DTTrackFinder/interface/L1MuDTTrackContainer.h" + +#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h" +#include "FWCore/Framework/interface/global/EDProducer.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Framework/interface/Event.h" @@ -31,6 +39,57 @@ #include #include +class L1TTwinMuxRawToDigi : public edm::global::EDProducer<> { +public: + /// Constructor + L1TTwinMuxRawToDigi(const edm::ParameterSet& pset); + + /// Destructor + ~L1TTwinMuxRawToDigi() override; + + /// Produce digis out of raw data + void produce(edm::StreamID, edm::Event& e, const edm::EventSetup& c) const override; + + /// Generate and fill FED raw data for a full event + bool fillRawData(edm::Event& e, + L1MuDTChambPhContainer::Phi_Container& phi_data, + L1MuDTChambThContainer::The_Container& the_data, + L1MuDTChambPhContainer::Phi_Container& phi_out_data) const; + + void processFed(int twinmuxfed, + int wheel, + std::array const& twinMuxAmcSec, + edm::Handle data, + L1MuDTChambPhContainer::Phi_Container& phi_data, + L1MuDTChambThContainer::The_Container& the_data, + L1MuDTChambPhContainer::Phi_Container& phi_out_data) const; + +private: + bool debug_; + size_t nfeds_; + edm::InputTag DTTM7InputTag_; + std::vector feds_; + std::vector wheels_; + std::vector amcsecmap_; + std::vector > amcsec_; + + // utilities + inline unsigned char* readline(unsigned char* lineFED, int& lines, long& dataWord) const { + dataWord = *((long*)lineFED); + lineFED += 8; + ++lines; + return lineFED; + } + + edm::InputTag getDTTM7InputTag() const { return DTTM7InputTag_; } + + edm::EDGetTokenT Raw_token; + + int normBx(int bx_, int bxCnt_) const; + int radAngConversion(int radAng_) const; + int benAngConversion(int benAng_) const; +}; + L1TTwinMuxRawToDigi::L1TTwinMuxRawToDigi(const edm::ParameterSet& pset) : diff --git a/EventFilter/L1TXRawToDigi/plugins/L1TTwinMuxRawToDigi.h b/EventFilter/L1TXRawToDigi/plugins/L1TTwinMuxRawToDigi.h deleted file mode 100644 index 5f57709846827..0000000000000 --- a/EventFilter/L1TXRawToDigi/plugins/L1TTwinMuxRawToDigi.h +++ /dev/null @@ -1,81 +0,0 @@ -//------------------------------------------------- -// -/** \class DTTM7FEDReader - * - * L1 DT TwinMux Raw-to-Digi - * - * - * - * C. F. Bedoya -- CIEMAT - * G. Codispoti -- INFN Bologna - * J. Pazzini -- INFN Padova - */ -// -//-------------------------------------------------- -#ifndef L1TXRAWTODIGI_L1TTWINMUXRAWTODIGI_HH -#define L1TXRAWTODIGI_L1TTWINMUXRAWTODIGI_HH - -#include "FWCore/Framework/interface/ConsumesCollector.h" -#include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h" -#include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h" -#include "DataFormats/L1DTTrackFinder/interface/L1MuDTTrackContainer.h" - -#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h" -#include "FWCore/Framework/interface/global/EDProducer.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" - -#include - -class L1TTwinMuxRawToDigi : public edm::global::EDProducer<> { -public: - /// Constructor - L1TTwinMuxRawToDigi(const edm::ParameterSet& pset); - - /// Destructor - ~L1TTwinMuxRawToDigi() override; - - /// Produce digis out of raw data - void produce(edm::StreamID, edm::Event& e, const edm::EventSetup& c) const override; - - /// Generate and fill FED raw data for a full event - bool fillRawData(edm::Event& e, - L1MuDTChambPhContainer::Phi_Container& phi_data, - L1MuDTChambThContainer::The_Container& the_data, - L1MuDTChambPhContainer::Phi_Container& phi_out_data) const; - - void processFed(int twinmuxfed, - int wheel, - std::array const& twinMuxAmcSec, - edm::Handle data, - L1MuDTChambPhContainer::Phi_Container& phi_data, - L1MuDTChambThContainer::The_Container& the_data, - L1MuDTChambPhContainer::Phi_Container& phi_out_data) const; - -private: - bool debug_; - size_t nfeds_; - edm::InputTag DTTM7InputTag_; - std::vector feds_; - std::vector wheels_; - std::vector amcsecmap_; - std::vector > amcsec_; - - // utilities - inline unsigned char* readline(unsigned char* lineFED, int& lines, long& dataWord) const { - dataWord = *((long*)lineFED); - lineFED += 8; - ++lines; - return lineFED; - } - - edm::InputTag getDTTM7InputTag() const { return DTTM7InputTag_; } - - edm::EDGetTokenT Raw_token; - - int normBx(int bx_, int bxCnt_) const; - int radAngConversion(int radAng_) const; - int benAngConversion(int benAng_) const; -}; - -#endif diff --git a/EventFilter/L1TXRawToDigi/test/BuildFile.xml b/EventFilter/L1TXRawToDigi/test/BuildFile.xml index 6042d5f3252ec..710fb5b3db7b6 100644 --- a/EventFilter/L1TXRawToDigi/test/BuildFile.xml +++ b/EventFilter/L1TXRawToDigi/test/BuildFile.xml @@ -1,7 +1,3 @@ - - - - - + diff --git a/EventFilter/L1TXRawToDigi/test/testUCTUnpacker.cpp b/EventFilter/L1TXRawToDigi/test/testUCTUnpacker.cpp index e0cd888e9d4ec..96e95dcadba80 100644 --- a/EventFilter/L1TXRawToDigi/test/testUCTUnpacker.cpp +++ b/EventFilter/L1TXRawToDigi/test/testUCTUnpacker.cpp @@ -7,9 +7,9 @@ using namespace std; -#include "EventFilter/L1TXRawToDigi/plugins/UCTDAQRawData.h" -#include "EventFilter/L1TXRawToDigi/plugins/UCTAMCRawData.h" -#include "EventFilter/L1TXRawToDigi/plugins/UCTCTP7RawData.h" +#include "EventFilter/L1TXRawToDigi/interface/UCTDAQRawData.h" +#include "EventFilter/L1TXRawToDigi/interface/UCTAMCRawData.h" +#include "EventFilter/L1TXRawToDigi/interface/UCTCTP7RawData.h" int main(int argc, char** argv) { uint32_t index = 0;