Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
dune::IcebergChannelMapService Class Reference

#include <IcebergChannelMapService.h>

Public Types

enum  _FelixOrRCE { kRCE, kFELIX }
 
typedef enum dune::IcebergChannelMapService::_FelixOrRCE FelixOrRCE
 

Public Member Functions

 IcebergChannelMapService (fhicl::ParameterSet const &pset)
 
 IcebergChannelMapService (fhicl::ParameterSet const &pset, art::ActivityRegistry &)
 
unsigned int GetOfflineNumberFromDetectorElements (unsigned int crate, unsigned int slot, unsigned int fiber, unsigned int fembchannel, FelixOrRCE frswitch)
 
unsigned int APAFromOfflineChannel (unsigned int offlineChannel) const
 Returns APA/crate. More...
 
unsigned int InstalledAPAFromOfflineChannel (unsigned int offlineChannel) const
 Returns APA/crate in installation notation. More...
 
unsigned int WIBFromOfflineChannel (unsigned int offlineChannel) const
 Returns WIB/slot. More...
 
unsigned int FEMBFromOfflineChannel (unsigned int offlineChannel) const
 Returns FEMB/fiber. More...
 
unsigned int FEMBChannelFromOfflineChannel (unsigned int offlineChannel) const
 Returns FEMB channel. More...
 
unsigned int StreamChannelFromOfflineChannel (unsigned int offlineChannel, FelixOrRCE frswitch) const
 Returns RCE(FELIX) stream(frame) channel. More...
 
unsigned int SlotIdFromOfflineChannel (unsigned int offlineChannel) const
 Returns global slot ID. More...
 
unsigned int FiberIdFromOfflineChannel (unsigned int offlineChannel) const
 Returns global fiber ID. More...
 
unsigned int ChipFromOfflineChannel (unsigned int offlineChannel) const
 Returns chip number. More...
 
unsigned int ChipChannelFromOfflineChannel (unsigned int offlineChannel) const
 Returns chip channel number. More...
 
unsigned int ASICFromOfflineChannel (unsigned int offlineChannel)
 Returns ASIC number – to be deprecated. More...
 
unsigned int ASICChannelFromOfflineChannel (unsigned int offlineChannel)
 Returns ASIC channel number – to be deprecated. More...
 
unsigned int AsicFromOfflineChannel (unsigned int offlineChannel) const
 
unsigned int AsicChannelFromOfflineChannel (unsigned int offlineChannel) const
 
unsigned int AsicLinkFromOfflineChannel (unsigned int offlineChannel) const
 
unsigned int PlaneFromOfflineChannel (unsigned int offlineChannel) const
 Returns plane. More...
 
unsigned int SSPOfflineChannelFromOnlineChannel (unsigned int onlineChannel)
 
unsigned int SSPOnlineChannelFromOfflineChannel (unsigned int offlineChannel) const
 
unsigned int SSPAPAFromOfflineChannel (unsigned int offlineChannel) const
 
unsigned int SSPWithinAPAFromOfflineChannel (unsigned int offlineChannel) const
 
unsigned int SSPGlobalFromOfflineChannel (unsigned int offlineChannel) const
 
unsigned int SSPChanWithinSSPFromOfflineChannel (unsigned int offlineChannel) const
 
unsigned int OpDetNoFromOfflineChannel (unsigned int offlineChannel) const
 

Private Member Functions

size_t count_bits (size_t i)
 
void check_offline_channel (unsigned int offlineChannel) const
 
void SSP_check_offline_channel (unsigned int offlineChannel) const
 

Private Attributes

const size_t fNChans = 1280
 
const size_t fNCrates = 1
 
const size_t fNSlots = 3
 
const size_t fNFibers = 4
 
const size_t fNFEMBChans = 128
 
const size_t fNSSPChans = 288
 
const size_t fNChansPerSSP = 12
 
const size_t fNAPAs = 6
 
size_t fBadCrateNumberWarningsIssued
 
size_t fBadSlotNumberWarningsIssued
 
size_t fBadFiberNumberWarningsIssued
 
size_t fSSPBadChannelNumberWarningsIssued
 
size_t fASICWarningsIssued
 
size_t fASICChanWarningsIssued
 
