Skip to content

Commit 8a96fc0

Browse files
authored
TRD trap2raw make file writing option consistent with what the other detectors are doing (#9822)
1 parent 73ca913 commit 8a96fc0

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Detectors/TRD/simulation/src/Trap2CRU.cxx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,17 +251,21 @@ void Trap2CRU::readTrapData()
251251
// filename structure of trd_cru_[CRU#]_[upper/lower].raw
252252
auto flpid = trdHWMap[mCruID].flpid;
253253
auto cruhwid = trdHWMap[mCruID].cruHWID;
254-
if (mFilePer == "all") { // single file for all links
254+
if (mFilePer == "all") {
255+
// single file for all links
255256
outFileLink = o2::utils::Str::concat_string(mOutputDir, "/", outPrefix, outSuffix);
256257
} else if (mFilePer == "sm") {
258+
// one file per supermodule
257259
int sm = link / 4;
258260
std::stringstream ss;
259261
ss << std::setw(2) << std::setfill('0') << sm;
260262
std::string supermodule = ss.str();
261263
outFileLink = o2::utils::Str::concat_string(mOutputDir, "/", outPrefix, "_sm_", supermodule, outSuffix);
262-
} else if (mFilePer == "cru") {
264+
} else if (mFilePer == "fullcru") {
265+
// one file per CRU (both end points combined)
263266
outFileLink = o2::utils::Str::concat_string(mOutputDir, "/", outPrefix, std::to_string(flpid), "_cru", std::to_string(cruhwid), outSuffix);
264-
} else if (mFilePer == "halfcru") {
267+
} else if (mFilePer == "cru") {
268+
// one file per CRU end point
265269
outFileLink = o2::utils::Str::concat_string(mOutputDir, "/", outPrefix, std::to_string(flpid), "_cru", std::to_string(cruhwid), "_", std::to_string(mEndPointID), outSuffix);
266270
} else {
267271
throw std::runtime_error("invalid option provided for file grouping");

0 commit comments

Comments
 (0)