Skip to content

Commit 02dc045

Browse files
committed
Ensure tex file is saved in correct area
1 parent df8562a commit 02dc045

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

sbndcode/CRT/CRTEventDisplay/build_tex.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ echo "\documentclass{article}
1919
\usepackage[hidelinks]{hyperref}
2020
2121
\title{SBND CRT Channel Mapping Displays \\\\ \vspace{1em} \small \textit{Produced using} \texttt{sbndcode ${version}} \textit{\&} \texttt{${gdml}}}
22-
\author{${author} \\\\ \small ${email}}" > crt_channel_mapping_evds.tex
22+
\author{${author} \\\\ \small ${email}}" > ${basedir}/tex_work/crt_channel_mapping_evds.tex
2323

2424
walls=(bottom south north west east toplow tophigh)
2525
wallnames=(Bottom South North West East "Top Low" "Top High")
2626

2727
for wall in "${walls[@]}"
2828
do
2929
list=$(ls ${basedir}/${wall}_wall/*_front.pdf)
30-
echo -n "\newcommand*{\\"$wall"ids}{" >> crt_channel_mapping_evds.tex
30+
echo -n "\newcommand*{\\"$wall"ids}{" >> ${basedir}/tex_work/crt_channel_mapping_evds.tex
3131

3232
for item in ${list}
3333
do
3434
name=$(echo $item | cut -d '/' -f 10)
3535
number=$(echo $name | cut -d '_' -f 2)
36-
echo -n $number, >> crt_channel_mapping_evds.tex
36+
echo -n $number, >> ${basedir}/tex_work/crt_channel_mapping_evds.tex
3737
done
3838

39-
sed -i '$ s/.$//' crt_channel_mapping_evds.tex
40-
echo "}" >> crt_channel_mapping_evds.tex
39+
sed -i '$ s/.$//' ${basedir}/tex_work/crt_channel_mapping_evds.tex
40+
echo "}" >> ${basedir}/tex_work/crt_channel_mapping_evds.tex
4141
done
4242

4343
echo "\begin{document}
@@ -57,7 +57,7 @@ echo "\begin{document}
5757
\newpage
5858
\section{Explanation}
5959
This document contains a series of illustrations created using the \texttt{CRTEventDisplay} tool originally written by Tom Brooks \& heavily developed by myself. It shows the position of the various CRT modules according to the gdml file used in SBND simulation and reconstruction. The document is split into sections for the different tagger walls. For each module three illustrations are provided: front, top and side views. The axes show detector coordinates (X, Y and Z) and \`\`building coordinates\" (North, West and Up). The relevant module is shown in green. The TPCs are shown in grey in the centre for reference. The black outer is the full tagger wall. The thin grey are other modules in the wall. The red is the FEB position and the blue corresponds to the end of the FEB with channel 0 (the ethernet ports).
60-
" >> crt_channel_mapping_evds.tex
60+
" >> ${basedir}/tex_work/crt_channel_mapping_evds.tex
6161

6262
for i in "${!walls[@]}"
6363
do
@@ -74,10 +74,10 @@ do
7474
\includegraphics[width=.85\textwidth]{${basedir}/${walls[i]}_wall/volCRTModule\x_\x_side.pdf}
7575
\end{center}
7676
}
77-
\endgroup" >> crt_channel_mapping_evds.tex
77+
\endgroup" >> ${basedir}/tex_work/crt_channel_mapping_evds.tex
7878
done
7979

80-
echo "\end{document}" >> crt_channel_mapping_evds.tex
80+
echo "\end{document}" >> ${basedir}/tex_work/crt_channel_mapping_evds.tex
8181

82-
pdflatex --shell-escape -output-directory ${basedir}/tex_work crt_channel_mapping_evds.tex
83-
pdflatex --shell-escape -output-directory ${basedir}/tex_work crt_channel_mapping_evds.tex
82+
pdflatex --shell-escape -output-directory ${basedir}/tex_work ${basedir}/tex_work/crt_channel_mapping_evds.tex
83+
pdflatex --shell-escape -output-directory ${basedir}/tex_work ${basedir}/tex_work/crt_channel_mapping_evds.tex

0 commit comments

Comments
 (0)