unsigned int farrayCsfcToOffline [1][3][4][128]
 
unsigned int fvAPAMap [1280]
 
unsigned int fvWIBMap [1280]
 
unsigned int fvFEMBMap [1280]
 
unsigned int fvFEMBChannelMap [1280]
 
unsigned int fvStreamChannelMap [1280]
 
unsigned int fvSlotIdMap [1280]
 
unsigned int fvFiberIdMap [1280]
 
unsigned int fvChipMap [1280]
 
unsigned int fvChipChannelMap [1280]
 
unsigned int fvASICMap [1280]
 
unsigned int fvASICChannelMap [1280]
 
unsigned int fvPlaneMap [1280]
 
unsigned int fFELIXarrayCsfcToOffline [6][5][4][128]
 
unsigned int fFELIXvAPAMap [1280]
 
unsigned int fFELIXvWIBMap [1280]
 
unsigned int fFELIXvFEMBMap [1280]
 
unsigned int fFELIXvFEMBChannelMap [1280]
 
unsigned int fFELIXvStreamChannelMap [1280]
 
unsigned int fFELIXvSlotIdMap [1280]
 
unsigned int fFELIXvFiberIdMap [1280]
 
unsigned int fFELIXvChipMap [1280]
 
unsigned int fFELIXvChipChannelMap [1280]
 
unsigned int fFELIXvASICMap [1280]
 
unsigned int fFELIXvASICChannelMap [1280]
 
unsigned int fFELIXvPlaneMap [1280]
 
unsigned int farraySSPOnlineToOffline [288]
 
unsigned int farraySSPOfflineToOnline [288]
 
unsigned int fvSSPAPAMap [288]
 
unsigned int fvSSPWithinAPAMap [288]
 
unsigned int fvSSPGlobalMap [288]
 
unsigned int fvSSPChanWithinSSPMap [288]
 
unsigned int fvOpDetNoMap [288]
 

Detailed Description

Definition at line 28 of file IcebergChannelMapService.h.

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
kRCE 
kFELIX 

Definition at line 35 of file IcebergChannelMapService.h.

Constructor & Destructor Documentation

dune::IcebergChannelMapService::IcebergChannelMapService ( fhicl::ParameterSet const &  pset)

Definition at line 19 of file IcebergChannelMapService_service.cc.

