26 const string myname =
"Dune35tNoiseRemovalService::ctor: ";
27 pset.get_if_present<
int>(
"LogLevel",
m_LogLevel);
38 const unsigned int nchan = m_pGeometry->Nchannels();
39 for (
unsigned int chanon=0; chanon<nchan; ++chanon ) {
40 unsigned int chanoff = m_pChannelMap->Offline(chanon);
42 unsigned int iview = gview;
47 unsigned int rop = ropid.
ROP;
48 unsigned int chan0 = m_pGeometry->FirstChannelInROP(ropid);
49 unsigned int ropchan = chanoff - chan0;
52 unsigned int ropchan = 999;
54 geo::WireID wid = m_pGeometry->ChannelToWire(chanoff).at(0);
55 unsigned int tpcoff = wid.
TPC;
56 if ( gview ==
geo::kW && tpcoff%2 ) iview = 3;
57 unsigned int apachan = chanoff%512;
58 if ( iview == 0 ) ropchan = apachan;
59 if ( iview == 1 ) ropchan = apachan - 144;
60 if ( iview == 2 ) ropchan = apachan - 288;
61 if ( iview == 3 ) ropchan = apachan - 400;
64 static string sview[4] = {
"u",
"v",
"z1",
"z2"};
65 unsigned int apa = m_pChannelMap->APAFromOnlineChannel(chanon);
67 ssrop << apa << sview[iview];
68 string srop = ssrop.str();
70 if ( ropchan < 100 ) ssrop <<
"0";
71 if ( ropchan < 10 ) ssrop <<
"0";
73 string sropchan = ssrop.str();
77 if ( m_GroupingFlag == 0 ) {
79 for (
size_t i = 0; i<3; ++i){
82 for (
unsigned int i=0; i<nchan; ++i){
83 unsigned int plane = m_pChannelMap->PlaneFromOnlineChannel(i);
84 unsigned int rce = m_pChannelMap->RCEFromOnlineChannel(i);
85 unsigned int regulator = m_pChannelMap->RegulatorFromOnlineChannel(i);
88 }
else if ( m_GroupingFlag == 1 ) {
90 for (
size_t i = 0; i<3; ++i){
94 cout << myname <<
"Online channel: plane:RCE:ASIC ROP-ropchan" <<
endl;
96 for (
unsigned int chanon=0; chanon<nchan; ++chanon ) {
97 unsigned int plane = m_pChannelMap->PlaneFromOnlineChannel(chanon);
98 unsigned int rce = m_pChannelMap->RCEFromOnlineChannel(chanon);
99 unsigned int asic = m_pChannelMap->ASICFromOnlineChannel(chanon);
101 cout << myname << chanon <<
": " << plane <<
":" << rce <<
":" << asic
108 cout << myname <<
"ERROR: Invalid GroupingFlag: " << m_GroupingFlag <<
endl;
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
std::ostream & print(std::ostream &out=std::cout, std::string prefix="") const
ROPID_t ROP
Index of the readout plane within its TPC set.
const lbne::ChannelMapService * m_pChannelMap
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
Class identifying a set of planes sharing readout channels.
const geo::Geometry * m_pGeometry
std::vector< std::vector< AdcChannelVector > > m_GroupChannels
Planes which measure W (third view for Bo, MicroBooNE, etc).
TPCID_t TPC
Index of the TPC within its cryostat.
QTextStream & endl(QTextStream &s)
std::map< unsigned int, std::string > m_sRopChannelMap