GctDigiToRaw

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
#ifndef GctDigiToRaw_h
#define GctDigiToRaw_h

// -*- C++ -*-
//
// Package:    GctDigiToRaw
// Class:      GctDigiToRaw
//
/**\class GctDigiToRaw GctDigiToRaw.cc EventFilter/GctRawToDigi/src/GctDigiToRaw.cc

 Description: Produce fake GCT raw data from digis

 Implementation:
     <Notes on implementation>
*/
//
// Original Author:  Jim Brooke
//         Created:  Wed Nov  1 11:57:10 CET 2006
//
//

// system include files
#include <memory>

// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/EDGetToken.h"

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

#include "EventFilter/GctRawToDigi/src/GctFormatTranslateMCLegacy.h"

//
// class decleration
//

class GctDigiToRaw : public edm::global::EDProducer<> {
public:
  explicit GctDigiToRaw(const edm::ParameterSet&);

private:  // methods
  void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const final;

  void print(FEDRawData& data) const;

private:  // members
  // input tokens
  edm::EDGetTokenT<L1GctEmCandCollection> tokenL1GctEmCand_isoEm_;
  edm::EDGetTokenT<L1GctEmCandCollection> tokenL1GctEmCand_nonIsoEm_;
  edm::EDGetTokenT<L1GctJetCandCollection> tokenGctJetCand_cenJets_;
  edm::EDGetTokenT<L1GctJetCandCollection> tokenGctJetCand_forJets_;
  edm::EDGetTokenT<L1GctJetCandCollection> tokenGctJetCand_tauJets_;
  edm::EDGetTokenT<L1GctEtTotalCollection> tokenGctEtTotal_;
  edm::EDGetTokenT<L1GctEtHadCollection> tokenGctEtHad_;
  edm::EDGetTokenT<L1GctEtMissCollection> tokenGctEtMiss_;
  edm::EDGetTokenT<L1GctHFRingEtSumsCollection> tokenGctHFRingEtSums_;
  edm::EDGetTokenT<L1GctHFBitCountsCollection> tokenGctHFBitCounts_;
  edm::EDGetTokenT<L1GctHtMissCollection> tokenGctHtMiss_;
  edm::EDGetTokenT<L1GctJetCountsCollection> tokenGctJetCounts_;
  edm::EDGetTokenT<L1CaloEmCollection> tokenCaloEm_;
  edm::EDGetTokenT<L1CaloRegionCollection> tokenCaloRegion_;
  edm::EDPutTokenT<FEDRawDataCollection> tokenPut_;
  // pack flags
  const bool packRctEm_;
  const bool packRctCalo_;

  // FED numbers
  const int fedId_;

  // print out for each event
  const bool verbose_;

  // counter events
  mutable std::atomic<int> counter_;
};

#endif