|
void | analyze (edm::StreamID, edm::Event const &, edm::EventSetup const &) const override |
|
std::unique_ptr< HLTriggerJSONMonitoringData::stream > | beginStream (edm::StreamID) const override |
|
std::shared_ptr< HLTriggerJSONMonitoringData::lumisection > | globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &) const override |
|
std::shared_ptr< HLTriggerJSONMonitoringData::run > | globalBeginRun (edm::Run const &, edm::EventSetup const &) const override |
|
void | globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, HLTriggerJSONMonitoringData::lumisection *) const override |
|
void | globalEndRun (edm::Run const &, edm::EventSetup const &) const override |
|
| HLTriggerJSONMonitoring (const edm::ParameterSet &) |
|
void | streamBeginLuminosityBlock (edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const override |
|
void | streamEndLuminosityBlockSummary (edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &, HLTriggerJSONMonitoringData::lumisection *) const override |
|
| ~HLTriggerJSONMonitoring () override=default |
|
| EDAnalyzer ()=default |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsStreamLuminosityBlocks () const final |
|
bool | wantsStreamRuns () const final |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
| ~EDAnalyzerBase () override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
typedef EDAnalyzerBase | ModuleType |
|
typedef ProductLabels | Labels |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
Description: This class outputs JSON files with HLT monitoring information.
Definition at line 71 of file HLTriggerJSONMonitoring.cc.
Implements edm::global::EDAnalyzerBase.
Definition at line 228 of file HLTriggerJSONMonitoring.cc.
References edm::HLTGlobalStatus::accept(), edm::HLTGlobalStatus::at(), edm::InputTag::encode(), edm::Event::getByToken(), edm::Event::getRun(), patZpeak::handle, mps_fire::i, edm::Run::index(), createfilelist::int, edm::HandleBase::isValid(), or, castor_dqm_sourceclient_file_cfg::path, bookConverter::results, edm::HLTGlobalStatus::size(), mps_update::status, triggerResults_, and triggerResultsToken_.
229 auto& stream = *streamCache(sid);
230 auto const& rundata = *runCache(
event.getRun().index());
235 if (not rundata.hltConfig.inited())
246 assert(results.
size() == stream.hltWasRun.size());
249 for (
unsigned int i = 0;
i < results.
size(); ++
i) {
252 ++stream.hltWasRun[
i];
256 ++stream.hltAccept[
i];
259 if (index > rundata.posL1s[
i])
261 if (index > rundata.posPre[
i])
264 ++stream.hltErrors[
i];
266 ++stream.hltReject[
i];
273 for (
unsigned int i = 0;
i < rundata.datasets.size(); ++
i)
274 if (std::any_of(rundata.datasets[
i].begin(), rundata.datasets[
i].end(), [&](
unsigned int path) {
277 ++stream.datasets[
i];
bool accept() const
Has at least one path accepted the event?
const edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
unsigned int size() const
Get number of paths stored.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
const HLTPathStatus & at(const unsigned int i) const
const edm::InputTag triggerResults_
Definition at line 154 of file HLTriggerJSONMonitoring.cc.
References makeLayoutFileForGui::datasetNames, contentValuesFiles::datasets, dqm-mbProfile::format, mps_fire::i, edm::Service< T >::isAvailable(), dqmiolumiharvest::j, label, evf::MergeTypeJSNDATA, AlCaHLTBitMon_ParallelJobs::p, Skims_PA_cff::paths, edm::InputTag::process(), edm::RunBase::run(), str, streamName_, AlCaHLTBitMon_QueryRunRegistry::string, L1TEGammaOffline_cfi::triggerNames, triggerResults_, writeIniFile(), and writeJsdFile().
156 auto rundata = std::make_shared<HLTriggerJSONMonitoringData::run>();
161 rundata->streamMergeType =
165 rundata->streamDestination =
"";
166 rundata->streamMergeType =
"";
167 rundata->baseRunDir =
".";
173 edm::LogError(
"HLTriggerJSONMonitoring") <<
"HLTConfigProvider initialization failed!" << std::endl;
174 }
else if (changed) {
176 auto const&
triggerNames = rundata->hltConfig.triggerNames();
177 auto const&
datasetNames = rundata->hltConfig.datasetNames();
178 auto const&
datasets = rundata->hltConfig.datasetContents();
184 rundata->datasets.resize(datasetsSize);
185 for (
unsigned int ds = 0; ds < datasetsSize; ++ds) {
186 auto&
dataset = rundata->datasets[ds];
189 for (
unsigned int p = 0;
p <
paths;
p++) {
190 unsigned int index = rundata->hltConfig.triggerIndex(
datasets[ds][
p]);
191 if (index < triggersSize)
197 rundata->posL1s.resize(triggersSize);
198 rundata->posPre.resize(triggersSize);
199 for (
unsigned int i = 0;
i < triggersSize; ++
i) {
200 rundata->posL1s[
i] = -1;
201 rundata->posPre[
i] = -1;
202 std::vector<std::string>
const& moduleLabels = rundata->hltConfig.moduleLabels(
i);
203 for (
unsigned int j = 0;
j < moduleLabels.size(); ++
j) {
205 if (label ==
"HLTL1TSeed")
206 rundata->posL1s[
i] =
j;
207 else if (label ==
"HLTPrescaler")
208 rundata->posPre[
i] =
j;
214 rundata->jsdFileName = (
boost::format(
"run%06d_ls0000_streamHLTRates_pid%05d.jsd") %
run.run() % getpid()).
str();
static void writeIniFile(HLTriggerJSONMonitoringData::run const &, unsigned int)
static const char * streamName_
static void writeJsdFile(HLTriggerJSONMonitoringData::run const &)
const edm::InputTag triggerResults_
Definition at line 376 of file HLTriggerJSONMonitoring.cc.
References cms::Adler32(), Json::Value::append(), jsoncollector::DataPoint::DATA, HLTriggerJSONMonitoringData::lumisection::datasets, jsoncollector::DataPoint::DEFINITION, dqm-mbProfile::format, edm::LuminosityBlock::getRun(), HLTriggerJSONMonitoringData::lumisection::hltAccept, HLTriggerJSONMonitoringData::lumisection::hltErrors, HLTriggerJSONMonitoringData::lumisection::hltL1s, HLTriggerJSONMonitoringData::lumisection::hltPre, HLTriggerJSONMonitoringData::lumisection::hltReject, HLTriggerJSONMonitoringData::lumisection::hltWasRun, edm::Run::index(), eostools::ls(), edm::LuminosityBlockBase::luminosityBlock(), HLTriggerJSONMonitoringData::lumisection::processed, mps_fire::result, writedatasetfile::run, edm::LuminosityBlockBase::run(), evf::FastMonitoringService::shouldWriteFiles(), jsoncollector::DataPoint::SOURCE, AlCaHLTBitMon_QueryRunRegistry::string, jsoncollector::HistoJ< T >::toJsonValue(), jsoncollector::HistoJ< T >::value(), and cscNeutronWriter_cfi::writer.
379 unsigned int ls =
lumi.luminosityBlock();
382 bool writeFiles =
true;
393 auto const& rundata = *runCache(
lumi.getRun().index());
398 gethostname(hostname, 32);
402 std::stringstream sOutDef;
403 sOutDef << rundata.baseRunDir <<
"/" 404 <<
"output_" << getpid() <<
".jsd";
407 unsigned int jsndataSize = 0;
408 unsigned int jsndataAdler32 = 1;
424 auto jsndataFileName =
boost::format(
"run%06d_ls%04d_streamHLTRates_pid%05d.jsndata") % run % ls % getpid();
427 std::ofstream jsndataFile(rundata.baseRunDir +
"/" + jsndataFileName.str());
431 jsndataFileList = jsndataFileName.str();
432 jsndataSize = result.size();
433 jsndataAdler32 =
cms::Adler32(result.c_str(), result.size());
437 unsigned int jsnProcessed = processed;
438 unsigned int jsnAccepted = processed;
439 unsigned int jsnErrorEvents = 0;
440 unsigned int jsnRetCodeMask = 0;
442 unsigned int jsnHLTErrorEvents = 0;
459 auto jsnFileName =
boost::format(
"run%06d_ls%04d_streamHLTRates_pid%05d.jsn") % run % ls % getpid();
460 std::ofstream jsnFile(rundata.baseRunDir +
"/" + jsnFileName.str());
461 jsnFile << writer.write(jsn);
static const std::string SOURCE
bool shouldWriteFiles(unsigned int lumi, unsigned int *proc=0)
Value & append(const Value &value)
Append value to array at the end.
jsoncollector::HistoJ< unsigned int > hltReject
virtual Json::Value toJsonValue() const
jsoncollector::HistoJ< unsigned int > hltErrors
std::vector< T > & value()
static const std::string DATA
jsoncollector::HistoJ< unsigned int > hltPre
void Adler32(char const *data, size_t len, uint32_t &a, uint32_t &b)
jsoncollector::HistoJ< unsigned int > hltWasRun
jsoncollector::HistoJ< unsigned int > hltL1s
jsoncollector::HistoJ< unsigned int > processed
Writes a Value in JSON format in a human friendly way.
static const std::string DEFINITION
jsoncollector::HistoJ< unsigned int > datasets
jsoncollector::HistoJ< unsigned int > hltAccept