Skip to content

Commit

Permalink
TriggerDataDecoder and MRDTracks minor bug fix (#292)
Browse files Browse the repository at this point in the history
* Update FindMrdTracks.cpp

Don't hault the toolchain if there are no MRD tracks

* Update TriggerDataDecoder.cpp

Triggers are stored to the buffer - clear it to speed up the tool. Also adding verbosity conditions on std out

* Update LoadRawDataConfig

Wrong config variables - now it should work out of the box as intended

* Update CreateMyList.sh

Rather than passing the path of the RAWData file to the bash script, add it hard coded. Not great practice but this script is used for a very specific purpose to generate a list file containing part files from the RAWData, and the data location has not changed in years (and likely won't change for now).

* Update FindMrdTracks.cpp

revert changes
  • Loading branch information
S81D authored Nov 15, 2024
1 parent ae71732 commit d1024ca
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
8 changes: 7 additions & 1 deletion UserTools/TriggerDataDecoder/TriggerDataDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,17 @@ bool TriggerDataDecoder::Initialise(std::string configfile, DataModel &data){
bool TriggerDataDecoder::Execute(){

if (mode == "EventBuilding"){

processed_sources.clear();
processed_ns.clear();

m_data->CStore.Set("NewCTCDataAvailable",false);
bool PauseCTCDecoding = false;
m_data->CStore.Get("PauseCTCDecoding",PauseCTCDecoding);
if (PauseCTCDecoding){
if(verbosity > 0){
std::cout << "TriggerDataDecoder tool: Pausing trigger decoding to let Tank and MRD data catch up..." << std::endl;
}
return true;
}
//Clear decoding maps if a new run/subrun is encountered
Expand Down Expand Up @@ -98,7 +104,7 @@ bool TriggerDataDecoder::Execute(){
}
bool new_ts_available = false;
std::vector<uint32_t> aTimeStampData = Tdata->TimeStampData;
std::cout <<"aTimeStampData.size(): "<<aTimeStampData.size()<<std::endl;
if(verbosity>0) std::cout <<"aTimeStampData.size(): "<<aTimeStampData.size()<<std::endl;
for(int i = 0; i < (int) aTimeStampData.size(); i++){
if(verbosity>v_debug) std::cout<<"TriggerDataDecoder Tool: Loading next TrigData from entry's index " << i <<std::endl;
new_ts_available = this->AddWord(aTimeStampData.at(i));
Expand Down
7 changes: 3 additions & 4 deletions configfiles/EventBuilderRaw/LoadRawDataConfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
verbosity 0
BuildType TankAndCTC
#BuildType CTC
Mode FileList
InputFile ./configfiles/DataDecoder/my_files.txt
InputFile ./configfiles/EventBuilderRaw/my_files.txt
DummyRunInfo 1
StoreTrigOverlap 0
ReadTrigOverlap 1
StoreRawData 0
ReadTrigOverlap 0
StoreRawData 1
18 changes: 10 additions & 8 deletions configfiles/PreProcessTrigOverlap/CreateMyList.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
if [ "$#" -ne 2 ]; then
echo "Usage: ./CreateMyList.sh DIR RUN"
echo "Specified input variable must contain the directory where the files are stored, second variable run number"
if [ "$#" -ne 1 ]; then
echo "Usage: ./CreateMyList.sh RUN"
echo "Specified input variable must contain the run number"
exit 1
fi

FILEDIR=$1
RUN=$2
RUN=$1
DIR=/pnfs/annie/persistent/raw/raw/

NUMFILES=$(ls -1q ${FILEDIR}/RAWDataR${RUN}* | wc -l)
NUMFILES=$(ls -1q ${DIR}${RUN}/RAWDataR${RUN}* | wc -l)

echo "NUMBER OF FILES IN ${FILEDIR}: ${NUMFILES}"
echo "NUMBER OF FILES IN ${DIR}${RUN}: ${NUMFILES}"

rm my_files.txt

for p in $(seq 0 $(($NUMFILES -1 )))
do
echo "${FILEDIR}/RAWDataR${RUN}S0p${p}" >> my_files.txt
echo "${DIR}${RUN}/RAWDataR${RUN}S0p${p}" >> my_files.txt
done

0 comments on commit d1024ca

Please sign in to comment.