CMS 3D CMS Logo

ScCALORawToDigi.h
Go to the documentation of this file.
8 
13 
15 
20 
21 #include <iostream>
22 #include <memory>
23 #include <string>
24 
26 public:
27  explicit ScCaloRawToDigi(const edm::ParameterSet&);
28  ~ScCaloRawToDigi() override;
29 
30  static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
31 
32 private:
33  void produce(edm::Event&, const edm::EventSetup&) override;
34 
35  enum class CaloObjectType { Jet, EGamma, Tau, EtSum };
36 
37  void unpackOrbitFromDMA(edm::Handle<SDSRawDataCollection>& ScoutingRawDataCollection, int sourceId);
38  void unpackTcpData(edm::Handle<SDSRawDataCollection>& ScoutingRawDataCollection,
39  std::vector<int> sourceList,
41  void unpackOrbitFromTCP(const unsigned char* buf, size_t len, CaloObjectType dataType);
42 
43  void unpackJets(uint32_t* dataBlock, int bx, int nObjets);
44  void unpackEGammas(uint32_t* dataBlock, int bx, int nObjets);
45  void unpackTaus(uint32_t* dataBlock, int bx, int nObjets);
46  void unpackEtSums(uint32_t* dataBlock, int bx);
47 
49  // vectors holding data for every bunch crossing
50  // before filling the orbit collection
51  std::vector<std::vector<l1ScoutingRun3::Jet>> orbitBufferJets_;
52  std::vector<std::vector<l1ScoutingRun3::EGamma>> orbitBufferEGammas_;
53  std::vector<std::vector<l1ScoutingRun3::Tau>> orbitBufferTaus_;
54  std::vector<std::vector<l1ScoutingRun3::BxSums>> orbitBufferEtSums_;
55 
56  bool debug_ = false;
57  bool enableAllSums_ = false; // write the full sert of ET sums
60  std::string dataSourceMode_; // data from TCP / DMA
62  std::vector<int> jetSourceIdList_;
63  std::vector<int> eGammaSourceIdList_;
64  std::vector<int> tauSourceIdList_;
65  std::vector<int> etSumSourceIdList_;
66 };
void produce(edm::Event &, const edm::EventSetup &) override
void unpackOrbitFromTCP(const unsigned char *buf, size_t len, CaloObjectType dataType)
edm::InputTag srcInputTag_
void unpackTcpData(edm::Handle< SDSRawDataCollection > &ScoutingRawDataCollection, std::vector< int > sourceList, CaloObjectType dataType)
~ScCaloRawToDigi() override
void unpackJets(uint32_t *dataBlock, int bx, int nObjets)
std::vector< int > etSumSourceIdList_
std::vector< std::vector< l1ScoutingRun3::Tau > > orbitBufferTaus_
void unpackTaus(uint32_t *dataBlock, int bx, int nObjets)
ScCaloRawToDigi(const edm::ParameterSet &)
std::vector< int > eGammaSourceIdList_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void unpackEtSums(uint32_t *dataBlock, int bx)
std::vector< std::vector< l1ScoutingRun3::BxSums > > orbitBufferEtSums_
std::vector< std::vector< l1ScoutingRun3::EGamma > > orbitBufferEGammas_
edm::ParameterSet dataSourceConfig_
std::vector< int > tauSourceIdList_
std::vector< int > jetSourceIdList_
std::vector< std::vector< l1ScoutingRun3::Jet > > orbitBufferJets_
void unpackEGammas(uint32_t *dataBlock, int bx, int nObjets)
std::string dataSourceMode_
edm::EDGetToken rawToken_
void unpackOrbitFromDMA(edm::Handle< SDSRawDataCollection > &ScoutingRawDataCollection, int sourceId)