Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:26:21

0001 
0002 #ifndef EventFilter_SiStripRawToDigi_SiStripDigiToRawModule_H
0003 #define EventFilter_SiStripRawToDigi_SiStripDigiToRawModule_H
0004 
0005 #include "EventFilter/SiStripRawToDigi/interface/SiStripFEDBufferComponents.h"
0006 #include "FWCore/Framework/interface/stream/EDProducer.h"
0007 #include "DataFormats/Common/interface/DetSetVector.h"
0008 #include "DataFormats/SiStripDigi/interface/SiStripDigi.h"
0009 #include "DataFormats/SiStripDigi/interface/SiStripRawDigi.h"
0010 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0011 #include "CondFormats/DataRecord/interface/SiStripFedCablingRcd.h"
0012 #include "CondFormats/SiStripObjects/interface/SiStripFedCabling.h"
0013 #include "FWCore/Utilities/interface/Visibility.h"
0014 #include "FWCore/Utilities/interface/ESGetToken.h"
0015 #include <string>
0016 #include <cstdint>
0017 namespace edm {
0018   class ConfigurationDescriptions;
0019 }
0020 
0021 namespace sistrip {
0022 
0023   class DigiToRaw;
0024 
0025   /**
0026      @file EventFilter/SiStripRawToDigi/interface/SiStripDigiToRawModule.h
0027      @class DigiToRawModule 
0028    
0029      @brief A plug-in module that takes StripDigis as input from the
0030      Event and creates an EDProduct comprising a FEDRawDataCollection.
0031   */
0032   class dso_hidden DigiToRawModule final : public edm::stream::EDProducer<> {
0033   public:
0034     DigiToRawModule(const edm::ParameterSet&);
0035     ~DigiToRawModule() override;
0036 
0037     virtual void beginJob() {}
0038     virtual void endJob() {}
0039 
0040     void produce(edm::Event&, const edm::EventSetup&) override;
0041     static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0042     void endStream() override;
0043 
0044   private:
0045     //CAMM can we do without this bool based on the mode ?
0046     bool copyBufferHeader_;
0047     FEDReadoutMode mode_;
0048     uint8_t packetCode_;
0049     bool rawdigi_;
0050     DigiToRaw* digiToRaw_;
0051     uint32_t eventCounter_;
0052     edm::InputTag inputDigiTag_;
0053     edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > tokenRawDigi;
0054     edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > tokenDigi;
0055     edm::InputTag rawDataTag_;
0056     edm::EDGetTokenT<FEDRawDataCollection> tokenRawBuffer;
0057     edm::ESGetToken<SiStripFedCabling, SiStripFedCablingRcd> tokenCabling;
0058   };
0059 
0060 }  // namespace sistrip
0061 
0062 #endif  // EventFilter_SiStripRawToDigi_SiStripDigiToRawModule_H