|
| 1 | +apiVersion: argoproj.io/v1alpha1 |
| 2 | +kind: Workflow |
| 3 | +metadata: |
| 4 | + generateName: castor-argo- |
| 5 | +spec: |
| 6 | + entrypoint: castor-argo |
| 7 | + volumes: |
| 8 | + - name: workdir |
| 9 | + hostPath: |
| 10 | + path: /mnt/data |
| 11 | + type: DirectoryOrCreate |
| 12 | + templates: |
| 13 | + - name: castor-argo |
| 14 | + # the order and inputs to the different steps: |
| 15 | + dag: |
| 16 | + tasks: |
| 17 | + - name: step1-data |
| 18 | + template: castor-step1 |
| 19 | + arguments: |
| 20 | + parameters: |
| 21 | + - name: config |
| 22 | + value: "analyzer_cfg_Commissioning10.py" |
| 23 | + - name: dir |
| 24 | + value: "Commissioning10Analyzer" |
| 25 | + - name: step1-mc |
| 26 | + template: castor-step1 |
| 27 | + arguments: |
| 28 | + parameters: |
| 29 | + - name: config |
| 30 | + value: "analyzer_cfg_Comm10MC.py" |
| 31 | + - name: dir |
| 32 | + value: "Commissioning10Analyzer" |
| 33 | + - name: step2-plot |
| 34 | + dependencies: [step1-mc, step1-data] |
| 35 | + template: castor-step2 |
| 36 | + arguments: |
| 37 | + parameters: |
| 38 | + - name: config |
| 39 | + value: "drawValidationPlots_Commissioning10.py" |
| 40 | + |
| 41 | + # analysis step definition |
| 42 | + - name: castor-step1 |
| 43 | + inputs: |
| 44 | + parameters: |
| 45 | + - name: config |
| 46 | + - name: dir |
| 47 | + script: |
| 48 | + image: gitlab-registry.cern.ch/clange/cmssw-docker/cmssw_4_2_8_lowpupatch1 |
| 49 | + command: [sh] |
| 50 | + source: | |
| 51 | + sudo chown $USER /mnt/vol |
| 52 | + source /opt/cms/entrypoint.sh |
| 53 | + git clone git://github.com/cms-legacydata-validation/CastorDataValidation.git |
| 54 | + mv CastorDataValidation/CMSSW_additional_packages.tar . |
| 55 | + tar -xvf CMSSW_additional_packages.tar |
| 56 | + scram b |
| 57 | + cd CastorDataValidation/{{inputs.parameters.dir}}/ |
| 58 | + nev=10000 |
| 59 | + eventline=$(grep maxEvents {{inputs.parameters.config}}) |
| 60 | + sed -i "s/$eventline/process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32($nev) )/g" {{inputs.parameters.config}} |
| 61 | + #comment the connection to the condition database on cvmfs, the condition data is read differently in the container |
| 62 | + sed -i "s/process.GlobalTag.connect/\#process.GlobalTag.connect/g" {{inputs.parameters.config}} |
| 63 | + cmsRun {{inputs.parameters.config}} |
| 64 | + ls -l |
| 65 | + cp CASTOR*.root /mnt/vol |
| 66 | + volumeMounts: |
| 67 | + - name: workdir |
| 68 | + mountPath: /mnt/vol |
| 69 | + |
| 70 | + # plotting step definition |
| 71 | + - name: castor-step2 |
| 72 | + inputs: |
| 73 | + parameters: |
| 74 | + - name: config |
| 75 | + script: |
| 76 | + image: gitlab-registry.cern.ch/clange/cmssw-docker/cmssw_4_2_8_lowpupatch1 |
| 77 | + command: [sh] |
| 78 | + source: | |
| 79 | + sudo chown $USER /mnt/vol |
| 80 | + source /opt/cms/entrypoint.sh |
| 81 | + git clone git://github.com/cms-legacydata-validation/CastorDataValidation.git |
| 82 | + mv CastorDataValidation/CMSSW_additional_packages.tar . |
| 83 | + tar -xvf CMSSW_additional_packages.tar |
| 84 | + scram b |
| 85 | + cd CastorDataValidation/Plots/ |
| 86 | + mv /mnt/vol/CASTOR*.root . |
| 87 | + sed -i "s/preventExit()/\#preventExit()/g" {{inputs.parameters.config}} |
| 88 | + python {{inputs.parameters.config}} |
| 89 | + ls -l *.pdf |
| 90 | + mv *.pdf /mnt/vol |
| 91 | + volumeMounts: |
| 92 | + - name: workdir |
| 93 | + mountPath: /mnt/vol |
| 94 | + |
| 95 | + |
0 commit comments