26 const Name myname =
"HalfApaChannelRanges::ctor: ";
35 Index nchax = 2*nchaz;
36 Index nchai = nchau + nchav;
38 insertLen(
"all", 0, ntps*nchaApa,
"All",
"");
39 for (
Index itps=0; itps<ntps; ++itps ) {
46 string labTps =
"TPC set " + sitps;
47 string labApa =
"APA " + siapa;
49 Index ch0 = itps*nchaApa;
50 string stps =
"tps" + sitps;
51 string sapa =
"apa" + siapa;
52 insertLen( stps, ch0, nchaApa, labTps, labApa);
54 string stpp =
"tpp" + sitps;
56 Index chv0 = chu0 + nchau;
57 Index chx10 = chv0 + nchav;
58 Index chx20 = chx10 + nchaz;
60 bool beamRight = 2*(itps/2) == itps;
61 Index chz0 = beamRight ? chx20 : chx10;
62 Index chc0 = beamRight ? chx10 : chx20;
63 insertLen(stpp +
"u", chu0, nchau,
"TPC plane " + sitps +
"u", labApa);
64 insertLen(sapa +
"u", chu0, nchau,
"APA plane " + siapa +
"u");
65 insertLen(stpp +
"v", chv0, nchav,
"TPC plane " + sitps +
"v", labApa);
66 insertLen(sapa +
"v", chv0, nchav,
"APA plane " + siapa +
"v");
67 insertLen(stpp +
"z1", chc0, nchaz,
"TPC plane " + sitps +
"z1", labApa);
68 insertLen(sapa +
"z1", chc0, nchaz,
"APA plane " + siapa +
"z1");
69 insertLen(stpp +
"z2", chz0, nchaz,
"TPC plane " + sitps +
"z2", labApa);
70 insertLen(sapa +
"z2", chz0, nchaz,
"APA plane " + siapa +
"z2");
71 insertLen(stpp +
"i", chu0, nchai,
"TPC planes " + sitps +
"i", labApa);
72 insertLen(sapa +
"i", chu0, nchai,
"APA planes " + siapa +
"i");
73 insertLen(stpp +
"x", chx0, nchax,
"TPC planes " + sitps +
"x", labApa);
74 insertLen(sapa +
"x", chx0, nchax,
"APA planes " + siapa +
"x");
75 insertLen(stpp +
"z", chx0, nchax,
"collection planes " + sitps, labApa);
76 insertLen(sapa +
"z", chx0, nchax,
"collection planes " + siapa);
84 for (
Index ifmbOff=0; ifmbOff<20; ++ifmbOff ) {
86 ssnamu << siapa <<
setfill(
'0') <<
setw(2) << ifmbu <<
"u";
87 string namu = ssnamu.str();
88 insertLen(
"femb" + namu, fchu0, nfchau,
"FEMB block " + namu);
90 ssnamv << siapa <<
setfill(
'0') <<
setw(2) << ifmbv <<
"v";
91 string namv = ssnamv.str();
92 insertLen(
"femb" + namv, fchv0, nfchav,
"FEMB block " + namv);
94 ssnamx << siapa <<
setfill(
'0') <<
setw(2) << ifmbx <<
"x";
95 string namx = ssnamx.str();
96 insertLen(
"femb" + namx, fchx0, nfchax,
"FEMB block " + namx);
101 if ( ifmbu > 10 ) ifmbu = 1;
103 if ( ifmbv == 0 ) ifmbv = 10;
104 if ( ifmbOff < 4 ) ifmbx -= 1;
105 else if ( ifmbOff == 4 ) ifmbx = 1;
114 cout << myname <<
"WARNING: Extra range tool not found: " <<
m_ExtraRanges <<
endl;
void insertLen(Name nam, Index begin, Index len, Name lab, Name lab1="", Name lab2="")
ChannelGroupService::Name Name
static constexpr double ps
Q_EXPORT QTSManip setw(int w)
const IndexRangeTool * m_pExtraRanges
Q_EXPORT QTSManip setfill(int f)
std::string to_string(ModuleType const mt)
QTextStream & endl(QTextStream &s)