Skip to content

Commit

Permalink
*adding HLTErrorEvents field to output JSON (to be used for filling S…
Browse files Browse the repository at this point in the history
…M DB

with additional information that distinguishes errors from crashes in
HLT farm and other, purely DAQ related causes)
  • Loading branch information
smorovic committed Oct 26, 2015
1 parent 134d1bc commit b9ccbe9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DQMServices/Components/src/DQMFileSaver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ DQMFileSaver::fillJson(int run, int lumi, const std::string& dataFilePathName, c
}
// The availability test of the FastMonitoringService was done in the ctor.
bpt::ptree data;
bpt::ptree processedEvents, acceptedEvents, errorEvents, bitmask, fileList, fileSize, inputFiles, fileAdler32, transferDestination;
bpt::ptree processedEvents, acceptedEvents, errorEvents, bitmask, fileList, fileSize, inputFiles, fileAdler32, transferDestination, hltErrorEvents;

processedEvents.put("", nProcessed); // Processed events
acceptedEvents.put("", nProcessed); // Accepted events, same as processed for our purposes
Expand All @@ -303,6 +303,7 @@ DQMFileSaver::fillJson(int run, int lumi, const std::string& dataFilePathName, c
inputFiles.put("", ""); // We do not care about input files!
fileAdler32.put("", -1); // placeholder to match output json definition
transferDestination.put("", transferDestinationStr); // SM Transfer destination field
hltErrorEvents.put("", 0); // Error events

data.push_back(std::make_pair("", processedEvents));
data.push_back(std::make_pair("", acceptedEvents));
Expand All @@ -313,6 +314,7 @@ DQMFileSaver::fillJson(int run, int lumi, const std::string& dataFilePathName, c
data.push_back(std::make_pair("", inputFiles));
data.push_back(std::make_pair("", fileAdler32));
data.push_back(std::make_pair("", transferDestination));
data.push_back(std::make_pair("", hltErrorEvents));

pt.add_child("data", data);

Expand Down
5 changes: 5 additions & 0 deletions EventFilter/Utilities/plugins/RecoEventOutputModuleForFU.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ namespace evf {
StringJ inputFiles_;
IntJ fileAdler32_;
StringJ transferDestination_;
IntJ hltErrorEvents_;
boost::shared_ptr<FastMonitor> jsonMonitor_;
evf::FastMonitoringService *fms_;
DataPointDefinition outJsonDef_;
Expand All @@ -85,6 +86,7 @@ namespace evf {
inputFiles_(),
fileAdler32_(1),
transferDestination_(),
hltErrorEvents_(0),
outBuf_(new unsigned char[1024*1024])
{
std::string baseRunDir = edm::Service<evf::EvFDaqDirector>()->baseRunDir();
Expand Down Expand Up @@ -122,6 +124,7 @@ namespace evf {
inputFiles_.setName("InputFiles");
fileAdler32_.setName("FileAdler32");
transferDestination_.setName("TransferDestination");
hltErrorEvents_.setName("HLTErrorEvents");

outJsonDef_.setDefaultGroup("data");
outJsonDef_.addLegendItem("Processed","integer",DataPointDefinition::SUM);
Expand All @@ -133,6 +136,7 @@ namespace evf {
outJsonDef_.addLegendItem("InputFiles","string",DataPointDefinition::CAT);
outJsonDef_.addLegendItem("FileAdler32","integer",DataPointDefinition::ADLER32);
outJsonDef_.addLegendItem("TransferDestination","string",DataPointDefinition::SAME);
outJsonDef_.addLegendItem("HLTErrorEvents","integer",DataPointDefinition::SUM);
std::stringstream tmpss,ss;
tmpss << baseRunDir << "/open/" << "output_" << getpid() << ".jsd";
ss << baseRunDir << "/" << "output_" << getpid() << ".jsd";
Expand Down Expand Up @@ -161,6 +165,7 @@ namespace evf {
jsonMonitor_->registerGlobalMonitorable(&inputFiles_,false);
jsonMonitor_->registerGlobalMonitorable(&fileAdler32_,false);
jsonMonitor_->registerGlobalMonitorable(&transferDestination_,false);
jsonMonitor_->registerGlobalMonitorable(&hltErrorEvents_,false);
jsonMonitor_->commit(nullptr);

}
Expand Down
5 changes: 5 additions & 0 deletions EventFilter/Utilities/plugins/output.jsd
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
"name" : "TransferDestination",
"operation" : "same",
"type" : "string"
},
{
"name" : "HLTErrorEvents",
"operation" : "sum",
"type" : "integer"
}

]
Expand Down
3 changes: 3 additions & 0 deletions HLTrigger/JSONMonitoring/plugins/TriggerJSONMonitoring.cc
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,7 @@ TriggerJSONMonitoring::globalEndLuminosityBlockSummary(const edm::LuminosityBloc
IntJ daqJsnAccepted = daqJsnProcessed;
IntJ daqJsnErrorEvents = 0;
IntJ daqJsnRetCodeMask = 0;
IntJ daqJsnHLTErrorEvents = 0;

//write out HLT metadata jsn
Json::Value hltDaqJsn;
Expand All @@ -664,6 +665,7 @@ TriggerJSONMonitoring::globalEndLuminosityBlockSummary(const edm::LuminosityBloc
hltDaqJsn[DataPoint::DATA].append(hltJsnInputFiles.value());
hltDaqJsn[DataPoint::DATA].append(hltJsnFileAdler32);
hltDaqJsn[DataPoint::DATA].append(iSummary->streamHLTDestination);
hltDaqJsn[DataPoint::DATA].append((unsigned int)daqJsnHLTErrorEvents.value());

result = writer.write(hltDaqJsn);

Expand All @@ -689,6 +691,7 @@ TriggerJSONMonitoring::globalEndLuminosityBlockSummary(const edm::LuminosityBloc
l1DaqJsn[DataPoint::DATA].append(l1JsnInputFiles.value());
l1DaqJsn[DataPoint::DATA].append(l1JsnFileAdler32);
l1DaqJsn[DataPoint::DATA].append(iSummary->streamL1Destination);
l1DaqJsn[DataPoint::DATA].append((unsigned int)daqJsnHLTErrorEvents.value());

result = writer.write(l1DaqJsn);

Expand Down

0 comments on commit b9ccbe9

Please sign in to comment.