Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:39

0001 #ifndef GctDigiToRaw_h
0002 #define GctDigiToRaw_h
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    GctDigiToRaw
0007 // Class:      GctDigiToRaw
0008 //
0009 /**\class GctDigiToRaw GctDigiToRaw.cc EventFilter/GctRawToDigi/src/GctDigiToRaw.cc
0010 
0011  Description: Produce fake GCT raw data from digis
0012 
0013  Implementation:
0014      <Notes on implementation>
0015 */
0016 //
0017 // Original Author:  Jim Brooke
0018 //         Created:  Wed Nov  1 11:57:10 CET 2006
0019 //
0020 //
0021 
0022 // system include files
0023 #include <memory>
0024 
0025 // user include files
0026 #include "FWCore/Framework/interface/Frameworkfwd.h"
0027 #include "FWCore/Framework/interface/global/EDProducer.h"
0028 #include "FWCore/Framework/interface/Event.h"
0029 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0030 #include "FWCore/Utilities/interface/EDGetToken.h"
0031 
0032 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
0033 
0034 #include "EventFilter/GctRawToDigi/src/GctFormatTranslateMCLegacy.h"
0035 
0036 //
0037 // class decleration
0038 //
0039 
0040 class GctDigiToRaw : public edm::global::EDProducer<> {
0041 public:
0042   explicit GctDigiToRaw(const edm::ParameterSet&);
0043 
0044 private:  // methods
0045   void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const final;
0046 
0047   void print(FEDRawData& data) const;
0048 
0049 private:  // members
0050   // input tokens
0051   edm::EDGetTokenT<L1GctEmCandCollection> tokenL1GctEmCand_isoEm_;
0052   edm::EDGetTokenT<L1GctEmCandCollection> tokenL1GctEmCand_nonIsoEm_;
0053   edm::EDGetTokenT<L1GctJetCandCollection> tokenGctJetCand_cenJets_;
0054   edm::EDGetTokenT<L1GctJetCandCollection> tokenGctJetCand_forJets_;
0055   edm::EDGetTokenT<L1GctJetCandCollection> tokenGctJetCand_tauJets_;
0056   edm::EDGetTokenT<L1GctEtTotalCollection> tokenGctEtTotal_;
0057   edm::EDGetTokenT<L1GctEtHadCollection> tokenGctEtHad_;
0058   edm::EDGetTokenT<L1GctEtMissCollection> tokenGctEtMiss_;
0059   edm::EDGetTokenT<L1GctHFRingEtSumsCollection> tokenGctHFRingEtSums_;
0060   edm::EDGetTokenT<L1GctHFBitCountsCollection> tokenGctHFBitCounts_;
0061   edm::EDGetTokenT<L1GctHtMissCollection> tokenGctHtMiss_;
0062   edm::EDGetTokenT<L1GctJetCountsCollection> tokenGctJetCounts_;
0063   edm::EDGetTokenT<L1CaloEmCollection> tokenCaloEm_;
0064   edm::EDGetTokenT<L1CaloRegionCollection> tokenCaloRegion_;
0065   edm::EDPutTokenT<FEDRawDataCollection> tokenPut_;
0066   // pack flags
0067   const bool packRctEm_;
0068   const bool packRctCalo_;
0069 
0070   // FED numbers
0071   const int fedId_;
0072 
0073   // print out for each event
0074   const bool verbose_;
0075 
0076   // counter events
0077   mutable std::atomic<int> counter_;
0078 };
0079 
0080 #endif