36 offsetPhase_(iConfig.getParameter<unsigned int>(
"offset")),
37 prescaleService_(nullptr),
39 gtDigiTag_(iConfig.getParameter<edm::
InputTag>(
"L1GtReadoutRecordTag")),
45 LogDebug(
"NoPrescaleService") <<
"PrescaleService unavailable, prescaleFactor=1!";
57 desc.
add<
unsigned int>(
"offset", 0);
59 descriptions.
add(
"hltPrescaler", desc);
84 if (handle2->begin(0) != handle2->end(0)) {
85 prescaleSet_ =
static_cast<unsigned int>(handle2->begin(0)->getPreScColumn());
89 <<
"Cannot read prescale column index from GT2 data: using default as defined by configuration or DAQ";
96 prescaleSet_ = handle1->gtFdlWord().gtPrescaleFactorIndexAlgo();
102 <<
"Cannot read prescale column index from GT1 data: using default as defined by configuration or DAQ";
110 <<
", path = " << pathName <<
": " <<
prescaleFactor_ <<
" [" << oldPrescale
144 edm::LogInfo(
"PrescaleSummary") << accept <<
"/" <<
event <<
" ("
145 << 100. * accept /
static_cast<double>(
std::max(1u, event))
146 <<
"% of events accepted).";
LuminosityBlockID id() const
std::string const & pathName() const
EventNumber_t event() const
std::atomic< unsigned int > acceptCount_
example_stream int eventCount_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::service::PrescaleService * prescaleService_
prescale service
bool filter(edm::Event &iEvent, edm::EventSetup const &iSetup) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void beginLuminosityBlock(edm::LuminosityBlock const &lb, edm::EventSetup const &iSetup) override
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
static const unsigned int prescaleSeed_
"seed" used to initialize the prescale counter
HLTPrescaler(edm::ParameterSet const &iConfig, const trigger::Efficiency *efficiency)
unsigned int acceptCount_
accept counter
ModuleCallingContext const * moduleCallingContext() const
PathContext const * pathContext() const
unsigned int eventCount_
event counter
bool newLumi_
check for (re)initialization of the prescale
unsigned int prescaleSet_
l1 prescale set index
LuminosityBlock const & getLuminosityBlock() const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< GlobalAlgBlkBxCollection > gtDigi2Token_
Log< level::Info, false > LogInfo
unsigned long long uint64_t
unsigned int getPrescale(std::string const &prescaledPath) const
LuminosityBlockNumber_t luminosityBlock() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
unsigned int offsetPhase_
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtDigi1Token_
static void globalEndJob(const trigger::Efficiency *efficiency)
Log< level::Warning, false > LogWarning
PlaceInPathContext const * placeInPathContext() const
unsigned int offsetCount_
initial offset
unsigned int prescaleFactor_
accept one in prescaleFactor_; 0 means never to accept an event
void endStream() override
std::atomic< unsigned int > eventCount_