|
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 |
|
| EDAnalyzerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
virtual | ~EDAnalyzerBase () |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
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 |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
Description: This class outputs JSON files with HLT monitoring information.
Definition at line 75 of file HLTriggerJSONMonitoring.cc.
Implements edm::global::EDAnalyzerBase.
Definition at line 240 of file HLTriggerJSONMonitoring.cc.
References edm::HLTGlobalStatus::accept(), edm::HLTGlobalStatus::at(), edm::InputTag::encode(), edm::Event::getByToken(), edm::Event::getRun(), cmsBatch::handle, mps_fire::i, edm::Run::index(), diffTreeTool::index, createfilelist::int, edm::HandleBase::isValid(), or, callgraph::path, mps_update::results, lumiPlot::rundata, edm::HLTGlobalStatus::size(), mps_update::status, triggerResults_, and triggerResultsToken_.
242 auto & stream = * streamCache(sid);
243 auto const&
rundata = * runCache(
event.getRun().index());
248 if (not
rundata.hltConfig.inited())
258 assert(results.
size() == stream.hltWasRun.size());
261 for (
unsigned int i = 0;
i < results.
size(); ++
i) {
264 ++stream.hltWasRun[
i];
268 ++stream.hltAccept[
i];
271 if (index >
rundata.posL1s[
i]) ++stream.hltL1s[
i];
272 if (index >
rundata.posPre[
i]) ++stream.hltPre[
i];
274 ++stream.hltErrors[
i];
276 ++stream.hltReject[
i];
283 for (
unsigned int i = 0;
i <
rundata.datasets.size(); ++
i)
285 ++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 380 of file HLTriggerJSONMonitoring.cc.
References cms::Adler32(), Json::Value::append(), jsoncollector::DataPoint::DATA, HLTriggerJSONMonitoringData::lumisection::datasets, jsoncollector::DataPoint::DEFINITION, cmsPerfStripChart::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, edm::LuminosityBlockBase::run(), findQualityFiles::run, lumiPlot::rundata, evf::FastMonitoringService::shouldWriteFiles(), jsoncollector::DataPoint::SOURCE, AlCaHLTBitMon_QueryRunRegistry::string, jsoncollector::HistoJ< T >::toJsonValue(), jsoncollector::HistoJ< T >::value(), and cscNeutronWriter_cfi::writer.
382 unsigned int ls =
lumi.luminosityBlock();
385 bool writeFiles =
true;
395 auto const&
rundata = * runCache(
lumi.getRun().index());
400 gethostname(hostname, 32);
404 std::stringstream sOutDef;
405 sOutDef <<
rundata.baseRunDir <<
"/" <<
"output_" << getpid() <<
".jsd";
408 unsigned int jsndataSize = 0;
409 unsigned int jsndataAdler32 = 1;
425 auto jsndataFileName =
boost::format(
"run%06d_ls%04d_streamHLTRates_pid%05d.jsndata") % run % ls % getpid();
428 std::ofstream jsndataFile(
rundata.baseRunDir +
"/" + jsndataFileName.str());
432 jsndataFileList = jsndataFileName.str();
433 jsndataSize = result.size();
434 jsndataAdler32 =
cms::Adler32(result.c_str(), result.size());
438 unsigned int jsnProcessed = processed;
439 unsigned int jsnAccepted = processed;
440 unsigned int jsnErrorEvents = 0;
441 unsigned int jsnRetCodeMask = 0;
443 unsigned int jsnHLTErrorEvents = 0;
460 auto jsnFileName =
boost::format(
"run%06d_ls%04d_streamHLTRates_pid%05d.jsn") % run % ls % getpid();
461 std::ofstream jsnFile(
rundata.baseRunDir +
"/" + jsnFileName.str() );
462 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
format
Some error handling for the usage.
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