45 descriptions.
add(
"triggerJSONMonitoring", desc);
62 LogDebug(
"TriggerJSONMonitoring") <<
"Not Physics, Calibration or Random. experimentType = " << ex << std::endl;
71 const std::vector<bool> & algoword = L1TResults.decisionWord();
73 for (
unsigned int i = 0;
i < algoword.size();
i++){
78 LogWarning(
"TriggerJSONMonitoring")<<
"L1 Algo Trigger Mask size does not match number of L1 Algo Triggers!";
81 const std::vector<bool> & techword = L1TResults.technicalTriggerWord();
83 for (
unsigned int i = 0;
i < techword.size();
i++){
88 LogWarning(
"TriggerJSONMonitoring")<<
"L1 Tech Trigger Mask size does not match number of L1 Tech Triggers!";
94 if (!HLTR.isValid()) {
101 for (
unsigned int i=0;
i<
n;
i++) {
107 const int index(static_cast<int>(HLTR->index(
i)));
108 if (HLTR->accept(
i)) {
118 std::vector<bool> acceptedByDS(
hltIndex_.size(),
false);
119 for (
unsigned int ds=0; ds <
hltIndex_.size(); ds++) {
121 if (acceptedByDS[ds]>0 || HLTR->accept(
hltIndex_[ds][
p]) ) {
122 acceptedByDS[ds] =
true;
144 int bitNumber = (itAlgo->second).algoBitNumber();
154 int bitNumber = (itAlgo->second).algoBitNumber();
189 for (
unsigned int ds = 0; ds < d; ds++) {
192 for (
unsigned int p = 0;
p <
size;
p++) {
202 for (
unsigned int i = 0;
i <
n; ++
i) {
206 for (
unsigned int j = 0;
j < moduleLabels.size(); ++
j) {
208 if (label ==
"HLTLevel1GTSeed")
210 else if (label ==
"HLTPrescaler")
280 LogDebug(
"TriggerJSONMonitoring") <<
"HLTConfigProvider initialization failed!" << std::endl;
286 bool expected =
false;
287 if( runCache()->wroteFiles.compare_exchange_strong(expected,
true) ){
288 runCache()->wroteFiles =
true;
290 unsigned int nRun = iRun.
run();
293 std::stringstream ssHltJsd;
294 ssHltJsd <<
"run" << nRun <<
"_ls0000";
295 ssHltJsd <<
"_streamHLTRates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsd";
301 std::stringstream ssL1Jsd;
302 ssL1Jsd <<
"run" << nRun <<
"_ls0000";
303 ssL1Jsd <<
"_streamL1Rates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsd";
323 hltIni[
"Path-Names"] = hltNamesVal;
324 hltIni[
"Dataset-Names"] = datasetNamesVal;
328 std::stringstream ssHltIni;
329 ssHltIni <<
"run" << nRun <<
"_ls0000_streamHLTRates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".ini";
331 std::ofstream outHltIni( monPath + ssHltIni.str() );
353 l1Ini[
"L1-Algo-Names"] = l1AlgoNamesVal;
354 l1Ini[
"L1-Tech-Names"] = l1TechNamesVal;
355 l1Ini[
"Event-Type"] = eventTypeVal;
357 result = writer.
write(l1Ini);
359 std::stringstream ssL1Ini;
360 ssL1Ini <<
"run" << nRun <<
"_ls0000_streamL1Rates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".ini";
362 std::ofstream outL1Ini( monPath + ssL1Ini.str() );
371 std::shared_ptr<hltJson::lumiVars>
376 unsigned int MAXPATHS = 500;
465 gethostname(hostname,32);
471 std::stringstream sOutDef;
472 sOutDef << monPath <<
"output_" << getpid() <<
".jsd";
475 unsigned int iRun = iLumi.
run();
481 hltJsnData[DataPoint::DEFINITION] = iSummary->
stHltJsd;
495 std::stringstream ssHltJsnData;
496 ssHltJsnData <<
"run" << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
497 ssHltJsnData <<
"_streamHLTRates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsndata";
499 std::ofstream outHltJsnData( monPath + ssHltJsnData.str() );
501 outHltJsnData.close();
506 l1JsnData[DataPoint::DEFINITION] = iSummary->
stL1Jsd;
512 result = writer.
write(l1JsnData);
514 std::stringstream ssL1JsnData;
515 ssL1JsnData <<
"run" << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
516 ssL1JsnData <<
"_streamL1Rates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsndata";
518 std::ofstream outL1JsnData( monPath +
"/" + ssL1JsnData.str() );
520 outL1JsnData.close();
526 IntJ daqJsnAccepted_ = daqJsnProcessed_;
527 IntJ daqJsnErrorEvents_ = 0;
528 IntJ daqJsnRetCodeMask_ = 0;
534 hltJsnFilelist_.
update(ssHltJsnData.str());
536 const char* cName = (monPath+ssHltJsnData.str()).c_str();
539 IntJ hltJsnFilesize_ = st.st_size;
541 hltJsnInputFiles_.
update(
"");
546 hltDaqJsn[DataPoint::DEFINITION] = sOutDef.str();
557 result = writer.
write(hltDaqJsn);
559 std::stringstream ssHltDaqJsn;
560 ssHltDaqJsn <<
"run" << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
561 ssHltDaqJsn <<
"_streamHLTRates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsn";
563 std::ofstream outHltDaqJsn( monPath + ssHltDaqJsn.str() );
565 outHltDaqJsn.close();
569 l1JsnFilelist_.
update(ssL1JsnData.str());
571 cName = (monPath+ssL1JsnData.str()).c_str();
574 IntJ l1JsnFilesize_ = st.st_size;
576 l1JsnInputFiles_.
update(
"");
581 l1DaqJsn[DataPoint::DEFINITION] = sOutDef.str();
592 result = writer.
write(l1DaqJsn);
594 std::stringstream ssL1DaqJsn;
595 ssL1DaqJsn <<
"run" << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
596 ssL1DaqJsn <<
"_streamL1Rates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsn";
598 std::ofstream outL1DaqJsn( monPath + ssL1DaqJsn.str() );
629 outfile <<
"{" << std::endl;
630 outfile <<
" \"data\" : [" << std::endl;
632 outfile <<
" \"name\" : \"Processed\"," ;
633 outfile <<
" \"type\" : \"integer\"," ;
634 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
637 outfile <<
" \"name\" : \"Path-WasRun\"," ;
638 outfile <<
" \"type\" : \"integer\"," ;
639 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
642 outfile <<
" \"name\" : \"Path-AfterL1Seed\"," ;
643 outfile <<
" \"type\" : \"integer\"," ;
644 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
647 outfile <<
" \"name\" : \"Path-AfterPrescale\"," ;
648 outfile <<
" \"type\" : \"integer\"," ;
649 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
652 outfile <<
" \"name\" : \"Path-Accepted\"," ;
653 outfile <<
" \"type\" : \"integer\"," ;
654 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
657 outfile <<
" \"name\" : \"Path-Rejected\"," ;
658 outfile <<
" \"type\" : \"integer\"," ;
659 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
662 outfile <<
" \"name\" : \"Path-Errors\"," ;
663 outfile <<
" \"type\" : \"integer\"," ;
664 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
667 outfile <<
" \"name\" : \"Dataset-Accepted\"," ;
668 outfile <<
" \"type\" : \"integer\"," ;
669 outfile <<
" \"operation\" : \"histo\"}" << std::endl;
671 outfile <<
" ]" << std::endl;
672 outfile <<
"}" << std::endl;
682 outfile <<
"{" << std::endl;
683 outfile <<
" \"data\" : [" << std::endl;
685 outfile <<
" \"name\" : \"Processed\"," ;
686 outfile <<
" \"type\" : \"integer\"," ;
687 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
690 outfile <<
" \"name\" : \"L1-Accepted\"," ;
691 outfile <<
" \"type\" : \"integer\"," ;
692 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
695 outfile <<
" \"name\" : \"L1-TechAccepted\"," ;
696 outfile <<
" \"type\" : \"integer\"," ;
697 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
700 outfile <<
" \"name\" : \"L1-Global\"," ;
701 outfile <<
" \"type\" : \"integer\"," ;
702 outfile <<
" \"operation\" : \"histo\"}" << std::endl;
704 outfile <<
" ]" << std::endl;
705 outfile <<
"}" << std::endl;
TriggerJSONMonitoring(const edm::ParameterSet &)
void resetRun(bool changed)
T getParameter(std::string const &) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1t_results
HistoJ< unsigned int > * L1TechAccept
const std::string moduleType(const std::string &module) const
C++ class name of module.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
HistoJ< unsigned int > * hltReject
std::vector< unsigned int > hltDatasets_
static std::shared_ptr< hltJson::lumiVars > globalBeginLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
std::vector< unsigned int > L1AlgoAccept_
const std::vector< std::string > & triggerNames() const
names of trigger paths
bool exists(std::string const ¶meterName) const
checks if a parameter exists
HistoJ< unsigned int > * hltErrors
Value & append(const Value &value)
Append value to array at the end.
void update(std::string const &newStr)
std::vector< unsigned int > hltErrors_
static void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, hltJson::lumiVars *)
void beginRun(edm::Run const &, edm::EventSetup const &)
HistoJ< unsigned int > * processed
std::vector< unsigned int > hltL1s_
const L1GtTriggerMenu * m_l1GtMenu
virtual Json::Value toJsonValue() const
std::vector< std::vector< unsigned int > > hltIndex_
std::vector< T > & value()
HistoJ< unsigned int > * hltAccept
std::vector< unsigned int > hltAccept_
LuminosityBlockNumber_t luminosityBlock() const
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
AlgorithmMap algorithmMap
tuple path
else: Piece not in the list, fine.
HistoJ< unsigned int > * L1Accept
const std::vector< unsigned int > & gtTriggerMask() const
get the trigger mask
edm::InputTag level1Results_
void endLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, hltJson::lumiVars *) const
std::vector< std::string > hltNames_
HLTConfigProvider hltConfig_
const L1GtTriggerMask * m_l1tTechMask
std::vector< std::string > datasetNames_
std::vector< std::string > L1GlobalType_
std::vector< unsigned int > hltReject_
HistoJ< unsigned int > * hltPre
ParameterDescriptionBase * add(U const &iLabel, T const &value)
virtual std::string write(const Value &root)
Serialize a Value in JSON format.
std::vector< int > posL1s_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
std::vector< std::string > L1AlgoNames_
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
void Adler32(char const *data, size_t len, uint32_t &a, uint32_t &b)
HistoJ< unsigned int > * hltDatasets
std::vector< unsigned int > L1TechAccept_
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
T const * product() const
const L1GtTriggerMask * m_l1tAlgoMask
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void writeDefJson(std::string path)
std::vector< unsigned int > L1Global_
const std::vector< std::vector< std::string > > & datasetContents() const
names of trigger paths for all datasets
std::vector< unsigned int > hltWasRun_
std::vector< std::vector< std::string > > datasetContents_
< trclass="colgroup">< tdclass="colgroup"colspan=5 > DT local reconstruction</td ></tr >< tr >< td >< ahref="classDTRecHit1DPair.html"> DTRecHit1DPair</a ></td >< td >< ahref="DataFormats_DTRecHit.html"> edm::RangeMap & lt
std::vector< int > posPre_
edm::EventAuxiliary::ExperimentType experimentType() const
HistoJ< unsigned int > * hltL1s
edm::InputTag triggerResults_
std::vector< std::string > L1TechNames_
void analyze(edm::Event const &, edm::EventSetup const &)
Writes a Value in JSON format in a human friendly way.
HistoJ< unsigned int > * L1Global
HistoJ< unsigned int > * hltWasRun
void writeL1DefJson(std::string path)
tuple size
Write out results.
AlgorithmMap technicalMap
const std::vector< std::string > & datasetNames() const
std::vector< unsigned int > hltPre_
array value (ordered list)