Skip to content

Commit

Permalink
Make workflowtype key more descriptive
Browse files Browse the repository at this point in the history
Instead of using 0 and 1 for PromptSkims and Tier1Promptreco,
use the strings "PromptSkim" and "T1Reco" as identifiers
  • Loading branch information
dballesteros7 committed Jul 17, 2012
1 parent ac05add commit d9df120
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/couchapps/WorkloadSummary/views/outputDataByPrimDs/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
* Run<runnumber>-<PrimDs>-<ProcessedDataset>-Tier1PromptReco-<GUID>
* Run<runnumber>-<PrimDs>-<ProcessedDataset>-<SkimName>-<GUID>
* It returns them with the following key:
* [<PrimDs>,<isTier1Reco>, <runnumber>]
*
* [<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) ? 0 : 1;
var isReco = (match[4] != null) ? "PromptSkim" : "T1Reco";
emit([primDs, isReco, runNumber], null);
}
}
Expand Down

0 comments on commit d9df120

Please sign in to comment.