CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
GTTFileReader Class Reference

#include <L1Trigger/DemonstratorTools/plugins/GTTFileReader.cc>

Inheritance diagram for GTTFileReader:
edm::stream::EDProducer<>

Public Member Functions

 GTTFileReader (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

l1t::demo::BoardDataReader fileReader_
 
const l1t::demo::BoardDataReader::ChannelMap_t kChannelSpecs
 

Static Private Attributes

static constexpr size_t kEmptyFrames = 10
 
static constexpr size_t kFramesPerTMUXPeriod = 9
 
static constexpr size_t kGapLength = 44
 
static constexpr size_t kVertexChanIndex = 0
 
static constexpr size_t kVertexTMUX = 6
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

Description: Example EDProducer class, illustrating how BoardDataReader can be used to read I/O buffer files (that have been created in hardware/firmware tests), decode the contained data, and store this in EDM collections.

Implementation: [Notes on implementation]

Definition at line 43 of file GTTFileReader.cc.

Constructor & Destructor Documentation

◆ GTTFileReader()

GTTFileReader::GTTFileReader ( const edm::ParameterSet iConfig)
explicit

Definition at line 73 of file GTTFileReader.cc.

75  iConfig.getParameter<std::vector<std::string>>("files"),
79  kChannelSpecs) {
80  produces<l1t::VertexWordCollection>();
81 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const l1t::demo::BoardDataReader::ChannelMap_t kChannelSpecs
FileFormat parseFileFormat(const std::string &)
Definition: utilities.cc:70
T getUntrackedParameter(std::string const &, T const &) const
l1t::demo::BoardDataReader fileReader_
static constexpr size_t kVertexTMUX
static constexpr size_t kFramesPerTMUXPeriod
static constexpr size_t kEmptyFrames

Member Function Documentation

◆ fillDescriptions()

void GTTFileReader::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 98 of file GTTFileReader.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

98  {
99  // GTTFileReader
101  desc.add<std::vector<std::string>>("files",
102  {
103  "gttOutput_0.txt",
104  });
105  desc.addUntracked<std::string>("format", "APx");
106  descriptions.add("GTTFileReader", desc);
107 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ produce()

void GTTFileReader::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 84 of file GTTFileReader.cc.

References l1t::demo::codecs::decodeVertices(), fileReader_, l1t::demo::BoardDataReader::getNextEvent(), iEvent, and AlignmentTracksFromVertexSelector_cfi::vertices.

84  {
85  using namespace edm;
86  using namespace l1t::demo::codecs;
87 
89 
90  l1t::VertexWordCollection vertices(decodeVertices(eventData.at({"vertices", 0})));
91 
92  edm::LogInfo("GTTFileReader") << vertices.size() << " vertices found";
93 
94  iEvent.put(std::make_unique<l1t::VertexWordCollection>(vertices));
95 }
l1t::demo::BoardDataReader fileReader_
int iEvent
Definition: GenABIO.cc:224
std::vector< l1t::VertexWord > decodeVertices(const std::vector< ap_uint< 64 >> &)
std::vector< VertexWord > VertexWordCollection
Definition: VertexWord.h:195
Log< level::Info, false > LogInfo
HLT enums.
Class representing information phase-2 ATCA I/O data corresponding to a single event, with logical channel IDs (essentially string-uint pairs, e.g. tracks-0 to tracks-17).
Definition: EventData.h:28

Member Data Documentation

◆ fileReader_

l1t::demo::BoardDataReader GTTFileReader::fileReader_
private

Definition at line 66 of file GTTFileReader.cc.

Referenced by produce().

◆ kChannelSpecs

const l1t::demo::BoardDataReader::ChannelMap_t GTTFileReader::kChannelSpecs
private
Initial value:
= {
{{"vertices", 0}, {{kVertexTMUX, kGapLength}, {kVertexChanIndex}}}}

Definition at line 58 of file GTTFileReader.cc.

◆ kEmptyFrames

constexpr size_t GTTFileReader::kEmptyFrames = 10
staticprivate

Definition at line 56 of file GTTFileReader.cc.

◆ kFramesPerTMUXPeriod

constexpr size_t GTTFileReader::kFramesPerTMUXPeriod = 9
staticprivate

Definition at line 52 of file GTTFileReader.cc.

◆ kGapLength

constexpr size_t GTTFileReader::kGapLength = 44
staticprivate

Definition at line 53 of file GTTFileReader.cc.

◆ kVertexChanIndex

constexpr size_t GTTFileReader::kVertexChanIndex = 0
staticprivate

Definition at line 55 of file GTTFileReader.cc.

◆ kVertexTMUX

constexpr size_t GTTFileReader::kVertexTMUX = 6
staticprivate

Definition at line 54 of file GTTFileReader.cc.