+//_____________________________________________________________________
+void AliFMDPedestalDA::FillinTimebins(std::ofstream& out, UShort_t /*ddl*/)
+{
+ //
+ // Fill missing timebins
+ //
+#if 0
+ unsigned short boards[] = { 0x0, 0x1, 0x10, 0x11, 0xFFFF };
+ unsigned short* board = boards;
+ while ((*boards) != 0xFFFF) {
+ for (UShort_t altro = 0; altro < 3; altro++) {
+ for (UShort_t channel = 0; channel < 16; channel++) {
+ Int_t idx = HWIndex(ddl, *board, altro, channel);
+ if (idx < 0) {
+ AliWarning(Form("Invalid index for %4d/0x%02x/0x%x/0x%x: %d",
+ ddl, *board, altro, channel, idx));
+ continue;
+ }
+ Short_t min = fMinTimebin[idx];
+ Short_t max = fMaxTimebin[idx];
+
+ // Channel not seen at all.
+ if (min > 1023 || max < 0) continue;
+
+ out << "# Extra timebins for 0x" << std::hex
+ << board << ',' << altro << ',' << channel
+ << " got time-bins " << min << " to " << max-1
+ << std::dec << std::endl;
+
+ for (UShort_t t = 15; t < min; t++)
+ // Write a phony line
+ out << board << "," << altro << "," << channel << ","
+ << t << "," << 1023 << "," << 0 << std::endl;
+
+ for (UShort_t t = max; t < 1024; t++)
+ // Write a phony line
+ out << board << "," << altro << "," << channel << ","
+ << t << "," << 1023 << "," << 0 << std::endl;
+ } // channel loop
+ } // altro loop
+ } // board loop
+ // Write trailer, and close
+#endif
+ out.write("# EOF\n", 6);
+ out.close();
+}
+