forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#23 from dballesteros7/promptskimming
Promptskimming view
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/** | ||
* This list function gets the view output from outputDataBy<*> | ||
* and creates an html which contains the links to the | ||
* performance histogram and summary for each row in the output view | ||
*/ | ||
function(head, req) { | ||
var row; | ||
start({"headers": {"Content-Type": "text/html"}}); | ||
|
||
var response = "<html><head>\n"; | ||
response += "<title> Summary of completed worklows </title>\n"; | ||
response += "</head><body style=\"font-family: arial;\">\n"; | ||
|
||
while (row = getRow()) { | ||
var key = row.key; | ||
var id = row.id; | ||
response += "<b>Run:</b> " + key[2] + "\t"; | ||
response += "<b>Primary dataset:</b> " + key[0] + "\n<br>\n"; | ||
response += "<div id=output style=\"margin: 0px 0px 0px 15px;\">\n"; | ||
response += "Workflow Summary: <a href=\"../../_show/histogramByWorkflow/"+ id + "\">" + id + "</a><br>\n"; | ||
response += "</div><br>\n"; | ||
} | ||
|
||
response += "</body></html>"; | ||
return response | ||
}; | ||
|
21 changes: 21 additions & 0 deletions
21
src/couchapps/WorkloadSummary/views/outputDataByPrimDs/map.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* This view gets the summaries with an Id that matches any the following patterns: | ||
* Run<runnumber>-<PrimDs>-<ProcessedDataset>-Tier1PromptReco-<GUID> | ||
* Run<runnumber>-<PrimDs>-<ProcessedDataset>-<SkimName>-<GUID> | ||
* It returns them with the following key: | ||
* [<PrimDs>,<WorkflowType>, <runnumber>] | ||
* The possible workflow types are: | ||
* T1Reco for the first pattern | ||
* PromptSkim for the second pattern | ||
*/ | ||
function(doc) { | ||
var regexp = /^Run(\d+)-(\w+)-(\w+)(-\w+)?-v(\d+)-(\w+)/; | ||
var match = doc._id.match(regexp); | ||
if (match && match.length == 7){ | ||
var runNumber = parseInt(match[1]); | ||
var primDs = match[2]; | ||
var isReco = (match[4] != null) ? "PromptSkim" : "T1Reco"; | ||
emit([primDs, isReco, runNumber], null); | ||
} | ||
} | ||
|