19  {
20 
27 
28  std::string channelMapFile = pset.get<std::string>("FileName");
29 
30  std::string fullname;
31  cet::search_path sp("FW_SEARCH_PATH");
32  sp.find_file(channelMapFile, fullname);
33 
34  if (fullname.empty()) {
35  std::cout << "Input file " << channelMapFile << " not found" << std::endl;
36  throw cet::exception("File not found");
37  }
38  else
39  std::cout << "Iceberg Channel Map: Building RCE TPC wiremap from file " << channelMapFile << std::endl;
40 
41  std::ifstream inFile(fullname, std::ios::in);
43 
44  while (std::getline(inFile,line)) {
45  unsigned int crateNo, slotNo, fiberNo, FEMBChannel, StreamChannel, slotID, fiberID, chipNo, chipChannel, asicNo, asicChannel, planeType, offlineChannel;
46  std::stringstream linestream(line);
47  linestream >> crateNo >> slotNo >> fiberNo>> FEMBChannel >> StreamChannel >> slotID >> fiberID >> chipNo >> chipChannel >> asicNo >> asicChannel >> planeType >> offlineChannel;
48 
49  // fill lookup tables. Throw an exception if any number is out of expected bounds.
50  // checking for negative values produces compiler warnings as these are unsigned ints
51 
52  if (offlineChannel >= fNChans)
53  {
54  throw cet::exception("IcebergChannelMapService") << "Ununderstood Offline Channel: " << offlineChannel << "\n";
55  }
56  if (crateNo >= fNCrates)
57  {
58  throw cet::exception("IcebergChannelMapService") << "Ununderstood Crate Number: " << crateNo << "\n";
59  }
60  if (slotNo >= fNSlots)
61  {
62  throw cet::exception("IcebergChannelMapService") << "Ununderstood Slot Number: " << slotNo << "\n";
63  }
64  if (fiberNo >= fNFibers)
65  {
66  throw cet::exception("IcebergChannelMapService") << "Ununderstood Fiber Number: " << fiberNo << "\n";
67  }
68  if (StreamChannel >= fNFEMBChans)
69  {
70  throw cet::exception("IcebergChannelMapService") << "Ununderstood FEMB (Stream) Channel Number: " << StreamChannel << "\n";
71  }
72 
73  farrayCsfcToOffline[crateNo][slotNo][fiberNo][StreamChannel] = offlineChannel;
74  fvAPAMap[offlineChannel] = crateNo;
75  fvWIBMap[offlineChannel] = slotNo;
76  fvFEMBMap[offlineChannel] = fiberNo;
77  fvFEMBChannelMap[offlineChannel] = FEMBChannel;
78  fvStreamChannelMap[offlineChannel] = StreamChannel;
79  fvSlotIdMap[offlineChannel] = slotID;
80  fvFiberIdMap[offlineChannel] = fiberID;
81  fvChipMap[offlineChannel] = chipNo;
82  fvChipChannelMap[offlineChannel] = chipChannel;
83  fvASICMap[offlineChannel] = asicNo;
84  fvASICChannelMap[offlineChannel] = asicChannel;
85  fvPlaneMap[offlineChannel] = planeType;
86 
87  }
88  inFile.close();
89 
90 
91 
92  std::string FELIXchannelMapFile = pset.get<std::string>("FELIXFileName");
93  sp.find_file(FELIXchannelMapFile, fullname);
94 
95  if (fullname.empty()) {
96  std::cout << "Input file " << FELIXchannelMapFile << " not found" << std::endl;
97  throw cet::exception("File not found");
98  }
99  else
100  std::cout << "Iceberg Channel Map: Building FELIX TPC wiremap from file " << channelMapFile << std::endl;
101 
102  std::ifstream FELIXinFile(fullname, std::ios::in);
103 
104  while (std::getline(FELIXinFile,line)) {
105  unsigned int crateNo, slotNo, fiberNo, FEMBChannel, StreamChannel, slotID, fiberID, chipNo, chipChannel, asicNo, asicChannel, planeType, offlineChannel;
106  std::stringstream linestream(line);
107  linestream >> crateNo >> slotNo >> fiberNo>> FEMBChannel >> StreamChannel >> slotID >> fiberID >> chipNo >> chipChannel >> asicNo >> asicChannel >> planeType >> offlineChannel;
108 
109  // fill lookup tables. Throw an exception if any number is out of expected bounds.
110  // checking for negative values produces compiler warnings as these are unsigned ints
111 
112  if (offlineChannel >= fNChans)
113  {
114  throw cet::exception("IcebergChannelMapService") << "Ununderstood Offline Channel: " << offlineChannel << "\n";
115  }
116  if (crateNo >= fNCrates)
117  {
118  throw cet::exception("IcebergChannelMapService") << "Ununderstood Crate Number: " << crateNo << "\n";
119  }
120  if (slotNo >= fNSlots)
121  {
122  throw cet::exception("IcebergChannelMapService") << "Ununderstood Slot Number: " << slotNo << "\n";
123  }
124  if (fiberNo >= fNFibers)
125  {
126  throw cet::exception("IcebergChannelMapService") << "Ununderstood Fiber Number: " << fiberNo << "\n";
127  }
128  if (StreamChannel >= fNFEMBChans)
129  {
130  throw cet::exception("IcebergChannelMapService") << "Ununderstood FEMB (Stream) Channel Number: " << StreamChannel << "\n";
131  }
132 
133  fFELIXarrayCsfcToOffline[crateNo][slotNo][fiberNo][StreamChannel] = offlineChannel;
134  fFELIXvAPAMap[offlineChannel] = crateNo;
135  fFELIXvWIBMap[offlineChannel] = slotNo;
136  fFELIXvFEMBMap[offlineChannel] = fiberNo;
137  fFELIXvFEMBChannelMap[offlineChannel] = FEMBChannel;
138  fFELIXvStreamChannelMap[offlineChannel] = StreamChannel;
139  fFELIXvSlotIdMap[offlineChannel] = slotID;
140  fFELIXvFiberIdMap[offlineChannel] = fiberID;
141  fFELIXvChipMap[offlineChannel] = chipNo;
142  fFELIXvChipChannelMap[offlineChannel] = chipChannel;
143  fFELIXvASICMap[offlineChannel] = asicNo;
144  fFELIXvASICChannelMap[offlineChannel] = asicChannel;
145  fFELIXvPlaneMap[offlineChannel] = planeType;
146 
147  }
148  inFile.close();
149 
150 
151  std::string SSPchannelMapFile = pset.get<std::string>("SSPFileName");
152 
153  std::string SSPfullname;
154  sp.find_file(SSPchannelMapFile, SSPfullname);
155 
156  if (SSPfullname.empty()) {
157  std::cout << "Input file for SSP Channel Map " << SSPchannelMapFile << " not found in FW_SEARCH_PATH " << std::endl;
158  throw cet::exception("File not found");
159  }
160  else
161  std::cout << "Iceberg Channel Map: Building SSP channel map from file " << SSPchannelMapFile << std::endl;
162 
163  std::ifstream SSPinFile(SSPfullname, std::ios::in);
164 
165  while (std::getline(SSPinFile,line)) {
166  unsigned int onlineChannel, APA, SSP, SSPGlobal, ChanWithinSSP, OpDetNo, offlineChannel;
167  std::stringstream linestream(line);
168  linestream >> onlineChannel >> APA >> SSP >> SSPGlobal >> ChanWithinSSP >> OpDetNo >> offlineChannel;
169 
170  // fill lookup tables. Throw an exception if any number is out of expected bounds.
171  // checking for negative values produces compiler warnings as these are unsigned ints
172 
173  if (onlineChannel >= fNSSPChans)
174  {
175  throw cet::exception("IcebergChannelMapService") << "Ununderstood SSP Online Channel: " << onlineChannel << "\n";
176  }
177  if (offlineChannel >= fNSSPChans)
178  {
179  throw cet::exception("IcebergChannelMapService") << "Ununderstood SSP Offline Channel: " << offlineChannel << "\n";
180  }
181  if (APA > fNAPAs) // APAs count from 1
182  {
183  throw cet::exception("IcebergChannelMapService") << "Ununderstood APA Number in SSP map file: " << APA << "\n";
184  }
185  //if (SSP >= fNSSPsPerAPA) -- These checks don't make sense
186  // {
187  // throw cet::exception("IcebergChannelMapService") << "Ununderstood SSP number within this APA: " << SSP << " " << APA << "\n";
188  // }
189  //if (SSPGlobal >= fNSSPs)
190  // {
191  // throw cet::exception("IcebergChannelMapService") << "Ununderstood Global SSP number: " << SSPGlobal << "\n";
192  // }
193  if (ChanWithinSSP >= fNChansPerSSP)
194  {
195  throw cet::exception("IcebergChannelMapService") << "Ununderstood Channel within SSP Number: " << ChanWithinSSP << " " << SSPGlobal << "\n";
196  }
197  if (OpDetNo >= 60)
198  {
199  throw cet::exception("IcebergChannelMapService") << "Ununderstood SSP Module Number: " << OpDetNo << "\n";
200  }
201 
202  farraySSPOnlineToOffline[onlineChannel] = offlineChannel;
203  farraySSPOfflineToOnline[offlineChannel] = onlineChannel;
204  fvSSPAPAMap[offlineChannel] = APA;
205  fvSSPWithinAPAMap[offlineChannel] = SSP;
206  fvSSPGlobalMap[offlineChannel] = SSPGlobal;
207  fvSSPChanWithinSSPMap[offlineChannel] = ChanWithinSSP;
208  fvOpDetNoMap[offlineChannel] = OpDetNo;
209  }
210  SSPinFile.close();
211 }
unsigned int farrayCsfcToOffline[1][3][4][128]
std::string string
Definition: nybbler.cc:12
unsigned int fFELIXarrayCsfcToOffline[6][5][4][128]
TFile * inFile
Definition: makeDST.cxx:36
void line(double t, double *p, double &x, double &y, double &z)
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
QTextStream & endl(QTextStream &s)
dune::IcebergChannelMapService::IcebergChannelMapService ( fhicl::ParameterSet const &  pset,
art::ActivityRegistry  
)

