27 const Name myname =
"ApaChannelRanges::ctor: ";
36 Index nchax = 2*nchaz;
37 Index nchai = nchau + nchav;
42 while ( slocs.size() < ntps ) slocs.push_back(
"");
43 insertLen(
"all", 0, ntps*nchaApa,
"All",
"",
"");
44 for (
Index itps=0; itps<ntps; ++itps ) {
47 string labTps =
"TPC set " + sitps;
48 string labApa =
"APA " + siapa;
49 string sloc = slocs[itps];
50 Index ch0 = itps*nchaApa;
51 string stps =
"tps" + sitps;
52 string sapa =
"apa" + siapa;
53 insertLen( stps, ch0, nchaApa, labTps, sloc, labApa);
54 insertLen( sapa, ch0, nchaApa, labApa, sloc);
55 string stpp =
"tpp" + sitps;
57 Index chv0 = chu0 + nchau;
58 Index chx10 = chv0 + nchav;
59 Index chx20 = chx10 + nchaz;
61 bool beamRight = 2*(itps/2) == itps;
62 Index chz0 = beamRight ? chx20 : chx10;
63 Index chc0 = beamRight ? chx10 : chx20;
64 insertLen(stpp +
"u", chu0, nchau,
"TPC plane " + sitps +
"u", sloc, labApa);
65 insertLen(sapa +
"u", chu0, nchau,
"APA plane " + siapa +
"u", sloc);
66 insertLen(stpp +
"v", chv0, nchav,
"TPC plane " + sitps +
"v", sloc, labApa);
67 insertLen(sapa +
"v", chv0, nchav,
"APA plane " + siapa +
"v", sloc);
68 insertLen(stpp +
"c", chc0, nchaz,
"TPC plane " + sitps +
"c", sloc, labApa);
69 insertLen(sapa +
"c", chc0, nchaz,
"APA plane " + siapa +
"c", sloc);
70 insertLen(stpp +
"z", chz0, nchaz,
"TPC plane " + sitps +
"z", sloc, labApa);
71 insertLen(sapa +
"z", chz0, nchaz,
"APA plane " + siapa +
"z", sloc);
72 insertLen(stpp +
"i", chu0, nchai,
"TPC plane " + sitps +
"i", sloc, labApa);
73 insertLen(sapa +
"i", chu0, nchai,
"APA plane " + siapa +
"i", sloc);
74 insertLen(stpp +
"x", chx0, nchax,
"TPC plane " + sitps +
"x", sloc, labApa);
75 insertLen(sapa +
"x", chx0, nchax,
"APA plane " + siapa +
"x", sloc);
83 for (
Index ifmbOff=0; ifmbOff<20; ++ifmbOff ) {
85 ssnamu << siapa <<
setfill(
'0') <<
setw(2) << ifmbu <<
"u";
86 string namu = ssnamu.str();
87 insertLen(
"femb" + namu, fchu0, nfchau,
"FEMB block " + namu, sloc);
89 ssnamv << siapa <<
setfill(
'0') <<
setw(2) << ifmbv <<
"v";
90 string namv = ssnamv.str();
91 insertLen(
"femb" + namv, fchv0, nfchav,
"FEMB block " + namv, sloc);
93 ssnamx << siapa <<
setfill(
'0') <<
setw(2) << ifmbx <<
"x";
94 string namx = ssnamx.str();
95 insertLen(
"femb" + namx, fchx0, nfchax,
"FEMB block " + namx, sloc);
100 if ( ifmbu > 20 ) ifmbu = 1;
102 if ( ifmbv == 0 ) ifmbv = 20;
103 if ( ifmbOff < 9 ) ifmbx -= 1;
104 else if ( ifmbOff == 9 ) ifmbx = 1;
113 cout << myname <<
"WARNING: Extra range tool not found: " <<
m_ExtraRanges <<
endl;
const IndexRangeTool * m_pExtraRanges
ChannelGroupService::Name Name
NameVector m_ApaLocationNames
static constexpr double ps
Q_EXPORT QTSManip setw(int w)
Q_EXPORT QTSManip setfill(int f)
std::string to_string(ModuleType const mt)
void insertLen(Name nam, Index begin, Index len, Name lab, Name lab1="", Name lab2="")
QTextStream & endl(QTextStream &s)