Skip to content

Commit

Permalink
Merge pull request #177 from vespos/makepeds_s3df
Browse files Browse the repository at this point in the history
Remove non-s3df pedestal processing
  • Loading branch information
silkenelson authored Apr 10, 2024
2 parents e0b4664 + 33aefd1 commit 9c2736a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 53 deletions.
19 changes: 9 additions & 10 deletions scripts/makepeds
Original file line number Diff line number Diff line change
Expand Up @@ -191,24 +191,23 @@ else
if [[ $USER =~ "opr" ]]; then
printf "Please enter user name (cannot run as from operator account): \n"; read USER
fi
if [[ $S3DF == 1 ]]; then
echo calling on SDF system: makepeds_psana $@
# We need to change paths here as the S3DF filesytem is completely independent
if [ -v SDFDIR ]; then
DIR=$SDFDIR
else
DIR=`echo $DIR | sed 's/\/cds\/group\/pcds/\/sdf\/group\/lcls\/ds\/tools/g' | sed 's/\/reg\/g\/pcds/\/sdf\/group\/lcls\/ds\/tools/g'`
fi
echo ssh -Y $USER@s3dflogin ssh -Y psana "$DIR/makepeds_psana $@"
ssh -Y $USER@s3dflogin ssh -Y psana "$DIR/makepeds_psana $@"
echo calling on SDF system: makepeds_psana $@
# We need to change paths here as the S3DF filesytem is completely independent
if [ -v SDFDIR ]; then
DIR=$SDFDIR
else
DIR=`echo $DIR | sed 's/\/cds\/group\/pcds/\/sdf\/group\/lcls\/ds\/tools/g' | sed 's/\/reg\/g\/pcds/\/sdf\/group\/lcls\/ds\/tools/g'`
fi
echo ssh -Y $USER@s3dflogin ssh -Y psana "$DIR/makepeds_psana $@"
ssh -Y $USER@s3dflogin ssh -Y psana "$DIR/makepeds_psana $@"
fi

if [[ $HOSTNAME =~ "sdf" ]]; then
source /sdf/group/lcls/ds/ana/sw/conda1/manage/bin/psconda.sh
else
source pcds_conda
fi

elog_par_post --file pedestal -e "$EXP" -r $RUN

#if this is a default pedestal run, then do not post as this is handled in takepeds
Expand Down
59 changes: 16 additions & 43 deletions scripts/makepeds_psana
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,8 @@ if [ $RUN == 0 ]; then
fi
fi

PCDSDIR='/reg/g/pcds/'
SIT_ENV_DIR="/cds/sw/ds/ana/"
S3DF="sdf"
if [[ $HOSTNAME =~ "sdf" ]]; then
PCDSDIR='/sdf/group/lcls/ds/tools/'
SIT_ENV_DIR="/sdf/group/lcls/ds/ana/sw"
fi
PCDSDIR='/sdf/group/lcls/ds/tools/'
SIT_ENV_DIR="/sdf/group/lcls/ds/ana/sw"

if [ $EXP == 'xxx' ]; then
echo 'no experiment passed!!!'
Expand Down Expand Up @@ -447,22 +442,15 @@ ARG=' -n '$NUMEVT' -Z 1000000 -U 1000000 -z 1000000 -u 1000000 '
# find xtc directory
# look for xtc w/o in progress if not using live mode. TOBEIMPLEMENTED
###########
XTCDIR=/reg/d/psdm/"$HUTCH"/"$EXP"/xtc
RUNSTR=$(printf '%04d' $RUN)
RUNSTR=$EXP-r$RUNSTR*.xtc
if [[ $HOSTNAME =~ "sdf" ]]; then
XTCDIR=/sdf/data/lcls/ds/"$HUTCH"/"$EXP"/xtc
# If inprogress files use FFB location
if compgen -G "$XTCDIR/$RUNSTR.inprogress" > /dev/null; then
XTCDIR=/sdf/data/lcls/drpsrcf/ffb/"$HUTCH"/"$EXP"/xtc
# If no corresponding xtc files use FFB location
elif ! compgen -G "$XTCDIR/$RUNSTR" > /dev/null; then
XTCDIR=/sdf/data/lcls/drpsrcf/ffb/"$HUTCH"/"$EXP"/xtc
fi


