Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Oct 30, 2024
1 parent b35d1b0 commit 35efa74
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion cmsutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ def epoch2week(epoch_sec, week_offset=4):

def cmsswIB2Week(release, week_offset=4):
from datetime import datetime
rel_date = "-".join(release.split("_")[-1].split("-")[:-1])+"-1200"

rel_date = "-".join(release.split("_")[-1].split("-")[:-1]) + "-1200"
rel_sec = int(datetime.strptime(rel_date, "%Y-%m-%d-%H%M").strftime("%s"))
return (epoch2week(rel_sec, week_offset), rel_sec)

Expand Down
19 changes: 11 additions & 8 deletions crab/pset.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
# with command line options: MinBias_8TeV_cfi --conditions auto:startup -s GEN,SIM --datatier GEN-SIM -n 10
# --relval 9000,300 --eventcontent RAWSIM --io MinBias.io --python MinBias.py --no_exec --fileout minbias.root

#Testing cmsbot crab setup

# Testing cmsbot crab setup
def cmsbot_crab_test():
import sys
from subprocess import getstatusoutput
from FWCore.Version.cmsbot_crab_test import CMSBOT_CRAB_TEST
cmsbot_exit, cmsbot_out = getstatusoutput("cmsbot_crab_test.sh")
print("CMSBOT Crab Test:",CMSBOT_CRAB_TEST,cmsbot_exit, cmsbot_out)
if cmsbot_exit or (cmsbot_out != "OK") or (CMSBOT_CRAB_TEST != "OK"):
sys.exit(1)
import sys
from subprocess import getstatusoutput
from FWCore.Version.cmsbot_crab_test import CMSBOT_CRAB_TEST

cmsbot_exit, cmsbot_out = getstatusoutput("cmsbot_crab_test.sh")
print("CMSBOT Crab Test:", CMSBOT_CRAB_TEST, cmsbot_exit, cmsbot_out)
if cmsbot_exit or (cmsbot_out != "OK") or (CMSBOT_CRAB_TEST != "OK"):
sys.exit(1)


cmsbot_crab_test()
import FWCore.ParameterSet.Config as cms
Expand Down

0 comments on commit 35efa74

Please sign in to comment.