CMS 3D CMS Logo

Classes | Functions | Variables
L1GTEvaluationProducer.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/EDProducer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/L1Trigger/interface/P2GTCandidate.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "L1Trigger/DemonstratorTools/interface/BoardDataWriter.h"
#include "L1Trigger/DemonstratorTools/interface/utilities.h"
#include "L1GTEvaluationInterface.h"
#include <vector>
#include <array>
#include <string>
#include <unordered_map>
#include <fstream>
#include <limits>
#include <optional>
#include <random>

Go to the source code of this file.

Classes

class  L1GTEvaluationProducer
 

Functions

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< L1GTEvaluationProducer > > s_filler_0__LINE__ ("L1GTEvaluationProducer")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< L1GTEvaluationProducer > > s_maker__LINE__ ("L1GTEvaluationProducer")
 
template<typename T1 , typename T2 >
static std::vector< T1 > vconvert (std::vector< T2 > ivec)
 
template<typename... Args>
static std::vector< ap_uint< 64 > > vpack (const Args &...vobjects)
 

Variables

static constexpr std::array< const char *, 29 > AVAILABLE_COLLECTIONS
 

Function Documentation

◆ s_filler_0__LINE__()

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

◆ s_maker__LINE__()

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

◆ vconvert()

template<typename T1 , typename T2 >
static std::vector<T1> vconvert ( std::vector< T2 >  ivec)
static

Definition at line 108 of file L1GTEvaluationProducer.cc.

108  {
109  return std::vector<T1>(ivec.begin(), ivec.end());
110 }

◆ vpack()

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

Definition at line 232 of file L1GTEvaluationProducer.cc.

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

Referenced by L1GTEvaluationProducer::writeInputPatterns(), and L1GTEvaluationProducer::writeOutputPatterns().

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

Variable Documentation

◆ AVAILABLE_COLLECTIONS

constexpr std::array<const char *, 29> AVAILABLE_COLLECTIONS
static
Initial value:
{{"GTTPromptJets",
"GTTDisplacedJets",
"GTTPromptHtSum",
"GTTDisplacedHtSum",
"GTTEtSum",
"GTTHadronicTaus",
"CL2JetsSC4",
"CL2JetsSC8",
"CL2Taus",
"CL2HtSum",
"CL2EtSum",
"GCTNonIsoEg",
"GCTIsoEg",
"GCTJets",
"GCTTaus",
"GCTHtSum",
"GCTEtSum",
"GMTSaPromptMuons",
"GMTSaDisplacedMuons",
"GMTTkMuons",
"GMTTopo",
"CL2Electrons",
"CL2Photons",
"GTTPhiCandidates",
"GTTRhoCandidates",
"GTTBsCandidates",
"GTTPromptTracks",
"GTTDisplacedTracks",
"GTTPrimaryVert"}}

Definition at line 77 of file L1GTEvaluationProducer.cc.

Referenced by L1GTEvaluationProducer::fillDescriptions(), and L1GTEvaluationProducer::writeOutputPatterns().