59 <<
"Length of PatternFileColumns does not match length of PatternFileLenghts, " <<
m_columnNames.size()
65 <<
"\nL1 GT record: " <<
m_gtTag << std::endl;
89 template <
class TRecord,
typename TResult>
94 TResult (TRecord::*rawFunctionPtr)()
const,
96 uint32_t (*packingFunction)(uint32_t) =
nullptr) {
102 throw cms::Exception(__func__) <<
"Failed to extract record of type " <<
typeid(TRecord).
name() <<
" labeled " 109 for (
typename std::vector<TRecord>::const_iterator
it =
handle->begin();
it !=
handle->end(); ++
it) {
112 uint32_t
value = ((*it).*rawFunctionPtr)();
113 if (packingFunction !=
nullptr) {
123 static std::vector<uint32_t>
chopWords(
const std::vector<bool>& aWord) {
124 std::vector<uint32_t>
result;
126 result.resize((aWord.size() + 31) / 32, 0);
128 for (
unsigned i = 0;
i < aWord.size(); ++
i) {
143 for (
unsigned i = resultWords.size();
i > 0; --
i) {
152 uint32_t invertMask = 0x0000FF00;
153 uint32_t toKeep =
rawData & (~invertMask);
154 return toKeep | (~
rawData & invertMask);
172 const std::vector<L1GtFdlWord>& fdlWords =
handle->gtFdlVector();
173 for (std::vector<L1GtFdlWord>::const_iterator
it = fdlWords.begin();
it != fdlWords.end(); ++
it) {
175 int bx =
it->bxInEvent();
184 line.push(
"gtFinalOr",
it->finalOR());
193 for (L1GtPatternMap::LineMap::iterator
it = allPatterns.
begin();
it != allPatterns.
end(); ++
it) {
195 uint32_t
counts =
it->second.get(
"hfBitCounts1");
196 uint32_t sums =
it->second.get(
"hfRingEtSums1");
199 uint32_t hfPsbValue = (
counts & 0xFFF) |
207 it->second.push(resultName, hfPsbValue);
219 const unsigned int lsNumber =
iEvent.luminosityBlock();
220 const unsigned int eventNumber =
iEvent.id().event();
222 LogTrace(
"L1GtPatternGenerator") <<
"\n\nL1GtPatternGenerator::analyze: Run: " <<
runNumber <<
" LS: " << lsNumber
223 <<
" Event: " << eventNumber <<
"\n\n" 283 m_writer->writePatterns(allPatterns);
296 m_writer = std::make_unique<L1GtPatternWriter>(
void analyze(const edm::Event &, const edm::EventSetup &) override
analyze each event
unsigned phi() const
get the Et
uint16_t raw() const
get the data
L1GtPatternLine & getLine(int eventNr, int bxNr)
T getParameter(std::string const &) const
edm::InputTag m_dtTag
input tags for regional muon data
unsigned et() const
get the magnitude
LineMap::const_iterator begin() const
static PFTauRenderPlugin instance
std::vector< uint32_t > m_columnDefaults
unsigned long long EventNumber_t
unsigned getDataWord() const
return data word
Log< level::Error, false > LogError
uint16_t raw() const
the raw data
std::vector< uint32_t > m_columnLengths
edm::InputTag m_gmtTag
input tag for GMT data
static std::string const input
void beginJob() override
analyze
void extractGlobalTriggerData(const edm::Event &iEvent, L1GtPatternMap &patterns)
LineMap::const_iterator end() const
std::unique_ptr< L1GtPatternWriter > m_writer
uint16_t raw() const
get the raw data
std::string m_header
formatting instructions
std::string m_fileName
output file name
uint32_t raw() const
get the data
std::ofstream m_fileStream
edm::InputTag m_gctTag
input tag for GCT data
static void extractGlobalTriggerWord(const std::vector< bool > input, L1GtPatternLine &line, const std::string &prefix)
void packHfRecords(const std::string &resultName, L1GtPatternMap &allPatterns)
edm::InputTag m_gtTag
input tag for GT data
uint16_t raw() const
get the data
~L1GtPatternGenerator() override
uint16_t raw() const
get the raw data
L1GtPatternGenerator(const edm::ParameterSet &)
void endJob() override
end of job
uint16_t raw() const
get the raw data
unsigned getDataWord() const
get muon data word
Log< level::Warning, false > LogWarning
static uint32_t packRegionalMuons(uint32_t rawValue)
static std::vector< uint32_t > chopWords(const std::vector< bool > &aWord)
std::vector< std::string > m_columnNames
static void extractRecordData(const edm::Event &iEvent, L1GtPatternMap &allPatterns, const std::string &label, const std::string &instance, TResult(TRecord::*rawFunctionPtr)() const, const std::string &prefix, uint32_t(*packingFunction)(uint32_t)=nullptr)