Definition at line 213 of file IcebergChannelMapService_service.cc.

213  : IcebergChannelMapService(pset) {
214 }
IcebergChannelMapService(fhicl::ParameterSet const &pset)

Member Function Documentation

unsigned int dune::IcebergChannelMapService::APAFromOfflineChannel ( unsigned int  offlineChannel) const

Returns APA/crate.

Definition at line 278 of file IcebergChannelMapService_service.cc.

278  {
279  check_offline_channel(offlineChannel);
280  return fvAPAMap[offlineChannel];
281  // return fFELIXvAPAMap[offlineChannel]; // -- FELIX one -- should be the same
282 }
void check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::ASICChannelFromOfflineChannel ( unsigned int  offlineChannel)

Returns ASIC channel number – to be deprecated.

Definition at line 381 of file IcebergChannelMapService_service.cc.

381  {
383  {
384  mf::LogWarning("IcebergChannelMapService: Deprecated call to ASICChannelFromOfflineChannel. Not a meaningful number -- channels are grouped by 16's not 8's");
385  }
387  check_offline_channel(offlineChannel);
388  return fvASICChannelMap[offlineChannel];
389 }
void check_offline_channel(unsigned int offlineChannel) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
unsigned int dune::IcebergChannelMapService::AsicChannelFromOfflineChannel ( unsigned int  offlineChannel) const

