Skip to content

Commit

Permalink
outputmodules entry in json legend
Browse files Browse the repository at this point in the history
  • Loading branch information
smorovic committed Oct 26, 2015
1 parent f427b6b commit 134d1bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions EventFilter/Utilities/interface/FastMonitoringService.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ namespace evf{
std::string pathLegendFile_;
std::string pathLegendFileJson_;
bool pathLegendWritten_ = false;
unsigned int nOutputModules_ =0;

std::atomic<bool> monInit_;
bool exception_detected_ = false;
Expand Down
9 changes: 8 additions & 1 deletion EventFilter/Utilities/src/FastMonitoringService.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
constexpr double throughputFactor() {return (1000000)/double(1024*1024);}

#define NRESERVEDMODULES 33
#define NSPECIALMODULES 7
#define NRESERVEDPATHS 1

namespace evf{
Expand Down Expand Up @@ -100,9 +101,13 @@ namespace evf{
for(int i = 0; i < encModule_.current_; i++)
legendaVector.append(Json::Value(((const edm::ModuleDescription *)(encModule_.decode(i)))->moduleLabel()));
Json::Value valReserved(NRESERVEDMODULES);
Json::Value valSpecial(NSPECIALMODULES);
Json::Value valOutputModules(nOutputModules_);
Json::Value moduleLegend;
moduleLegend["names"]=legendaVector;
moduleLegend["reserved"]=valReserved;
moduleLegend["special"]=valSpecial;
moduleLegend["output"]=valOutputModules;
Json::StyledWriter writer;
return writer.write(moduleLegend);
}
Expand Down Expand Up @@ -279,8 +284,10 @@ namespace evf{
//build a map of modules keyed by their module description address
//here we need to treat output modules in a special way so they can be easily singled out
if(desc.moduleName() == "Stream" || desc.moduleName() == "ShmStreamConsumer" || desc.moduleName() == "EvFOutputModule" ||
desc.moduleName() == "EventStreamFileWriter" || desc.moduleName() == "PoolOutputModule")
desc.moduleName() == "EventStreamFileWriter" || desc.moduleName() == "PoolOutputModule") {
encModule_.updateReserved((void*)&desc);
nOutputModules_++;
}
else
encModule_.update((void*)&desc);
}
Expand Down

0 comments on commit 134d1bc

Please sign in to comment.