This commit is contained in:
Ryan Tang 2023-03-28 17:09:58 -04:00
parent c5aa32e3c4
commit 0970fcd77f
7 changed files with 106 additions and 1 deletions

3
.gitignore vendored
View File

@ -4,4 +4,5 @@ working/Settings
EventBuilder EventBuilder
*.root *.root
data_raw data_raw
root_data

23
SOLARIS.sh Normal file
View File

@ -0,0 +1,23 @@
#=================== Main
unset SOLARISSYS
SOURCE=${BASH_ARGV[0]}
PCName=$(uname -n)
if [ $(uname -n) == "solaris-daq" ]; then
SOLARISSYS=~/Analysis
else
if [ $(pwd) == $HOME ]; then
SOLARISSYS=$(dirname ${SOURCE})
if [[ ${SOLARISSYS} == *"$HOME"* ]]; then
dummpy=0
else
SOLARISSYS=${HOME}/$SOLARISSYS
fi
else
SOLARISSYS=$(pwd)
fi
fi
export SOLARISSYS

28
SetupNewExp Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
###################################################
##
## This is a script for Setup/switch Experiment
##
##
##
####################################################
# this will define global enviroment varibales, like the analysis path, export armory
source SOLARIS.sh
# Check git
#need to distingish mac and daq
#create working/expName.sh
# create folders
# data_raw = /mnt/data0/${expName}
# root_data = /mnt/data1/${expName}

View File

@ -134,10 +134,15 @@ int main(int argc, char ** argv){
} }
//^=========================================== //^===========================================
printf("================================= \n");
int fileID = 0; int fileID = 0;
findEarliestTime(nFile, fileID); findEarliestTime(nFile, fileID);
fillData(fileID, saveTrace); fillData(fileID, saveTrace);
int last_precentage = 0;
unsigned count = 1; unsigned count = 1;
while(count < totNumEvent){ while(count < totNumEvent){
@ -158,11 +163,20 @@ int main(int argc, char ** argv){
} }
count ++; count ++;
int percentage = count * 100/totNumEvent;
if( percentage > last_precentage ) {
printf("Processed : %u, %.0f%% \n\033[A\r", count, count*100./totNumEvent);
last_precentage = percentage;
}
} }
outRootFile->cd(); outRootFile->cd();
tree->Write(); tree->Write();
printf("===================================== done. ");
printf("Number of Event Built is %lld .\n", evID);
//^############## delete new //^############## delete new
for( int i = 0; i < nFile; i++) delete reader[i]; for( int i = 0; i < nFile; i++) delete reader[i];

View File

@ -0,0 +1 @@
#!/bin/bash

37
armory/Process_Run Executable file
View File

@ -0,0 +1,37 @@
#!/bin/bash
if [ $# -eq 0 ] || [ $1 == "-help" ]; then
echo "$ Proess_Run [RunNum] [EventBuild] [Monitor]"
echo " RunNum = run number / \"lastRun\" "
echo " EventBld = 2/1/0/-1/-2 || 2 = with Trace"
echo " Monitors = 2/1/0 || 1 = single run, 2 = using the list in ChainMonitors.C"
echo " 10 = single run and post to websrv, 20 = list runs and post to websrv"
echo ""
echo " **** When feeding trace data to Monitors, the EventBld flag must be 2 or -2."
echo ""
exit 1
fi;
RUN=$1
EventBld=$2
#padding
if [ "${RUN:0:1}" == "0" ]; then
RUN=${RUN:1:2}
else
RUN=$(printf '%d' $RUN)
fi
RUN=$(printf '%03d' ${RUN})
source ~/Analysis/working/expName.sh
ls -1 ${rawDataPath}/${expName}_${RUN}_*
if [ ${EventBld} -neq 0 ]; then
if [ ${EventBld} -eq 1 ]; then
./EventBuilder ${rawDataPath}/${expName}_${RUN}.root 100 0 `ls -1 ${rawDataPath}/${expName}_${RUN}_*`
fi
fi

View File

@ -1,5 +1,6 @@
expName=Master expName=Master
rawDataPath=/mnt/data0/Master rawDataPath=/mnt/data0/Master
rootDataPath=/mnt/data1/Master
runID=1 runID=1
elogID=14 elogID=14
//------------end of file. //------------end of file.