48 std::ifstream inFile(rcename, std::ios::in);
49 if (inFile.bad() || inFile.fail() || !inFile.is_open()) {
50 throw std::runtime_error(std::string(
"Bad file ") + std::string(rcename));
54 while (std::getline(inFile, line)) {
55 unsigned int crateNo, slotNo, fiberNo, FEMBChannel, StreamChannel, slotID, fiberID, chipNo, chipChannel, asicNo,
56 asicChannel, planeType, offlineChannel;
57 std::stringstream linestream(line);
58 linestream >> crateNo >> slotNo >> fiberNo >> FEMBChannel >> StreamChannel >> slotID >> fiberID >> chipNo >>
59 chipChannel >> asicNo >> asicChannel >> planeType >> offlineChannel;
64 if (offlineChannel >=
fNChans) {
65 throw std::logic_error(
"Ununderstood Offline Channel");
68 throw std::logic_error(
"Ununderstood Crate Number");
71 throw std::logic_error(
"Ununderstood Slot Number");
74 throw std::logic_error(
"Ununderstood Fiber Number");
77 throw std::logic_error(
"Ununderstood FEMB (Stream) Channel Number");
96 std::ifstream FELIXinFile(felixname, std::ios::in);
97 if (FELIXinFile.bad() || FELIXinFile.fail() || !FELIXinFile.is_open()) {
98 throw std::runtime_error(std::string(
"Bad file ") + std::string(felixname));
101 while (std::getline(FELIXinFile, line)) {
102 unsigned int crateNo, slotNo, fiberNo, FEMBChannel, StreamChannel, slotID, fiberID, chipNo, chipChannel, asicNo,
103 asicChannel, planeType, offlineChannel;
104 std::stringstream linestream(line);
105 linestream >> crateNo >> slotNo >> fiberNo >> FEMBChannel >> StreamChannel >> slotID >> fiberID >> chipNo >>
106 chipChannel >> asicNo >> asicChannel >> planeType >> offlineChannel;
111 if (offlineChannel >=
fNChans) {
112 throw std::logic_error(
"Ununderstood Offline Channel");
115 throw std::logic_error(
"Ununderstood Crate Number");
118 throw std::logic_error(
"Ununderstood Slot Number");
121 throw std::logic_error(
"Ununderstood Fiber Number");
124 throw std::logic_error(
"Ununderstood FEMB (Stream) Channel Number");
163 for (
size_t i = 0; i < 6; ++i) {