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" << std::setfill(
'0') << std::setw(6) << nRun <<
"_ls0000";
295 ssHltJsd <<
"_streamHLTRates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsd";
301 std::stringstream ssL1Jsd;
302 ssL1Jsd <<
"run" << std::setfill(
'0') << std::setw(6) << 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" << std::setfill(
'0') << std::setw(6) << 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" << std::setfill(
'0') << std::setw(6) << 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;
467 gethostname(hostname,32);
473 std::stringstream sOutDef;
474 sOutDef << monPath <<
"output_" << getpid() <<
".jsd";
477 unsigned int iRun = iLumi.
run();
483 hltJsnData[DataPoint::DEFINITION] = iSummary->
stHltJsd;
497 std::stringstream ssHltJsnData;
498 ssHltJsnData <<
"run" << std::setfill(
'0') << std::setw(6) << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
499 ssHltJsnData <<
"_streamHLTRates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsndata";
501 std::ofstream outHltJsnData( monPath + ssHltJsnData.str() );
503 outHltJsnData.close();
508 l1JsnData[DataPoint::DEFINITION] = iSummary->
stL1Jsd;
514 result = writer.
write(l1JsnData);
516 std::stringstream ssL1JsnData;
517 ssL1JsnData <<
"run" << std::setfill(
'0') << std::setw(6) << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
518 ssL1JsnData <<
"_streamL1Rates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsndata";
520 std::ofstream outL1JsnData( monPath +
"/" + ssL1JsnData.str() );
522 outL1JsnData.close();
528 IntJ daqJsnAccepted_ = daqJsnProcessed_;
529 IntJ daqJsnErrorEvents_ = 0;
530 IntJ daqJsnRetCodeMask_ = 0;
536 hltJsnFilelist_.
update(ssHltJsnData.str());
538 const char* cName = (monPath+ssHltJsnData.str()).c_str();
541 IntJ hltJsnFilesize_ = st.st_size;
543 hltJsnInputFiles_.
update(
"");
548 hltDaqJsn[DataPoint::DEFINITION] = sOutDef.str();
560 result = writer.
write(hltDaqJsn);
562 std::stringstream ssHltDaqJsn;
563 ssHltDaqJsn <<
"run" << std::setfill(
'0') << std::setw(6) << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
564 ssHltDaqJsn <<
"_streamHLTRates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsn";
566 std::ofstream outHltDaqJsn( monPath + ssHltDaqJsn.str() );
568 outHltDaqJsn.close();
572 l1JsnFilelist_.
update(ssL1JsnData.str());
574 cName = (monPath+ssL1JsnData.str()).c_str();
577 IntJ l1JsnFilesize_ = st.st_size;
579 l1JsnInputFiles_.
update(
"");
584 l1DaqJsn[DataPoint::DEFINITION] = sOutDef.str();
596 result = writer.
write(l1DaqJsn);
598 std::stringstream ssL1DaqJsn;
599 ssL1DaqJsn <<
"run" << std::setfill(
'0') << std::setw(6) << iRun <<
"_ls" << std::setfill(
'0') << std::setw(4) << iLs;
600 ssL1DaqJsn <<
"_streamL1Rates_pid" << std::setfill(
'0') << std::setw(5) << getpid() <<
".jsn";
602 std::ofstream outL1DaqJsn( monPath + ssL1DaqJsn.str() );
633 outfile <<
"{" << std::endl;
634 outfile <<
" \"data\" : [" << std::endl;
636 outfile <<
" \"name\" : \"Processed\"," ;
637 outfile <<
" \"type\" : \"integer\"," ;
638 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
641 outfile <<
" \"name\" : \"Path-WasRun\"," ;
642 outfile <<
" \"type\" : \"integer\"," ;
643 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
646 outfile <<
" \"name\" : \"Path-AfterL1Seed\"," ;
647 outfile <<
" \"type\" : \"integer\"," ;
648 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
651 outfile <<
" \"name\" : \"Path-AfterPrescale\"," ;
652 outfile <<
" \"type\" : \"integer\"," ;
653 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
656 outfile <<
" \"name\" : \"Path-Accepted\"," ;
657 outfile <<
" \"type\" : \"integer\"," ;
658 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
661 outfile <<
" \"name\" : \"Path-Rejected\"," ;
662 outfile <<
" \"type\" : \"integer\"," ;
663 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
666 outfile <<
" \"name\" : \"Path-Errors\"," ;
667 outfile <<
" \"type\" : \"integer\"," ;
668 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
671 outfile <<
" \"name\" : \"Dataset-Accepted\"," ;
672 outfile <<
" \"type\" : \"integer\"," ;
673 outfile <<
" \"operation\" : \"histo\"}" << std::endl;
675 outfile <<
" ]" << std::endl;
676 outfile <<
"}" << std::endl;
686 outfile <<
"{" << std::endl;
687 outfile <<
" \"data\" : [" << std::endl;
689 outfile <<
" \"name\" : \"Processed\"," ;
690 outfile <<
" \"type\" : \"integer\"," ;
691 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
694 outfile <<
" \"name\" : \"L1-Accepted\"," ;
695 outfile <<
" \"type\" : \"integer\"," ;
696 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
699 outfile <<
" \"name\" : \"L1-TechAccepted\"," ;
700 outfile <<
" \"type\" : \"integer\"," ;
701 outfile <<
" \"operation\" : \"histo\"}," << std::endl;
704 outfile <<
" \"name\" : \"L1-Global\"," ;
705 outfile <<
" \"type\" : \"integer\"," ;
706 outfile <<
" \"operation\" : \"histo\"}" << std::endl;
708 outfile <<
" ]" << std::endl;
709 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
std::string streamL1Destination
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)
std::string streamHLTDestination
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)