Definition at line 359 of file IcebergChannelMapService_service.cc.

359  {
360  check_offline_channel(offlineChannel);
361  return fvChipChannelMap[offlineChannel];
362 }
void check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::ASICFromOfflineChannel ( unsigned int  offlineChannel)

Returns ASIC number – to be deprecated.

Definition at line 366 of file IcebergChannelMapService_service.cc.

366  {
368  {
369  mf::LogWarning("IcebergChannelMapService: Deprecated call to ASICFromOfflineChannel. Use AsicLinkFromOfflineChannel");
370  }
372  check_offline_channel(offlineChannel);
373  return fvASICMap[offlineChannel];
374 }
void check_offline_channel(unsigned int offlineChannel) const
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
unsigned int dune::IcebergChannelMapService::AsicFromOfflineChannel ( unsigned int  offlineChannel) const

Definition at line 347 of file IcebergChannelMapService_service.cc.

347  {
348  check_offline_channel(offlineChannel);
349  return fvChipMap[offlineChannel];
350 }
void check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::AsicLinkFromOfflineChannel ( unsigned int  offlineChannel) const

Definition at line 376 of file IcebergChannelMapService_service.cc.

376  {
377  check_offline_channel(offlineChannel);
378  return fvASICMap[offlineChannel];
379 }
void check_offline_channel(unsigned int offlineChannel) const
void dune::IcebergChannelMapService::check_offline_channel ( unsigned int  offlineChannel) const
inlineprivate

Definition at line 190 of file IcebergChannelMapService.h.

191  {
192  if (offlineChannel >= fNChans)
193  {
194  throw cet::exception("IcebergChannelMapService") << "Offline TPC Channel Number out of range: " << offlineChannel << "\n";
195  }
196  };
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
unsigned int dune::IcebergChannelMapService::ChipChannelFromOfflineChannel ( unsigned int  offlineChannel) const

Returns chip channel number.

Definition at line 352 of file IcebergChannelMapService_service.cc.

352  {
353  check_offline_channel(offlineChannel);
354  return fvChipChannelMap[offlineChannel];
355 }
void check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::ChipFromOfflineChannel ( unsigned int  offlineChannel) const

Returns chip number.

Definition at line 342 of file IcebergChannelMapService_service.cc.

342  {
343  check_offline_channel(offlineChannel);
344  return fvChipMap[offlineChannel];
345 }
void check_offline_channel(unsigned int offlineChannel) const
size_t dune::IcebergChannelMapService::count_bits ( size_t  i)
private

Definition at line 396 of file IcebergChannelMapService_service.cc.

