|
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 |
|
| 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 232 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_.
234 auto & stream = * streamCache(sid);
237 unsigned int eventType =
event.experimentType();
239 ++stream.tcdsAccept[eventType];
241 edm::LogWarning(
"L1TriggerJSONMonitoring") <<
"Unexpected event type " << eventType;
254 auto const& decision =
results.getAlgoDecisionFinal();
258 for (
unsigned int i = 0;
i < decision.size(); ++
i) {
260 ++stream.l1tAccept[
i];
263 ++stream.l1tAcceptPhysics[
i];
266 ++stream.l1tAcceptCalibration[
i];
269 ++stream.l1tAcceptRandom[
i];
278 int prescaleIndex =
results.getPreScColumn();
280 stream.prescaleIndex = prescaleIndex;
283 }
else if (stream.prescaleIndex != prescaleIndex) {
285 "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 358 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.
360 unsigned int ls =
lumi.luminosityBlock();
363 bool writeFiles =
true;
373 auto const&
rundata = * runCache(
lumi.getRun().index());
378 gethostname(hostname, 32);
382 std::stringstream sOutDef;
383 sOutDef <<
rundata.baseRunDir <<
"/" <<
"output_" << getpid() <<
".jsd";
386 unsigned int jsndataSize = 0;
387 unsigned int jsndataAdler32 = 1;
411 auto jsndataFileName =
boost::format(
"run%06d_ls%04d_streamL1Rates_pid%05d.jsndata") % run % ls % getpid();
414 std::ofstream jsndataFile(
rundata.baseRunDir +
"/" + jsndataFileName.str());
418 jsndataFileList = jsndataFileName.str();
419 jsndataSize = result.size();
420 jsndataAdler32 =
cms::Adler32(result.c_str(), result.size());
424 unsigned int jsnProcessed = processed;
425 unsigned int jsnAccepted = processed;
426 unsigned int jsnErrorEvents = 0;
427 unsigned int jsnRetCodeMask = 0;
429 unsigned int jsnHLTErrorEvents = 0;
446 auto jsnFileName =
boost::format(
"run%06d_ls%04d_streamL1Rates_pid%05d.jsn") % run % ls % getpid();
447 std::ofstream jsnFile(
rundata.baseRunDir +
"/" + jsnFileName.str() );
448 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