Skip to content

Commit c40a91d

Browse files
shahor02davidrohr
authored andcommitted
CTF name contains run, TF 1st orbit and ID, + misc fixes
1 parent e7e3e3b commit c40a91d

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/NameConf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class NameConf
101101
static constexpr std::string_view CTFTREENAME = "ctf"; // hardcoded
102102

103103
// CTF Filename
104-
static std::string getCTFFileName(long id, const std::string_view prefix = "o2_ctf");
104+
static std::string getCTFFileName(uint32_t run, uint32_t orb, uint32_t id, const std::string_view prefix = "o2_ctf");
105105

106106
private:
107107
// unmodifiable constants used to construct filenames etc

DataFormats/Detectors/Common/src/NameConf.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ std::string NameConf::getMatLUTFileName(const std::string_view prefix)
8585
return o2::utils::concat_string(prefix, MATBUDLUT, ".root");
8686
}
8787

88-
std::string NameConf::getCTFFileName(long id, const std::string_view prefix)
88+
std::string NameConf::getCTFFileName(uint32_t run, uint32_t orb, uint32_t id, const std::string_view prefix)
8989
{
90-
return o2::utils::concat_string(prefix, "_", fmt::format("{:010d}", id), ".root");
90+
return o2::utils::concat_string(prefix, "_", fmt::format("run{:08d}_orbit{:010d}_tf{:010d}", run, orb, id), ".root");
9191
}

Detectors/CTF/workflow/src/CTFWriterSpec.cxx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,19 +200,17 @@ void CTFWriterSpec::run(ProcessingContext& pc)
200200
{
201201
auto cput = mTimer.CpuTime();
202202
mTimer.Start(false);
203-
auto tfOrb = DataRefUtils::getHeader<o2::header::DataHeader*>(pc.inputs().getByPos(0))->firstTForbit;
203+
const auto dh = DataRefUtils::getHeader<o2::header::DataHeader*>(pc.inputs().getByPos(0));
204204

205205
std::unique_ptr<TFile> fileOut;
206206
std::unique_ptr<TTree> treeOut;
207207
if (mWriteCTF) {
208-
// fileOut.reset(TFile::Open(o2::base::NameConf::getCTFFileName(tfOrb).c_str(), "recreate"));
209-
// RS Until the DPL will propagate the firstTForbit, we will use simple counter in CTF file name to avoid overwriting in case of multiple TFs
210-
fileOut.reset(TFile::Open(o2::base::NameConf::getCTFFileName(mNTF).c_str(), "recreate"));
208+
fileOut.reset(TFile::Open(o2::base::NameConf::getCTFFileName(dh->runNumber, dh->firstTForbit, dh->tfCounter).c_str(), "recreate"));
211209
treeOut = std::make_unique<TTree>(std::string(o2::base::NameConf::CTFTREENAME).c_str(), "O2 CTF tree");
212210
}
213211

214212
// create header
215-
CTFHeader header{mRun, tfOrb};
213+
CTFHeader header{mRun, dh->firstTForbit};
216214

217215
processDet<o2::itsmft::CTF>(pc, DetID::ITS, header, treeOut.get());
218216
processDet<o2::itsmft::CTF>(pc, DetID::MFT, header, treeOut.get());

prodtests/full-system-test/dpl-workflow.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ fi
8484
if [ $CTFINPUT == 1 ]; then
8585
TPC_INPUT=compressed-clusters-ctf
8686
TOF_INPUT=digits
87-
WORKFLOW="o2-ctf-reader-workflow --ctf-input o2_ctf_0000000000.root --onlyDet $CTF_DETECTORS $ARGS_ALL | "
87+
CTFName=`ls -t o2_ctf_*.root | head -n1`
88+
WORKFLOW="o2-ctf-reader-workflow --ctf-input ${CTFName} --onlyDet $CTF_DETECTORS $ARGS_ALL | "
8889
elif [ $EXTINPUT == 1 ]; then
8990
WORKFLOW="o2-dpl-raw-proxy $ARGS_ALL --dataspec \"FLP:FLP/DISTSUBTIMEFRAME/0;B:TPC/RAWDATA;C:ITS/RAWDATA;D:TOF/RAWDATA;D:MFT/RAWDATA;E:FT0/RAWDATA;F:MID/RAWDATA;G:EMC/RAWDATA;H:PHS/RAWDATA;I:CPV/RAWDATA;J:ZDC/RAWDATA;K:HMP/RAWDATA;L:FDD/RAWDATA\" --channel-config \"name=readout-proxy,type=pull,method=connect,address=ipc://@stfb-to-dpl,transport=shmem,rateLogging=0\" | "
9091
else

prodtests/full_system_test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ NHBPERTF=${NHBPERTF:-128}
3636
RUNFIRSTORBIT=${RUNFIRSTORBIT:-0}
3737
FIRSTSAMPLEDORBIT=${FIRSTSAMPLEDORBIT:-0}
3838

39+
[ "$FIRSTSAMPLEDORBIT" -lt "$RUNFIRSTORBIT" ] && FIRSTSAMPLEDORBIT=$RUNFIRSTORBIT
40+
3941
# allow skipping
4042
JOBUTILS_SKIPDONE=ON
4143
# enable memory monitoring (independent on whether DPL or not)
@@ -66,7 +68,7 @@ QED2HAD=$(awk "BEGIN {printf \"%.2f\",`grep xSectionQED qedgenparam.ini | cut -d
6668
echo "Obtained ratio of QED to hadronic x-sections = $QED2HAD" >> qedsim.log
6769
cd ..
6870

69-
DIGITRDOPTREAL="--configKeyValues \"${HBFUTILPARAMS};TRDSimParams.digithreads=${NJOBS}\" --enable-trd-trapsim"
71+
DIGITRDOPTREAL="--configKeyValues \"${HBFUTILPARAMS};TRDSimParams.digithreads=${NJOBS}\" "
7072
if [ $SPLITTRDDIGI == "1" ]; then
7173
DIGITRDOPT="--configKeyValues \"${HBFUTILPARAMS}\" --skipDet TRD"
7274
else

0 commit comments

Comments
 (0)