File indexing completed on 2024-04-06 12:10:39
0001 #ifndef ESDIGITORAW_H
0002 #define ESDIGITORAW_H
0003
0004 #include <memory>
0005 #include <iostream>
0006 #include <string>
0007 #include <fstream>
0008
0009 #include "DataFormats/Common/interface/Handle.h"
0010 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0011 #include "FWCore/Framework/interface/Event.h"
0012 #include "FWCore/Framework/interface/global/EDProducer.h"
0013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0015 #include "FWCore/Framework/interface/EventSetup.h"
0016 #include "FWCore/ParameterSet/interface/FileInPath.h"
0017
0018 #include "EventFilter/ESDigiToRaw/interface/ESDataFormatter.h"
0019
0020 class ESDigiToRaw : public edm::global::EDProducer<> {
0021 public:
0022 ESDigiToRaw(const edm::ParameterSet& ps);
0023 ~ESDigiToRaw() override;
0024
0025 void produce(edm::StreamID, edm::Event& e, const edm::EventSetup& es) const override;
0026
0027 typedef uint32_t Word32;
0028 typedef uint64_t Word64;
0029
0030 static const int BXMAX = 2808;
0031 static const int LHC_BX_RANGE = 3564;
0032 static const int KCHIP_BC_RANGE = 4096;
0033 static const int KCHIP_EC_RANGE = 256;
0034
0035 private:
0036 int fedId_[2][2][40][40];
0037
0038 const ESDataFormatter* ESDataFormatter_;
0039 const std::string label_;
0040 const std::string instanceName_;
0041 const edm::EDGetTokenT<ESDigiCollection> ESDigiToken_;
0042 const edm::FileInPath lookup_;
0043 const bool debug_;
0044 const int formatMajor_;
0045 const int formatMinor_;
0046 };
0047
0048 #endif