13 using std::ostringstream;
14 using std::istringstream;
25 : m_LogLevel(ps.
get<
Index>(
"LogLevel")),
27 m_IndexRangeTool(ps.
get<
Name>(
"IndexRangeTool")) {
28 const Name myname =
"ApaChannelGroups::ctor: ";
36 cout << myname <<
"WARNING: No Index range tool name." <<
endl;
40 bool singleApa = napa == 0;
44 m_labels[
"tpss"].push_back(
"TPC sets");
46 NameVector soris = {
"z",
"c",
"x",
"u",
"v",
"i",
"z1",
"z2"};
47 for (
Name sori : soris ) {
48 m_labels[
"tpp" + sori +
"s"].push_back(sori +
" planes");
49 m_labels[
"apa" + sori +
"s"].push_back(sori +
" planes");
51 for (
Index itps=0; itps<napa; ++itps ) {
63 m_groups[
"tpss"].push_back(
"tps" + stps);
64 m_groups[
"apas"].push_back(
"apa" + sapa);
65 for (
Name sori : soris ) {
66 m_groups[
"tpp" + sori +
"s"].push_back(
"tpp" + stps + sori);
67 m_groups[
"apa" + sori +
"s"].push_back(
"apa" + sapa + sori);
71 for (
Index itps=0; itps<napa; ++itps ) {
79 for (
Index ifmb=1; ifmb<=nfmb; ++ifmb ) {
81 ssgrp <<
"femb" << sapa;
82 if ( ifmb < 10 ) ssgrp <<
"0";
84 Name sgrp = ssgrp.str();
85 m_groups[sgrp].push_back(sgrp +
"u");
86 m_groups[sgrp].push_back(sgrp +
"v");
87 m_groups[sgrp].push_back(sgrp +
"x");
88 Name slab =
"FEMB " + sgrp.substr(4);
100 const Name myname =
"ApaChannelGroups::get: ";
101 if ( nam ==
"list" ) {
103 cout << myname <<
"Available groups: ";
105 for (
const auto& igrp :
m_groups ) {
106 if ( first ) first =
false;
114 if (
m_LogLevel >= 2 ) cout << myname <<
"No IndexRangeTool." <<
endl;
119 if (
m_LogLevel >= 2 ) cout << myname <<
"Invalid group name: " << nam <<
endl;
123 for (
Name rnam : igrp->second ) {
const IndexRangeTool * m_pIndexRangeTool
std::vector< IndexRange > RangeVector
IndexRangeGroup::Index Index
ChannelGroupService::Name Name
IndexRangeGroup get(Name nam) const override
ApaChannelGroups(fhicl::ParameterSet const &ps)
std::vector< Index > IndexVector
static constexpr double ps
Q_EXPORT QTSManip setw(int w)
std::vector< Name > NameVector
auto const & get(AssnsNode< L, R, D > const &r)
Q_EXPORT QTSManip setfill(int f)
QTextStream & endl(QTextStream &s)