397 {
398  size_t result=0;
399  size_t s = sizeof(size_t)*8;
400  for (size_t j=0; j<s; ++j)
401  {
402  if (i & 1) ++result;
403  i >>= 1;
404  }
405  return result;
406 }
static QCString result
static QCString * s
Definition: config.cpp:1042
unsigned int dune::IcebergChannelMapService::FEMBChannelFromOfflineChannel ( unsigned int  offlineChannel) const

Returns FEMB channel.

Definition at line 303 of file IcebergChannelMapService_service.cc.

303  {
304  check_offline_channel(offlineChannel);
305  return fvFEMBChannelMap[offlineChannel];
306  // return fFELIXvFEMBChannelMap[offlineChannel]; // -- FELIX one -- should be the same
307 }
void check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::FEMBFromOfflineChannel ( unsigned int  offlineChannel) const

Returns FEMB/fiber.

Definition at line 295 of file IcebergChannelMapService_service.cc.

295  {
296  check_offline_channel(offlineChannel);
297  return fvFEMBMap[offlineChannel]+1;
298  //return fFELIXvFEMBMap[offlineChannel];
299 }
void check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::FiberIdFromOfflineChannel ( unsigned int  offlineChannel) const

Returns global fiber ID.

Definition at line 335 of file IcebergChannelMapService_service.cc.

335  {
336  check_offline_channel(offlineChannel);
337  return fvFiberIdMap[offlineChannel];
338 }
void check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::GetOfflineNumberFromDetectorElements ( unsigned int  crate,
unsigned int  slot,
unsigned int  fiber,
unsigned int  fembchannel,
FelixOrRCE  frswitch 
)

Definition at line 221 of file IcebergChannelMapService_service.cc.

221  {
222 
223  unsigned int offlineChannel=0;
224  unsigned int lcrate = crate;
225  unsigned int lslot = slot;
226  unsigned int lfiber = fiber;
227 
228  if (crate > fNCrates || crate == 0)
229  {
231  {
232  mf::LogWarning("IcebergChannelMapService: Bad Crate Number, expecting a number of 1. Falling back to 1. Ununderstood crate number=") << crate;
233  }
235  lcrate = 1;
236  }
237 
238  if (slot >= fNSlots)
239  {
241  {
242  mf::LogWarning("IcebergChannelMapService: Bad slot number, using slot number zero as a fallback. Ununderstood slot number: ") << slot;
243  }
245  lslot = 0;
246  }
247 
248  if (fiber > fNFibers || fiber == 0)
249  {
251  {
252  mf::LogWarning("IcebergChannelMapService: Bad fiber number, falling back to 1. Ununderstood fiber number: ") << fiber;
253  }
255  lfiber = 1;
256  }
257 
258  if (streamchannel >= fNFEMBChans)
259  {
260  throw cet::exception("IcebergChannelMapService") << "Ununderstood Stream (FEMB) chan: "
261  << crate << " " << slot << " " << fiber << " " << streamchannel << "\n";
262  }
263 
264  if (frswitch == kRCE)
265  {
266  offlineChannel = farrayCsfcToOffline[lcrate-1][lslot][lfiber-1][streamchannel];
267  }
268  else
269  {
270  offlineChannel = fFELIXarrayCsfcToOffline[lcrate-1][lslot][lfiber-1][streamchannel];
271  }
272 
273  return offlineChannel;
274 }
unsigned int farrayCsfcToOffline[1][3][4][128]
struct dune::tde::crate crate
unsigned int fFELIXarrayCsfcToOffline[6][5][4][128]
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
unsigned int dune::IcebergChannelMapService::InstalledAPAFromOfflineChannel ( unsigned int  offlineChannel) const

Returns APA/crate in installation notation.

unsigned int dune::IcebergChannelMapService::OpDetNoFromOfflineChannel ( unsigned int  offlineChannel) const

Definition at line 454 of file IcebergChannelMapService_service.cc.

455 {
456  SSP_check_offline_channel(offlineChannel);
457  return fvOpDetNoMap[offlineChannel];
458 }
void SSP_check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::PlaneFromOfflineChannel ( unsigned int  offlineChannel) const

Returns plane.

Definition at line 391 of file IcebergChannelMapService_service.cc.

391  {
392  check_offline_channel(offlineChannel);
393  return fvPlaneMap[offlineChannel];
394 }
void check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::SlotIdFromOfflineChannel ( unsigned int  offlineChannel) const