elif [[ $HOSTNAME =~ "drp-srcf" ]]; then
XTCDIR=/cds/data/drpsrcf/${HUTCH}/$EXP/xtc
XTCDIR=/sdf/data/lcls/ds/"$HUTCH"/"$EXP"/xtc
# If inprogress files use FFB location
if compgen -G "$XTCDIR/$RUNSTR.inprogress" > /dev/null; then
XTCDIR=/sdf/data/lcls/drpsrcf/ffb/"$HUTCH"/"$EXP"/xtc
# If no corresponding xtc files use FFB location
elif ! compgen -G "$XTCDIR/$RUNSTR" > /dev/null; then
XTCDIR=/sdf/data/lcls/drpsrcf/ffb/"$HUTCH"/"$EXP"/xtc
fi

echo "Use XTC files from $XTCDIR."
Expand All @@ -476,12 +464,7 @@ if [ $CALIBDIR != 'xxx' ]; then
JFARG=' -C '$CALIBDIR
else
JFARG=''
CALIBDIR=/reg/d/psdm/${HUTCH}/$EXP/calib/
if [[ $HOSTNAME =~ "drp-srcf" ]]; then
CALIBDIR=/cds/data/drpsrcf/${HUTCH}/$EXP/calib/
elif [[ $HOSTNAME =~ "sdf" ]]; then
CALIBDIR=/sdf/data/lcls/ds/${HUTCH}/$EXP/calib/
fi
CALIBDIR=/sdf/data/lcls/ds/${HUTCH}/$EXP/calib/
if [[ $LCLS2 -gt 0 ]]; then
CALIBDIR=${CALIBDIR/calib/scratch}
fi
Expand Down Expand Up @@ -555,13 +538,7 @@ fi
CREATE_TIME=$(date '+%m_%d_%Y_%H:%M:%S')
printf -v RUNSTR "%04g" "$RUN"

if [[ $HOSTNAME =~ "sdf" ]]; then
echo check detectors at SDF:
elif [[ $HOSTNAME =~ "drp-srcf" ]]; then
echo check FFB files:
else
echo Process offline files in psana:
fi
echo Check detectors:

ls -ltr "$XTCDIR"/*r"$RUNSTR"*s*xtc*
if [[ $LCLS2 -gt 0 ]]; then
Expand Down Expand Up @@ -724,17 +701,13 @@ if [[ ( $HAVE_JUNGFRAU -ge 1 ) && ( $WANT_ZYLA -eq 0 ) && ( $WANT_OPAL -eq 0 ) &
DETNAMES=$(grep Jungfrau /tmp/detnames_"$EXP"_"$CREATE_TIME" | awk 'BEGIN { FS = "|"}; {print $1}' | paste -d " " -s)

DSNAME='exp='$EXP':run='$RUN':smd:stream=0-79'
if [ -v OLD_JUNGFRAU ]; then
#get the dataset name
(( RUN1=RUN+1 ))
(( RUN2=RUN+2 ))
DSNAME="exp=$EXP:run=$RUN,$RUN1,$RUN2:smd:stream=0-79"
if [ -v OLD_JUNGFRAU ]; then # Do we need to keep the old JF stuff?
#get the dataset name
(( RUN1=RUN+1 ))
(( RUN2=RUN+2 ))
DSNAME="exp=$EXP:run=$RUN,$RUN1,$RUN2:smd:stream=0-79"
fi
if [[ $HOSTNAME =~ "drp-srcf" ]]; then
DSNAME=$DSNAME':dir=/cds/data/drpsrcf/'$HUTCH'/'$EXP'/xtc/'
elif [[ $HOSTNAME =~ "sdf" ]]; then
DSNAME=$DSNAME':dir='$XTCDIR
fi

#default arguments.
JFARG=$JFARG' -d '$DSNAME
Expand Down

0 comments on commit 9c2736a

Please sign in to comment.