|
void | analyze (edm::StreamID, edm::Event const &, edm::EventSetup const &) const override |
|
std::unique_ptr< L1TriggerJSONMonitoringData::stream > | beginStream (edm::StreamID) const override |
|
std::shared_ptr< L1TriggerJSONMonitoringData::lumisection > | globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &) const override |
|
std::shared_ptr< L1TriggerJSONMonitoringData::run > | globalBeginRun (edm::Run const &, edm::EventSetup const &) const override |
|
void | globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, L1TriggerJSONMonitoringData::lumisection *) const override |
|
void | globalEndRun (edm::Run const &, edm::EventSetup const &) const override |
|
| L1TriggerJSONMonitoring (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 &, L1TriggerJSONMonitoringData::lumisection *) const override |
|
| ~L1TriggerJSONMonitoring () override=default |
|
| EDAnalyzer ()=default |
|
| EDAnalyzerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
virtual | ~EDAnalyzerBase () |
|
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 |
|
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 TCDS and L1T monitoring information.
Definition at line 71 of file L1TriggerJSONMonitoring.cc.
Implements edm::global::EDAnalyzerBase.
Definition at line 231 of file L1TriggerJSONMonitoring.cc.
References BXVector< T >::at(), edm::EventAuxiliary::CalibrationTrigger, edm::InputTag::encode(), edm::Event::getByToken(), cmsBatch::handle, mps_fire::i, edm::HandleBase::isValid(), kPrescaleConflict, kPrescaleUndefined, level1Results_, level1ResultsToken_, GlobalAlgBlk::maxPhysicsTriggers, or, edm::EventAuxiliary::PhysicsTrigger, edm::EventAuxiliary::RandomTrigger, mps_update::results, and tcdsTriggerTypes_.
233 auto & stream = * streamCache(sid);
236 unsigned int eventType =
event.experimentType();
238 ++stream.tcdsAccept[eventType];
240 edm::LogWarning(
"L1TriggerJSONMonitoring") <<
"Unexpected event type " << eventType;
253 auto const& decision =
results.getAlgoDecisionFinal();
257 for (
unsigned int i = 0;
i < decision.size(); ++
i) {
259 ++stream.l1tAccept[
i];
262 ++stream.l1tAcceptPhysics[
i];
265 ++stream.l1tAcceptCalibration[
i];
268 ++stream.l1tAcceptRandom[
i];
277 int prescaleIndex =
results.getPreScColumn();
279 stream.prescaleIndex = prescaleIndex;
282 }
else if (stream.prescaleIndex != prescaleIndex) {
284 "Prescale index changed from " << stream.prescaleIndex <<
" to " << prescaleIndex <<
" inside lumisection " <<
event.luminosityBlock();
const edm::InputTag level1Results_
static const int kPrescaleConflict
static const unsigned int maxPhysicsTriggers
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
static const int kPrescaleUndefined
static const std::array< const char *, 16 > tcdsTriggerTypes_
const edm::EDGetTokenT< GlobalAlgBlkBxCollection > level1ResultsToken_
const T & at(int bx, unsigned i) const
Definition at line 357 of file L1TriggerJSONMonitoring.cc.
References cms::Adler32(), Json::Value::append(), edm::EventAuxiliary::CalibrationTrigger, jsoncollector::DataPoint::DATA, jsoncollector::DataPoint::DEFINITION, cmsPerfStripChart::format, edm::LuminosityBlock::getRun(), edm::Run::index(), L1TriggerJSONMonitoringData::lumisection::l1tAccept, L1TriggerJSONMonitoringData::lumisection::l1tAcceptCalibration, L1TriggerJSONMonitoringData::lumisection::l1tAcceptPhysics, L1TriggerJSONMonitoringData::lumisection::l1tAcceptRandom, eostools::ls(), edm::LuminosityBlockBase::luminosityBlock(), edm::EventAuxiliary::PhysicsTrigger, L1TriggerJSONMonitoringData::lumisection::prescaleIndex, L1TriggerJSONMonitoringData::lumisection::processed, edm::EventAuxiliary::RandomTrigger, mps_fire::result, edm::LuminosityBlockBase::run(), findQualityFiles::run, lumiPlot::rundata, evf::FastMonitoringService::shouldWriteFiles(), jsoncollector::DataPoint::SOURCE, AlCaHLTBitMon_QueryRunRegistry::string, L1TriggerJSONMonitoringData::lumisection::tcdsAccept, jsoncollector::HistoJ< T >::toJsonValue(), jsoncollector::HistoJ< T >::update(), jsoncollector::HistoJ< T >::value(), and cscNeutronWriter_cfi::writer.
359 unsigned int ls =
lumi.luminosityBlock();
362 bool writeFiles =
true;
372 auto const&
rundata = * runCache(
lumi.getRun().index());
377 gethostname(hostname, 32);
381 std::stringstream sOutDef;
382 sOutDef <<
rundata.baseRunDir <<
"/" <<
"output_" << getpid() <<
".jsd";
385 unsigned int jsndataSize = 0;
386 unsigned int jsndataAdler32 = 1;
410 auto jsndataFileName =
boost::format(
"run%06d_ls%04d_streamL1Rates_pid%05d.jsndata") % run % ls % getpid();
413 std::ofstream jsndataFile(
rundata.baseRunDir +
"/" + jsndataFileName.str());
417 jsndataFileList = jsndataFileName.str();
418 jsndataSize = result.size();
419 jsndataAdler32 =
cms::Adler32(result.c_str(), result.size());
423 unsigned int jsnProcessed = processed;
424 unsigned int jsnAccepted = processed;
425 unsigned int jsnErrorEvents = 0;
426 unsigned int jsnRetCodeMask = 0;
428 unsigned int jsnHLTErrorEvents = 0;
445 auto jsnFileName =
boost::format(
"run%06d_ls%04d_streamL1Rates_pid%05d.jsn") % run % ls % getpid();
446 std::ofstream jsnFile(
rundata.baseRunDir +
"/" + jsnFileName.str() );
447 jsnFile << writer.write(jsn);
jsoncollector::HistoJ< unsigned int > l1tAcceptRandom
jsoncollector::HistoJ< unsigned int > l1tAccept
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 > l1tAcceptCalibration
jsoncollector::HistoJ< unsigned int > processed
virtual Json::Value toJsonValue() const
std::vector< T > & value()
static const std::string DATA
jsoncollector::HistoJ< unsigned int > tcdsAccept
format
Some error handling for the usage.
jsoncollector::HistoJ< unsigned int > l1tAcceptPhysics
void Adler32(char const *data, size_t len, uint32_t &a, uint32_t &b)
Writes a Value in JSON format in a human friendly way.
static const std::string DEFINITION