Returns global slot ID.

Definition at line 325 of file IcebergChannelMapService_service.cc.

325  {
326  check_offline_channel(offlineChannel);
327  return fvSlotIdMap[offlineChannel];
328  // return fFELIXvSlotIdMap[offlineChannel]; // -- FELIX one -- should be the same
329 }
void check_offline_channel(unsigned int offlineChannel) const
void dune::IcebergChannelMapService::SSP_check_offline_channel ( unsigned int  offlineChannel) const
inlineprivate

Definition at line 198 of file IcebergChannelMapService.h.

199  {
200  if (offlineChannel >= fNSSPChans)
201  {
202  throw cet::exception("IcebergChannelMapService") << "Offline SSP Channel Number out of range: " << offlineChannel << "\n";
203  }
204  };
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
unsigned int dune::IcebergChannelMapService::SSPAPAFromOfflineChannel ( unsigned int  offlineChannel) const

Definition at line 430 of file IcebergChannelMapService_service.cc.

431 {
432  SSP_check_offline_channel(offlineChannel);
433  return fvSSPAPAMap[offlineChannel];
434 }
void SSP_check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::SSPChanWithinSSPFromOfflineChannel ( unsigned int  offlineChannel) const

Definition at line 448 of file IcebergChannelMapService_service.cc.

449 {
450  SSP_check_offline_channel(offlineChannel);
451  return fvSSPChanWithinSSPMap[offlineChannel];
452 }
void SSP_check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::SSPGlobalFromOfflineChannel ( unsigned int  offlineChannel) const

Definition at line 442 of file IcebergChannelMapService_service.cc.

443 {
444  SSP_check_offline_channel(offlineChannel);
445  return fvSSPGlobalMap[offlineChannel];
446 }
void SSP_check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::SSPOfflineChannelFromOnlineChannel ( unsigned int  onlineChannel)

Definition at line 408 of file IcebergChannelMapService_service.cc.

409 {
410  unsigned int lchannel = onlineChannel;
411 
412  if (onlineChannel > fNSSPChans)
413  {
415  {
416  mf::LogWarning("IcebergChannelMapService: Online Channel Number too high, using zero as a fallback: ") << onlineChannel;
417  }
419  lchannel = 0;
420  }
421  return farraySSPOnlineToOffline[lchannel];
422 }
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
unsigned int dune::IcebergChannelMapService::SSPOnlineChannelFromOfflineChannel ( unsigned int  offlineChannel) const

Definition at line 424 of file IcebergChannelMapService_service.cc.

425 {
426  SSP_check_offline_channel(offlineChannel);
427  return farraySSPOfflineToOnline[offlineChannel];
428 }
void SSP_check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::SSPWithinAPAFromOfflineChannel ( unsigned int  offlineChannel) const

Definition at line 436 of file IcebergChannelMapService_service.cc.

437 {
438  SSP_check_offline_channel(offlineChannel);
439  return fvSSPWithinAPAMap[offlineChannel];
440 }
void SSP_check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::StreamChannelFromOfflineChannel ( unsigned int  offlineChannel,
FelixOrRCE  frswitch 
) const

Returns RCE(FELIX) stream(frame) channel.

Definition at line 311 of file IcebergChannelMapService_service.cc.

311  {
312  check_offline_channel(offlineChannel);
313  if (frswitch == kRCE)
314  {
315  return fvStreamChannelMap[offlineChannel];
316  }
317  else
318  {
319  return fFELIXvStreamChannelMap[offlineChannel];
320  }
321 }
void check_offline_channel(unsigned int offlineChannel) const
unsigned int dune::IcebergChannelMapService::WIBFromOfflineChannel ( unsigned int  offlineChannel) const

Returns WIB/slot.

Definition at line 287 of file IcebergChannelMapService_service.cc.

287  {
288  check_offline_channel(offlineChannel);
289  return fvWIBMap[offlineChannel];
290  // return fFELIXvWIBMap[offlineChannel]; // -- FELIX one -- should be the same
291 }
void check_offline_channel(unsigned int offlineChannel) const

Member Data Documentation

unsigned int dune::IcebergChannelMapService::farrayCsfcToOffline[1][3][4][128]
private

