49 LOG_INFO(
"CMap") <<
"Adding exception " << chan1 <<
"->" << chan2;
54 for (
size_t i=0;
i<chan1.length(); ++
i) {
55 if (chan1[
i] ==
'-') ndashes1++;
57 for (
size_t i=0;
i<chan2.length(); ++
i) {
58 if (chan2[
i] ==
'-') ndashes2++;
61 if ((ndashes1 != ndashes2) || ndashes1==0) {
62 LOG_ERROR(
"CMap") <<
"Mismatch in string formats for the two channels! Please use either [diblock]-[dcm]-[feb], [diblock]-[dcm]-[feb]-[pixel], or [plane]-[cell].";
70 sscanf(chan1.c_str(),
"%d-%d",&
plane,&
cell);
73 sscanf(chan2.c_str(),
"%d-%d",&
plane,&
cell);
78 else if (ndashes1==3) {
79 sscanf(chan1.c_str(),
"%d-%d-%d-%d",&
db,&
dcm,&
feb,&pixel);
81 sscanf(chan2.c_str(),
"%d-%d-%d-%d",&
db,&
dcm,&
feb,&pixel);
85 else if (ndashes1==2) {
86 sscanf(chan1.c_str(),
"%d-%d-%d",&
db,&
dcm,&
feb);
88 sscanf(chan2.c_str(),
"%d-%d-%d",&
db,&
dcm,&
feb);
90 for (
int i=0;
i<32; ++
i) {
95 LOG_ERROR(
"CMap") <<
"Channel string format unsupported. Please use either [diblock]-[dcm]-[feb], [diblock]-[dcm]-[feb]-[pixel], or [plane]-[cell].";
118 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
135 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
150 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
166 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
181 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
196 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
211 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
227 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
243 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
258 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
274 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
287 if (!dig)
return 30000;
293 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
308 if (!dig)
return 30000;
314 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
329 if (!dig)
return 30000;
336 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
350 if (!dig)
return 30000;
357 LOG_DEBUG(
"CMap") <<
"Exceptions enabled.";
#define LOG_DEBUG(stream)
daqchannelmap::lchan encodeLChan(int detId, int plane, int cell)
int getDetector(uint32_t anychan) const
int getDiBlock(daqchannelmap::dchan)
int getPixel(daqchannelmap::dchan)
virtual DetView_TYPE getView(dchan daqchan) const =0
Which view (X or Y) does this daq channel readout?
const daqchannelmap::DAQChannelMap * Map() const
std::unordered_map< daqchannelmap::dchan, daqchannelmap::dchan > fExceptionsMap
cell_t getCell(lchan logicalchan) const
Decode the cell number from an lchan.
lchan encodeLChan(int detId, plane_t plane, cell_t cell) const
int getDetector(daqchannelmap::dchan)
block
print "ROW IS " print row
uint32_t DaqChannel() const
int getCell(daqchannelmap::lchan)
unsigned short GetPlane(const rawdata::RawDigit *dig)
void AddException(int idet, geo::OfflineChan chan1, geo::OfflineChan chan2)
unsigned short Plane() const
int getDCM(daqchannelmap::dchan)
int computeBlock(daqchannelmap::lchan)
pixel_t getPixel(dchan daqchan) const
Decode the pixel id from a dchan.
int getFEB(daqchannelmap::dchan)
A rawdata::RawDigit with channel information decoded.
unsigned short Cell() const
int getPlane(daqchannelmap::lchan)
plane_t getPlane(lchan logicalchan) const
Decode the plane number from an lchan.
unsigned short GetCell(const rawdata::RawDigit *dig)
daqchannelmap::dchan encodeDChan(daqchannelmap::lchan)
cmap::CMap class source code
dcm_id_t getDCM(dchan daqchan) const
Decode the dcm ID from a dchan.
int getView(daqchannelmap::dchan)
dchan encodeDChan(int detID, diblock_t diblock, dcm_id_t dcm, feb_t feb, pixel_t pixel) const
virtual block_t computeBlock(lchan logicalchan) const =0
Which block is this lchan in?
uint32_t dchan
< DAQ Channel Map Package
diblock_t getDiBlock(dchan daqchan) const
Decode the diblock ID from a dchan.
#define LOG_ERROR(stream)
const daqchannelmap::DAQChannelMap * fStdMap
feb_t getFEB(dchan daqchan) const
Decode the feb id from a dchan.