25 const Name myname =
"ProtoDuneChannelRanges::ctor: ";
34 Index nchax = 2*nchaz;
35 Index nchai = nchau + nchav;
36 Index apaIdx[ntps] = {3, 5, 2, 6, 1, 4};
37 string slocs[ntps] = {
"US-RaS",
"US-DaS",
"MS-RaS",
"MS-DaS",
"DS-RaS",
"DS-DaS"};
38 insertLen(
"all", 0, ntps*nchaApa,
"All",
"",
"");
39 for (
Index itps=0; itps<ntps; ++itps ) {
42 string labTps =
"TPC set " + sitps;
43 string labApa =
"APA " + siapa;
44 string sloc = slocs[itps];
45 Index ch0 = itps*nchaApa;
46 string stps =
"tps" + sitps;
47 string sapa =
"apa" + siapa;
48 insertLen( stps, ch0, nchaApa, labTps, sloc, labApa);
49 insertLen( sapa, ch0, nchaApa, labApa, sloc);
50 string stpp =
"tpp" + sitps;
52 Index chv0 = chu0 + nchau;
53 Index chx10 = chv0 + nchav;
54 Index chx20 = chx10 + nchaz;
56 bool beamRight = 2*(itps/2) == itps;
57 Index chz0 = beamRight ? chx20 : chx10;
58 Index chc0 = beamRight ? chx10 : chx20;
59 insertLen(stpp +
"u", chu0, nchau,
"TPC plane " + sitps +
"u", sloc, labApa);
60 insertLen(sapa +
"u", chu0, nchau,
"APA plane " + siapa +
"u", sloc);
61 insertLen(stpp +
"v", chv0, nchav,
"TPC plane " + sitps +
"v", sloc, labApa);
62 insertLen(sapa +
"v", chv0, nchav,
"APA plane " + siapa +
"v", sloc);
63 insertLen(stpp +
"c", chc0, nchaz,
"TPC plane " + sitps +
"c", sloc, labApa);
64 insertLen(sapa +
"c", chc0, nchaz,
"APA plane " + siapa +
"c", sloc);
65 insertLen(stpp +
"z", chz0, nchaz,
"TPC plane " + sitps +
"z", sloc, labApa);
66 insertLen(sapa +
"z", chz0, nchaz,
"APA plane " + siapa +
"z", sloc);
67 insertLen(stpp +
"i", chu0, nchai,
"TPC plane " + sitps +
"i", sloc, labApa);
68 insertLen(sapa +
"i", chu0, nchai,
"APA plane " + siapa +
"i", sloc);
69 insertLen(stpp +
"x", chx0, nchax,
"TPC plane " + sitps +
"x", sloc, labApa);
70 insertLen(sapa +
"x", chx0, nchax,
"APA plane " + siapa +
"x", sloc);
78 for (
Index ifmbOff=0; ifmbOff<20; ++ifmbOff ) {
80 ssnamu << siapa <<
setfill(
'0') <<
setw(2) << ifmbu <<
"u";
81 string namu = ssnamu.str();
82 insertLen(
"femb" + namu, fchu0, nfchau,
"FEMB block " + namu, sloc);
84 ssnamv << siapa <<
setfill(
'0') <<
setw(2) << ifmbv <<
"v";
85 string namv = ssnamv.str();
86 insertLen(
"femb" + namv, fchv0, nfchav,
"FEMB block " + namv, sloc);
88 ssnamx << siapa <<
setfill(
'0') <<
setw(2) << ifmbx <<
"x";
89 string namx = ssnamx.str();
90 insertLen(
"femb" + namx, fchx0, nfchax,
"FEMB block " + namx, sloc);
95 if ( ifmbu > 20 ) ifmbu = 1;
97 if ( ifmbv == 0 ) ifmbv = 20;
98 if ( ifmbOff < 9 ) ifmbx -= 1;
99 else if ( ifmbOff == 9 ) ifmbx = 1;
108 cout << myname <<
"WARNING: Extra range tool not found: " <<
m_ExtraRanges <<
endl;
const IndexRangeTool * m_pExtraRanges
ChannelGroupService::Name Name
void insertLen(Name nam, Index begin, Index len, Name lab, Name lab1="", Name lab2="")
static constexpr double ps
Q_EXPORT QTSManip setw(int w)
Q_EXPORT QTSManip setfill(int f)
std::string to_string(ModuleType const mt)
QTextStream & endl(QTextStream &s)