CMS 3D CMS Logo

Classes | Functions | Variables
L1GTOutputObjectWriter.cc File Reference
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"
#include "FWCore/ParameterSet/interface/allowedValues.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "DataFormats/Common/interface/View.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "L1Trigger/DemonstratorTools/interface/BoardDataWriter.h"
#include "L1Trigger/DemonstratorTools/interface/utilities.h"
#include "DataFormats/L1Trigger/interface/P2GTCandidate.h"
#include "L1GTEvaluationInterface.h"
#include <vector>
#include <array>
#include <tuple>
#include <string>
#include <fstream>
#include <limits>
#include <optional>

Go to the source code of this file.

Classes

class  L1GTOutputObjectWriter
 

Functions

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< L1GTOutputObjectWriter > > s_filler_0__LINE__ ("L1GTOutputObjectWriter")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< L1GTOutputObjectWriter > > s_maker__LINE__ ("L1GTOutputObjectWriter")
 
template<typename... Args>
static std::vector< ap_uint< 64 > > vpack (const Args &... vobjects)
 

Variables

static constexpr std::array< std::tuple< const char *, std::size_t, std::size_t >, 27 > OUTPUT_CHANNELS_VU13P
 
static constexpr std::array< std::tuple< const char *, std::size_t, std::size_t >, 27 > OUTPUT_CHANNELS_VU9P
 

Function Documentation

◆ s_filler_0__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< L1GTOutputObjectWriter > > s_filler_0__LINE__ ( "L1GTOutputObjectWriter"  )
static

◆ s_maker__LINE__()

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< L1GTOutputObjectWriter > > s_maker__LINE__ ( "L1GTOutputObjectWriter"  )
static

◆ vpack()

template<typename... Args>
static std::vector<ap_uint<64> > vpack ( const Args &...  vobjects)
static

Definition at line 234 of file L1GTOutputObjectWriter.cc.

References resolutioncreator_cfi::object, L1TPhase2Offline_cfi::objects, and l1t::L1TGT_Interface< N >::pack().

Referenced by L1GTOutputObjectWriter::analyze().

234  {
235  std::vector<ap_uint<64>> vpacked;
236 
237  (
238  [&vpacked](const std::vector<std::unique_ptr<l1t::L1TGT_BaseInterface>>& objects) {
239  std::optional<ap_uint<64>> next_packed;
240  for (const auto& object : objects) {
241  if (object->packed_width() == 64) {
242  const l1t::L1TGT_Interface<64>& interface_obj = dynamic_cast<const l1t::L1TGT_Interface<64>&>(*object);
243  vpacked.emplace_back(interface_obj.pack());
244  } else if (object->packed_width() == 96) {
245  const l1t::L1TGT_Interface<96>& interface_obj = dynamic_cast<const l1t::L1TGT_Interface<96>&>(*object);
246  ap_uint<96> packed = interface_obj.pack();
247  if (next_packed.has_value()) {
248  vpacked.emplace_back(packed(95, 64) << 32 | next_packed.value());
249  next_packed.reset();
250  } else {
251  next_packed = packed(95, 64);
252  }
253 
254  vpacked.emplace_back(packed(63, 0));
255 
256  } else if (object->packed_width() == 128) {
257  const l1t::L1TGT_Interface<128>& interface_obj = dynamic_cast<const l1t::L1TGT_Interface<128>&>(*object);
258  ap_uint<128> packed = interface_obj.pack();
259  vpacked.emplace_back(packed(63, 0));
260  vpacked.emplace_back(packed(127, 64));
261  }
262  }
263  }(vobjects),
264  ...);
265 
266  return vpacked;
267 }
virtual ap_uint< N > pack() const =0

Variable Documentation

◆ OUTPUT_CHANNELS_VU13P

constexpr std::array<std::tuple<const char*, std::size_t, std::size_t>, 27> OUTPUT_CHANNELS_VU13P
static
Initial value:
{
{{"GTTPromptJets", 2, 6},
{"GTTDisplacedJets", 6, 10},
{"GTTPromptHtSum", 10, 11},
{"GTTDisplacedHtSum", 11, 12},
{"GTTEtSum", 12, 13},
{"GTTHadronicTaus", 13, 16},
{"GCTNonIsoEg", 26, 28},
{"GCTIsoEg", 28, 30},
{"GCTJets", 30, 32},
{"CL2JetsSC4", 32, 36},
{"CL2JetsSC8", 36, 40},
{"CL2Taus", 40, 43},
{"CL2HtSum", 43, 44},
{"CL2EtSum", 44, 45},
{"GMTSaPromptMuons", 68, 70},
{"GMTSaDisplacedMuons", 70, 72},
{"GMTTkMuons", 72, 75},
{"GMTTopo", 75, 77},
{"CL2Electrons", 80, 83},
{"CL2Photons", 83, 86},
{"GCTTaus", 96, 98},
{"GCTHtSum", 98, 99},
{"GCTEtSum", 99, 100},
{"GTTPhiCandidates", 112, 115},
{"GTTRhoCandidates", 115, 118},
{"GTTBsCandidates", 118, 121},
{"GTTPrimaryVert", 121, 123}}}

Definition at line 60 of file L1GTOutputObjectWriter.cc.

◆ OUTPUT_CHANNELS_VU9P

constexpr std::array<std::tuple<const char*, std::size_t, std::size_t>, 27> OUTPUT_CHANNELS_VU9P
static
Initial value:
{
{{"GTTPromptJets", 2, 6},
{"GTTDisplacedJets", 6, 10},
{"GTTPromptHtSum", 10, 11},
{"GTTDisplacedHtSum", 11, 12},
{"GTTEtSum", 12, 13},
{"GTTHadronicTaus", 13, 16},
{"CL2JetsSC4", 24, 28},
{"CL2JetsSC8", 28, 32},
{"CL2Taus", 34, 37},
{"CL2HtSum", 37, 38},
{"CL2EtSum", 38, 39},
{"GCTNonIsoEg", 48, 50},
{"GCTIsoEg", 50, 52},
{"GCTJets", 52, 54},
{"GCTTaus", 54, 56},
{"GCTHtSum", 56, 57},
{"GCTEtSum", 57, 58},
{"GMTSaPromptMuons", 60, 62},
{"GMTSaDisplacedMuons", 62, 64},
{"GMTTkMuons", 64, 67},
{"GMTTopo", 67, 69},
{"CL2Electrons", 80, 83},
{"CL2Photons", 83, 86},
{"GTTPhiCandidates", 104, 107},
{"GTTRhoCandidates", 107, 110},
{"GTTBsCandidates", 110, 113},
{"GTTPrimaryVert", 113, 115}}}

Definition at line 31 of file L1GTOutputObjectWriter.cc.