Definition at line 145 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::farraySSPOfflineToOnline[288]
private

Definition at line 179 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::farraySSPOnlineToOffline[288]
private

Definition at line 178 of file IcebergChannelMapService.h.

size_t dune::IcebergChannelMapService::fASICChanWarningsIssued
private

Definition at line 142 of file IcebergChannelMapService.h.

size_t dune::IcebergChannelMapService::fASICWarningsIssued
private

Definition at line 141 of file IcebergChannelMapService.h.

size_t dune::IcebergChannelMapService::fBadCrateNumberWarningsIssued
private

Definition at line 136 of file IcebergChannelMapService.h.

size_t dune::IcebergChannelMapService::fBadFiberNumberWarningsIssued
private

Definition at line 138 of file IcebergChannelMapService.h.

size_t dune::IcebergChannelMapService::fBadSlotNumberWarningsIssued
private

Definition at line 137 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXarrayCsfcToOffline[6][5][4][128]
private

Definition at line 162 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvAPAMap[1280]
private

Definition at line 163 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvASICChannelMap[1280]
private

Definition at line 173 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvASICMap[1280]
private

Definition at line 172 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvChipChannelMap[1280]
private

Definition at line 171 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvChipMap[1280]
private

Definition at line 170 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvFEMBChannelMap[1280]
private

Definition at line 166 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvFEMBMap[1280]
private

Definition at line 165 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvFiberIdMap[1280]
private

Definition at line 169 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvPlaneMap[1280]
private

Definition at line 174 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvSlotIdMap[1280]
private

Definition at line 168 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvStreamChannelMap[1280]
private

Definition at line 167 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fFELIXvWIBMap[1280]
private

Definition at line 164 of file IcebergChannelMapService.h.

const size_t dune::IcebergChannelMapService::fNAPAs = 6
private

Definition at line 132 of file IcebergChannelMapService.h.

const size_t dune::IcebergChannelMapService::fNChans = 1280
private

Definition at line 120 of file IcebergChannelMapService.h.

const size_t dune::IcebergChannelMapService::fNChansPerSSP = 12
private

Definition at line 131 of file IcebergChannelMapService.h.

const size_t dune::IcebergChannelMapService::fNCrates = 1
private

Definition at line 121 of file IcebergChannelMapService.h.

const size_t dune::IcebergChannelMapService::fNFEMBChans = 128
private

Definition at line 124 of file IcebergChannelMapService.h.

const size_t dune::IcebergChannelMapService::fNFibers = 4
private

Definition at line 123 of file IcebergChannelMapService.h.

const size_t dune::IcebergChannelMapService::fNSlots = 3
private

Definition at line 122 of file IcebergChannelMapService.h.

const size_t dune::IcebergChannelMapService::fNSSPChans = 288
private

Definition at line 128 of file IcebergChannelMapService.h.

size_t dune::IcebergChannelMapService::fSSPBadChannelNumberWarningsIssued
private

Definition at line 139 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvAPAMap[1280]
private

Definition at line 149 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvASICChannelMap[1280]
private

Definition at line 159 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvASICMap[1280]
private

Definition at line 158 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvChipChannelMap[1280]
private

Definition at line 157 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvChipMap[1280]
private

Definition at line 156 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvFEMBChannelMap[1280]
private

Definition at line 152 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvFEMBMap[1280]
private

Definition at line 151 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvFiberIdMap[1280]
private

Definition at line 155 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvOpDetNoMap[288]
private

Definition at line 184 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvPlaneMap[1280]
private

Definition at line 160 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvSlotIdMap[1280]
private

Definition at line 154 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvSSPAPAMap[288]
private

Definition at line 180 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvSSPChanWithinSSPMap[288]
private

Definition at line 183 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvSSPGlobalMap[288]
private

Definition at line 182 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvSSPWithinAPAMap[288]
private

Definition at line 181 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvStreamChannelMap[1280]
private

Definition at line 153 of file IcebergChannelMapService.h.

unsigned int dune::IcebergChannelMapService::fvWIBMap[1280]
private

Definition at line 150 of file IcebergChannelMapService.h.


The documentation for this class was generated from the following files: