68 std::vector<unsigned int>
mask_;
87 produces<edm::TriggerResults>();
108 for (
auto const& keyval :
mapping) {
109 names_.push_back(keyval.first);
110 indices_.push_back(keyval.second.algoBitNumber());
118 for (
auto const& keyval :
mapping) {
119 names_.push_back(keyval.first);
120 indices_.push_back(keyval.second.getIndex());
123 names_.push_back(
"L1_UnprefireableEvent");
131 const std::vector<bool>* wordp =
nullptr;
132 bool unprefireable_bit =
false;
136 wordp = &handleResults->
at(0, 0).getAlgoDecisionFinal();
140 if (handleExtResults->
size() != 0) {
141 unprefireable_bit = handleExtResults->
at(0, 0).getExternalDecision(
151 auto const& word = *wordp;
153 unsigned indices_size =
indices_.size();
154 for (
size_t nidx = 0; nidx < indices_size; nidx++) {
158 result &= (
mask_[index] != 0);
164 auto out = std::make_unique<edm::TriggerResults>(l1bitsAsHLTStatus,
names_);
171 desc.
add<
bool>(
"legacyL1")->setComment(
"is legacy L1");
173 "L1 input (L1GlobalTriggerReadoutRecord if legacy, GlobalAlgBlkBxCollection otherwise)");
174 desc.
add<
bool>(
"storeUnprefireableBit",
false)
175 ->setComment(
"Activate storage of L1 unprefireable bit (needs L1 external decision input)");
177 ->setComment(
"L1 external decision input (GlobalExtBlkBxCollection, only supported if not legacy");
178 descriptions.
add(
"L1TriggerResultsConverter", desc);
std::vector< unsigned int > indices_
std::vector< std::string > names_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
unsigned size(int bx) const
static const unsigned int maxExternalConditions
bool getByToken(EDGetToken token, Handle< PROD > &result) const
def setup(process, global_tag, zero_tesla=False)
~L1TriggerResultsConverter() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void beginRun(edm::Run const &, edm::EventSetup const &) override
void produce(edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > token_
const bool store_unprefireable_bit_
L1TriggerResultsConverter(const edm::ParameterSet &)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const edm::EDGetTokenT< GlobalExtBlkBxCollection > token_ext_
const DecisionWord & decisionWord(int bxInEventValue) const
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > tokenLegacy_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< unsigned int > mask_
const unsigned int m_triggerRulePrefireVetoBit
const T & at(int bx, unsigned i) const