diff --git a/L1Trigger/TrackFindingTracklet/interface/ProcessBase.h b/L1Trigger/TrackFindingTracklet/interface/ProcessBase.h index 7482d24b21768..4033b6ca025cf 100644 --- a/L1Trigger/TrackFindingTracklet/interface/ProcessBase.h +++ b/L1Trigger/TrackFindingTracklet/interface/ProcessBase.h @@ -32,7 +32,7 @@ namespace trklet { //This function processes the name of a TE module to determine the layerdisks and iseed void initLayerDisksandISeed(unsigned int& layerdisk1, unsigned int& layerdisk2, unsigned int& iSeed); - unsigned int getISeed(std::string name); + unsigned int getISeed(const std::string& name); protected: std::string name_; diff --git a/L1Trigger/TrackFindingTracklet/interface/TrackletCalculator.h b/L1Trigger/TrackFindingTracklet/interface/TrackletCalculator.h index cb1fb663b2978..16d65ae9518b8 100644 --- a/L1Trigger/TrackFindingTracklet/interface/TrackletCalculator.h +++ b/L1Trigger/TrackFindingTracklet/interface/TrackletCalculator.h @@ -14,6 +14,8 @@ namespace trklet { class MemoryBase; class AllStubsMemory; class StubPairsMemory; + class VarInv; + class VarBase; class TrackletCalculator : public TrackletCalculatorBase { public: @@ -33,6 +35,9 @@ namespace trklet { std::vector innerallstubs_; std::vector outerallstubs_; std::vector stubpairs_; + + void writeInvTable(void (*writeLUT)(const VarInv&, const std::string&)); + void writeFirmwareDesign(void (*writeDesign)(const std::vector&, const std::string&)); }; }; // namespace trklet #endif diff --git a/L1Trigger/TrackFindingTracklet/interface/imath.h b/L1Trigger/TrackFindingTracklet/interface/imath.h index 3db657cda0ed6..d7ef81fb1721b 100644 --- a/L1Trigger/TrackFindingTracklet/interface/imath.h +++ b/L1Trigger/TrackFindingTracklet/interface/imath.h @@ -271,10 +271,10 @@ namespace trklet { void pipe_increment() { pipe_counter_++; } void add_delay(int i) { pipe_delays_.push_back(i); } bool has_delay(int i); //returns true if already have this variable delayed. - static void verilog_print(std::vector v, std::ofstream &fs) { design_print(v, fs, verilog); } - static void hls_print(std::vector v, std::ofstream &fs) { design_print(v, fs, hls); } - static void design_print(std::vector v, std::ofstream &fs, Verilog); - static void design_print(std::vector v, std::ofstream &fs, HLS); + static void verilog_print(const std::vector& v, std::ofstream &fs) { design_print(v, fs, verilog); } + static void hls_print(const std::vector& v, std::ofstream &fs) { design_print(v, fs, hls); } + static void design_print(const std::vector& v, std::ofstream &fs, Verilog); + static void design_print(const std::vector& v, std::ofstream &fs, HLS); static std::string pipe_delay(VarBase *v, int nbits, int delay); std::string pipe_delays(const int step); static std::string pipe_delay_wire(VarBase *v, std::string name_delayed, int nbits, int delay); diff --git a/L1Trigger/TrackFindingTracklet/src/TrackletCalculator.cc b/L1Trigger/TrackFindingTracklet/src/TrackletCalculator.cc index 57de2ce35a5fd..a760f287432e0 100644 --- a/L1Trigger/TrackFindingTracklet/src/TrackletCalculator.cc +++ b/L1Trigger/TrackFindingTracklet/src/TrackletCalculator.cc @@ -5,6 +5,8 @@ #include "L1Trigger/TrackFindingTracklet/interface/AllStubsMemory.h" #include "L1Trigger/TrackFindingTracklet/interface/StubPairsMemory.h" #include "L1Trigger/TrackFindingTracklet/interface/IMATH_TrackletCalculator.h" +#include "L1Trigger/TrackFindingTracklet/interface/IMATH_TrackletCalculatorDisk.h" +#include "L1Trigger/TrackFindingTracklet/interface/IMATH_TrackletCalculatorOverlap.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Utilities/interface/Exception.h" @@ -40,6 +42,45 @@ TrackletCalculator::TrackletCalculator(string name, Settings const& settings, Gl edm::LogPrint("Tracklet") << "TrackletCalculator::TrackletCalculator phicrit approximation may be invalid! Please check."; } + + // write the drinv and invt inverse tables + if ((settings_.writeInvTable() || settings_.writeHLSInvTable()) + && iTC_ == 0 && iSector_ == 0) { + void (*writeLUT)(const VarInv&, const string&) = nullptr; + if (settings.writeInvTable()) { // Verilog version + writeLUT = [](const VarInv& x, const string& basename) -> void { + ofstream fs(basename + ".tab"); + return x.writeLUT(fs, VarBase::verilog); + }; + } else { // HLS version + writeLUT = [](const VarInv& x, const string& basename) -> void { + ofstream fs(basename + ".tab"); + return x.writeLUT(fs, VarBase::hls); + }; + } + writeInvTable(writeLUT); + } + + // write the firmware design for the calculation of the tracklet parameters + // and projections + if ((settings_.writeVerilog() || settings_.writeHLS()) + && iTC_ == 0 && iSector_ == 0) { + void (*writeDesign)(const vector&, const string&) = nullptr; + if (settings.writeVerilog()) { // Verilog version + writeDesign = [](const vector& v, const string& basename) + -> void { + ofstream fs(basename + ".v"); + return VarBase::verilog_print(v, fs); + }; + } else { // HLS version + writeDesign = [](const vector& v, const string& basename) + -> void { + ofstream fs(basename + ".cpp"); + return VarBase::hls_print(v, fs); + }; + } + writeFirmwareDesign(writeDesign); + } } void TrackletCalculator::addOutputProjection(TrackletProjectionsMemory*& outputProj, MemoryBase* memory) { @@ -189,3 +230,405 @@ void TrackletCalculator::execute() { globals_->ofstream("trackletcalculator.txt") << getName() << " " << countall << " " << countsel << endl; } } + +void +TrackletCalculator::writeInvTable(void (*writeLUT)(const VarInv&, const string&)) +{ + switch (iSeed_) { + case 0: // L1L2 + writeLUT(globals_->ITC_L1L2()->drinv, settings_.tablePath() + "TC_L1L2_drinv"); + writeLUT(globals_->ITC_L1L2()->invt, settings_.tablePath() + "TC_L1L2_invt"); + break; + case 1: // L2L3 + writeLUT(globals_->ITC_L2L3()->drinv, settings_.tablePath() + "TC_L2L3_drinv"); + writeLUT(globals_->ITC_L2L3()->invt, settings_.tablePath() + "TC_L2L3_invt"); + break; + case 2: // L3L4 + writeLUT(globals_->ITC_L3L4()->drinv, settings_.tablePath() + "TC_L3L4_drinv"); + writeLUT(globals_->ITC_L3L4()->invt, settings_.tablePath() + "TC_L3L4_invt"); + break; + case 3: // L5L6 + writeLUT(globals_->ITC_L5L6()->drinv, settings_.tablePath() + "TC_L5L6_drinv"); + writeLUT(globals_->ITC_L5L6()->invt, settings_.tablePath() + "TC_L5L6_invt"); + break; + case 4: // D1D2 + writeLUT(globals_->ITC_F1F2()->drinv, settings_.tablePath() + "TC_F1F2_drinv"); + writeLUT(globals_->ITC_F1F2()->invt, settings_.tablePath() + "TC_F1F2_invt"); + writeLUT(globals_->ITC_B1B2()->drinv, settings_.tablePath() + "TC_B1B2_drinv"); + writeLUT(globals_->ITC_B1B2()->invt, settings_.tablePath() + "TC_B1B2_invt"); + break; + case 5: // D3D4 + writeLUT(globals_->ITC_F3F4()->drinv, settings_.tablePath() + "TC_F3F4_drinv"); + writeLUT(globals_->ITC_F3F4()->invt, settings_.tablePath() + "TC_F3F4_invt"); + writeLUT(globals_->ITC_B3B4()->drinv, settings_.tablePath() + "TC_B3B4_drinv"); + writeLUT(globals_->ITC_B3B4()->invt, settings_.tablePath() + "TC_B3B4_invt"); + break; + case 6: // L1D1 + writeLUT(globals_->ITC_L1F1()->drinv, settings_.tablePath() + "TC_L1F1_drinv"); + writeLUT(globals_->ITC_L1F1()->invt, settings_.tablePath() + "TC_L1F1_invt"); + writeLUT(globals_->ITC_L1B1()->drinv, settings_.tablePath() + "TC_L1B1_drinv"); + writeLUT(globals_->ITC_L1B1()->invt, settings_.tablePath() + "TC_L1B1_invt"); + break; + case 7: // L2D1 + writeLUT(globals_->ITC_L2F1()->drinv, settings_.tablePath() + "TC_L2F1_drinv"); + writeLUT(globals_->ITC_L2F1()->invt, settings_.tablePath() + "TC_L2F1_invt"); + writeLUT(globals_->ITC_L2B1()->drinv, settings_.tablePath() + "TC_L2B1_drinv"); + writeLUT(globals_->ITC_L2B1()->invt, settings_.tablePath() + "TC_L2B1_invt"); + break; + } +} + +void +TrackletCalculator::writeFirmwareDesign(void (*writeDesign)(const vector&, const string&)) +{ + switch (iSeed_) { + case 0: // L1L2 + { + const vector v = { + &globals_->ITC_L1L2()->rinv_final, + &globals_->ITC_L1L2()->phi0_final, + &globals_->ITC_L1L2()->t_final, + &globals_->ITC_L1L2()->z0_final, + &globals_->ITC_L1L2()->phiL_0_final, + &globals_->ITC_L1L2()->phiL_1_final, + &globals_->ITC_L1L2()->phiL_2_final, + &globals_->ITC_L1L2()->phiL_3_final, + &globals_->ITC_L1L2()->zL_0_final, + &globals_->ITC_L1L2()->zL_1_final, + &globals_->ITC_L1L2()->zL_2_final, + &globals_->ITC_L1L2()->zL_3_final, + &globals_->ITC_L1L2()->der_phiL_final, + &globals_->ITC_L1L2()->der_zL_final, + &globals_->ITC_L1L2()->phiD_0_final, + &globals_->ITC_L1L2()->phiD_1_final, + &globals_->ITC_L1L2()->phiD_2_final, + &globals_->ITC_L1L2()->phiD_3_final, + &globals_->ITC_L1L2()->phiD_4_final, + &globals_->ITC_L1L2()->rD_0_final, + &globals_->ITC_L1L2()->rD_1_final, + &globals_->ITC_L1L2()->rD_2_final, + &globals_->ITC_L1L2()->rD_3_final, + &globals_->ITC_L1L2()->rD_4_final, + &globals_->ITC_L1L2()->der_phiD_final, + &globals_->ITC_L1L2()->der_rD_final + }; + writeDesign(v, "TC_L1L2"); + } + break; + case 1: // L2L3 + { + const vector v = { + &globals_->ITC_L2L3()->rinv_final, + &globals_->ITC_L2L3()->phi0_final, + &globals_->ITC_L2L3()->t_final, + &globals_->ITC_L2L3()->z0_final, + &globals_->ITC_L2L3()->phiL_0_final, + &globals_->ITC_L2L3()->phiL_1_final, + &globals_->ITC_L2L3()->phiL_2_final, + &globals_->ITC_L2L3()->phiL_3_final, + &globals_->ITC_L2L3()->zL_0_final, + &globals_->ITC_L2L3()->zL_1_final, + &globals_->ITC_L2L3()->zL_2_final, + &globals_->ITC_L2L3()->zL_3_final, + &globals_->ITC_L2L3()->der_phiL_final, + &globals_->ITC_L2L3()->der_zL_final, + &globals_->ITC_L2L3()->phiD_0_final, + &globals_->ITC_L2L3()->phiD_1_final, + &globals_->ITC_L2L3()->phiD_2_final, + &globals_->ITC_L2L3()->phiD_3_final, + &globals_->ITC_L2L3()->phiD_4_final, + &globals_->ITC_L2L3()->rD_0_final, + &globals_->ITC_L2L3()->rD_1_final, + &globals_->ITC_L2L3()->rD_2_final, + &globals_->ITC_L2L3()->rD_3_final, + &globals_->ITC_L2L3()->rD_4_final, + &globals_->ITC_L2L3()->der_phiD_final, + &globals_->ITC_L2L3()->der_rD_final + }; + writeDesign(v, "TC_L2L3"); + } + break; + case 2: // L3L4 + { + const vector v = { + &globals_->ITC_L3L4()->rinv_final, + &globals_->ITC_L3L4()->phi0_final, + &globals_->ITC_L3L4()->t_final, + &globals_->ITC_L3L4()->z0_final, + &globals_->ITC_L3L4()->phiL_0_final, + &globals_->ITC_L3L4()->phiL_1_final, + &globals_->ITC_L3L4()->phiL_2_final, + &globals_->ITC_L3L4()->phiL_3_final, + &globals_->ITC_L3L4()->zL_0_final, + &globals_->ITC_L3L4()->zL_1_final, + &globals_->ITC_L3L4()->zL_2_final, + &globals_->ITC_L3L4()->zL_3_final, + &globals_->ITC_L3L4()->der_phiL_final, + &globals_->ITC_L3L4()->der_zL_final, + &globals_->ITC_L3L4()->phiD_0_final, + &globals_->ITC_L3L4()->phiD_1_final, + &globals_->ITC_L3L4()->phiD_2_final, + &globals_->ITC_L3L4()->phiD_3_final, + &globals_->ITC_L3L4()->phiD_4_final, + &globals_->ITC_L3L4()->rD_0_final, + &globals_->ITC_L3L4()->rD_1_final, + &globals_->ITC_L3L4()->rD_2_final, + &globals_->ITC_L3L4()->rD_3_final, + &globals_->ITC_L3L4()->rD_4_final, + &globals_->ITC_L3L4()->der_phiD_final, + &globals_->ITC_L3L4()->der_rD_final + }; + writeDesign(v, "TC_L3L4"); + } + break; + case 3: // L5L6 + { + const vector v = { + &globals_->ITC_L5L6()->rinv_final, + &globals_->ITC_L5L6()->phi0_final, + &globals_->ITC_L5L6()->t_final, + &globals_->ITC_L5L6()->z0_final, + &globals_->ITC_L5L6()->phiL_0_final, + &globals_->ITC_L5L6()->phiL_1_final, + &globals_->ITC_L5L6()->phiL_2_final, + &globals_->ITC_L5L6()->phiL_3_final, + &globals_->ITC_L5L6()->zL_0_final, + &globals_->ITC_L5L6()->zL_1_final, + &globals_->ITC_L5L6()->zL_2_final, + &globals_->ITC_L5L6()->zL_3_final, + &globals_->ITC_L5L6()->der_phiL_final, + &globals_->ITC_L5L6()->der_zL_final, + &globals_->ITC_L5L6()->phiD_0_final, + &globals_->ITC_L5L6()->phiD_1_final, + &globals_->ITC_L5L6()->phiD_2_final, + &globals_->ITC_L5L6()->phiD_3_final, + &globals_->ITC_L5L6()->phiD_4_final, + &globals_->ITC_L5L6()->rD_0_final, + &globals_->ITC_L5L6()->rD_1_final, + &globals_->ITC_L5L6()->rD_2_final, + &globals_->ITC_L5L6()->rD_3_final, + &globals_->ITC_L5L6()->rD_4_final, + &globals_->ITC_L5L6()->der_phiD_final, + &globals_->ITC_L5L6()->der_rD_final + }; + writeDesign(v, "TC_L5L6"); + } + break; + case 4: // D1D2 + { + const vector v = { + &globals_->ITC_F1F2()->rinv_final, + &globals_->ITC_F1F2()->phi0_final, + &globals_->ITC_F1F2()->t_final, + &globals_->ITC_F1F2()->z0_final, + &globals_->ITC_F1F2()->phiL_0_final, + &globals_->ITC_F1F2()->phiL_1_final, + &globals_->ITC_F1F2()->phiL_2_final, + &globals_->ITC_F1F2()->zL_0_final, + &globals_->ITC_F1F2()->zL_1_final, + &globals_->ITC_F1F2()->zL_2_final, + &globals_->ITC_F1F2()->der_phiL_final, + &globals_->ITC_F1F2()->der_zL_final, + &globals_->ITC_F1F2()->phiD_0_final, + &globals_->ITC_F1F2()->phiD_1_final, + &globals_->ITC_F1F2()->phiD_2_final, + &globals_->ITC_F1F2()->rD_0_final, + &globals_->ITC_F1F2()->rD_1_final, + &globals_->ITC_F1F2()->rD_2_final, + &globals_->ITC_F1F2()->der_phiD_final, + &globals_->ITC_F1F2()->der_rD_final + }; + writeDesign(v, "TC_F1F2"); + } + { + const vector v = { + &globals_->ITC_B1B2()->rinv_final, + &globals_->ITC_B1B2()->phi0_final, + &globals_->ITC_B1B2()->t_final, + &globals_->ITC_B1B2()->z0_final, + &globals_->ITC_B1B2()->phiL_0_final, + &globals_->ITC_B1B2()->phiL_1_final, + &globals_->ITC_B1B2()->phiL_2_final, + &globals_->ITC_B1B2()->zL_0_final, + &globals_->ITC_B1B2()->zL_1_final, + &globals_->ITC_B1B2()->zL_2_final, + &globals_->ITC_B1B2()->der_phiL_final, + &globals_->ITC_B1B2()->der_zL_final, + &globals_->ITC_B1B2()->phiD_0_final, + &globals_->ITC_B1B2()->phiD_1_final, + &globals_->ITC_B1B2()->phiD_2_final, + &globals_->ITC_B1B2()->rD_0_final, + &globals_->ITC_B1B2()->rD_1_final, + &globals_->ITC_B1B2()->rD_2_final, + &globals_->ITC_B1B2()->der_phiD_final, + &globals_->ITC_B1B2()->der_rD_final + }; + writeDesign(v, "TC_B1B2"); + } + break; + case 5: // D3D4 + { + const vector v = { + &globals_->ITC_F3F4()->rinv_final, + &globals_->ITC_F3F4()->phi0_final, + &globals_->ITC_F3F4()->t_final, + &globals_->ITC_F3F4()->z0_final, + &globals_->ITC_F3F4()->phiL_0_final, + &globals_->ITC_F3F4()->phiL_1_final, + &globals_->ITC_F3F4()->phiL_2_final, + &globals_->ITC_F3F4()->zL_0_final, + &globals_->ITC_F3F4()->zL_1_final, + &globals_->ITC_F3F4()->zL_2_final, + &globals_->ITC_F3F4()->der_phiL_final, + &globals_->ITC_F3F4()->der_zL_final, + &globals_->ITC_F3F4()->phiD_0_final, + &globals_->ITC_F3F4()->phiD_1_final, + &globals_->ITC_F3F4()->phiD_2_final, + &globals_->ITC_F3F4()->rD_0_final, + &globals_->ITC_F3F4()->rD_1_final, + &globals_->ITC_F3F4()->rD_2_final, + &globals_->ITC_F3F4()->der_phiD_final, + &globals_->ITC_F3F4()->der_rD_final + }; + writeDesign(v, "TC_F3F4"); + } + { + const vector v = { + &globals_->ITC_B3B4()->rinv_final, + &globals_->ITC_B3B4()->phi0_final, + &globals_->ITC_B3B4()->t_final, + &globals_->ITC_B3B4()->z0_final, + &globals_->ITC_B3B4()->phiL_0_final, + &globals_->ITC_B3B4()->phiL_1_final, + &globals_->ITC_B3B4()->phiL_2_final, + &globals_->ITC_B3B4()->zL_0_final, + &globals_->ITC_B3B4()->zL_1_final, + &globals_->ITC_B3B4()->zL_2_final, + &globals_->ITC_B3B4()->der_phiL_final, + &globals_->ITC_B3B4()->der_zL_final, + &globals_->ITC_B3B4()->phiD_0_final, + &globals_->ITC_B3B4()->phiD_1_final, + &globals_->ITC_B3B4()->phiD_2_final, + &globals_->ITC_B3B4()->rD_0_final, + &globals_->ITC_B3B4()->rD_1_final, + &globals_->ITC_B3B4()->rD_2_final, + &globals_->ITC_B3B4()->der_phiD_final, + &globals_->ITC_B3B4()->der_rD_final + }; + writeDesign(v, "TC_B3B4"); + } + break; + case 6: // L1D1 + { + const vector v = { + &globals_->ITC_L1F1()->rinv_final, + &globals_->ITC_L1F1()->phi0_final, + &globals_->ITC_L1F1()->t_final, + &globals_->ITC_L1F1()->z0_final, + &globals_->ITC_L1F1()->phiL_0_final, + &globals_->ITC_L1F1()->phiL_1_final, + &globals_->ITC_L1F1()->phiL_2_final, + &globals_->ITC_L1F1()->zL_0_final, + &globals_->ITC_L1F1()->zL_1_final, + &globals_->ITC_L1F1()->zL_2_final, + &globals_->ITC_L1F1()->der_phiL_final, + &globals_->ITC_L1F1()->der_zL_final, + &globals_->ITC_L1F1()->phiD_0_final, + &globals_->ITC_L1F1()->phiD_1_final, + &globals_->ITC_L1F1()->phiD_2_final, + &globals_->ITC_L1F1()->phiD_3_final, + &globals_->ITC_L1F1()->rD_0_final, + &globals_->ITC_L1F1()->rD_1_final, + &globals_->ITC_L1F1()->rD_2_final, + &globals_->ITC_L1F1()->rD_3_final, + &globals_->ITC_L1F1()->der_phiD_final, + &globals_->ITC_L1F1()->der_rD_final + }; + writeDesign(v, "TC_L1F1"); + } + { + const vector v = { + &globals_->ITC_L1B1()->rinv_final, + &globals_->ITC_L1B1()->phi0_final, + &globals_->ITC_L1B1()->t_final, + &globals_->ITC_L1B1()->z0_final, + &globals_->ITC_L1B1()->phiL_0_final, + &globals_->ITC_L1B1()->phiL_1_final, + &globals_->ITC_L1B1()->phiL_2_final, + &globals_->ITC_L1B1()->zL_0_final, + &globals_->ITC_L1B1()->zL_1_final, + &globals_->ITC_L1B1()->zL_2_final, + &globals_->ITC_L1B1()->der_phiL_final, + &globals_->ITC_L1B1()->der_zL_final, + &globals_->ITC_L1B1()->phiD_0_final, + &globals_->ITC_L1B1()->phiD_1_final, + &globals_->ITC_L1B1()->phiD_2_final, + &globals_->ITC_L1B1()->phiD_3_final, + &globals_->ITC_L1B1()->rD_0_final, + &globals_->ITC_L1B1()->rD_1_final, + &globals_->ITC_L1B1()->rD_2_final, + &globals_->ITC_L1B1()->rD_3_final, + &globals_->ITC_L1B1()->der_phiD_final, + &globals_->ITC_L1B1()->der_rD_final + }; + writeDesign(v, "TC_L1B1"); + } + break; + case 7: // L2D1 + { + const vector v = { + &globals_->ITC_L2F1()->rinv_final, + &globals_->ITC_L2F1()->phi0_final, + &globals_->ITC_L2F1()->t_final, + &globals_->ITC_L2F1()->z0_final, + &globals_->ITC_L2F1()->phiL_0_final, + &globals_->ITC_L2F1()->phiL_1_final, + &globals_->ITC_L2F1()->phiL_2_final, + &globals_->ITC_L2F1()->zL_0_final, + &globals_->ITC_L2F1()->zL_1_final, + &globals_->ITC_L2F1()->zL_2_final, + &globals_->ITC_L2F1()->der_phiL_final, + &globals_->ITC_L2F1()->der_zL_final, + &globals_->ITC_L2F1()->phiD_0_final, + &globals_->ITC_L2F1()->phiD_1_final, + &globals_->ITC_L2F1()->phiD_2_final, + &globals_->ITC_L2F1()->phiD_3_final, + &globals_->ITC_L2F1()->rD_0_final, + &globals_->ITC_L2F1()->rD_1_final, + &globals_->ITC_L2F1()->rD_2_final, + &globals_->ITC_L2F1()->rD_3_final, + &globals_->ITC_L2F1()->der_phiD_final, + &globals_->ITC_L2F1()->der_rD_final + }; + writeDesign(v, "TC_L2F1"); + } + { + const vector v = { + &globals_->ITC_L2B1()->rinv_final, + &globals_->ITC_L2B1()->phi0_final, + &globals_->ITC_L2B1()->t_final, + &globals_->ITC_L2B1()->z0_final, + &globals_->ITC_L2B1()->phiL_0_final, + &globals_->ITC_L2B1()->phiL_1_final, + &globals_->ITC_L2B1()->phiL_2_final, + &globals_->ITC_L2B1()->zL_0_final, + &globals_->ITC_L2B1()->zL_1_final, + &globals_->ITC_L2B1()->zL_2_final, + &globals_->ITC_L2B1()->der_phiL_final, + &globals_->ITC_L2B1()->der_zL_final, + &globals_->ITC_L2B1()->phiD_0_final, + &globals_->ITC_L2B1()->phiD_1_final, + &globals_->ITC_L2B1()->phiD_2_final, + &globals_->ITC_L2B1()->phiD_3_final, + &globals_->ITC_L2B1()->rD_0_final, + &globals_->ITC_L2B1()->rD_1_final, + &globals_->ITC_L2B1()->rD_2_final, + &globals_->ITC_L2B1()->rD_3_final, + &globals_->ITC_L2B1()->der_phiD_final, + &globals_->ITC_L2B1()->der_rD_final + }; + writeDesign(v, "TC_L2B1"); + } + break; + } +} diff --git a/L1Trigger/TrackFindingTracklet/src/TrackletEventProcessor.cc b/L1Trigger/TrackFindingTracklet/src/TrackletEventProcessor.cc index a265976fe1533..92e371fd866a0 100644 --- a/L1Trigger/TrackFindingTracklet/src/TrackletEventProcessor.cc +++ b/L1Trigger/TrackFindingTracklet/src/TrackletEventProcessor.cc @@ -59,17 +59,6 @@ void TrackletEventProcessor::init(Settings const& theSettings) { << "========================================================="; } - //option to write out tables for HLS code, not used in production - /* - const Settings& settings = *settings_; - Globals* globals = globals_; - - if (settings_->writeVerilog() || settings_->writeHLS()) { -#include "../test/WriteInvTables.icc" -#include "../test/WriteDesign.icc" - } - */ - if (settings_->bookHistos()) { histbase_ = new HistBase; histbase_->open(); diff --git a/L1Trigger/TrackFindingTracklet/src/imath_HLS.cc b/L1Trigger/TrackFindingTracklet/src/imath_HLS.cc index 48cd864389a43..c3f5b3d1268ec 100644 --- a/L1Trigger/TrackFindingTracklet/src/imath_HLS.cc +++ b/L1Trigger/TrackFindingTracklet/src/imath_HLS.cc @@ -352,7 +352,7 @@ void VarBase::print_all(std::ofstream& fs, HLS) { } } -void VarBase::design_print(std::vector v, std::ofstream& fs, HLS) { +void VarBase::design_print(const std::vector& v, std::ofstream& fs, HLS) { //header of the module //inputs diff --git a/L1Trigger/TrackFindingTracklet/src/imath_Verilog.cc b/L1Trigger/TrackFindingTracklet/src/imath_Verilog.cc index e2e4d77463d4e..b5707da78929a 100644 --- a/L1Trigger/TrackFindingTracklet/src/imath_Verilog.cc +++ b/L1Trigger/TrackFindingTracklet/src/imath_Verilog.cc @@ -463,7 +463,7 @@ void VarBase::print_all(std::ofstream& fs, Verilog) { } } -void VarBase::design_print(std::vector v, std::ofstream& fs, Verilog) { +void VarBase::design_print(const std::vector& v, std::ofstream& fs, Verilog) { //step at which all the outputs should be valid int maxstep = 0; diff --git a/L1Trigger/TrackFindingTracklet/test/WriteDesign.icc b/L1Trigger/TrackFindingTracklet/test/WriteDesign.icc deleted file mode 100644 index 740265c09a856..0000000000000 --- a/L1Trigger/TrackFindingTracklet/test/WriteDesign.icc +++ /dev/null @@ -1,648 +0,0 @@ -std::map > v; - -//////////////////////////////////////////////////////////////////////////// -// L1L2 -//////////////////////////////////////////////////////////////////////////// -v["L1L2"]; - -v.at("L1L2").push_back(&globals->ITC_L1L2()->rinv_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->phi0_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->t_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->z0_final); - -v.at("L1L2").push_back(&globals->ITC_L1L2()->phiL_0_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->phiL_1_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->phiL_2_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->phiL_3_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->zL_0_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->zL_1_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->zL_2_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->zL_3_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->der_phiL_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->der_zL_final); - -v.at("L1L2").push_back(&globals->ITC_L1L2()->phiD_0_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->phiD_1_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->phiD_2_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->phiD_3_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->phiD_4_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->rD_0_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->rD_1_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->rD_2_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->rD_3_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->rD_4_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->der_phiD_final); -v.at("L1L2").push_back(&globals->ITC_L1L2()->der_rD_final); - -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_trackpar); - -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_phiL_0); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_phiL_1); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_phiL_2); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_phiL_3); - -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_zL_0); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_zL_1); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_zL_2); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_zL_3); - -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_der_phiL); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_der_zL); - -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_phiD_0); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_phiD_1); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_phiD_2); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_phiD_3); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_phiD_4); - -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_rD_0); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_rD_1); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_rD_2); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_rD_3); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_rD_4); - -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_der_phiD); -v.at("L1L2").push_back(&globals->ITC_L1L2()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// L3L4 -//////////////////////////////////////////////////////////////////////////// -v["L3L4"]; - -v.at("L3L4").push_back(&globals->ITC_L3L4()->rinv_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->phi0_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->t_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->z0_final); - -v.at("L3L4").push_back(&globals->ITC_L3L4()->phiL_0_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->phiL_1_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->phiL_2_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->phiL_3_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->zL_0_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->zL_1_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->zL_2_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->zL_3_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->der_phiL_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->der_zL_final); - -v.at("L3L4").push_back(&globals->ITC_L3L4()->phiD_0_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->phiD_1_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->phiD_2_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->phiD_3_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->phiD_4_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->rD_0_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->rD_1_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->rD_2_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->rD_3_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->rD_4_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->der_phiD_final); -v.at("L3L4").push_back(&globals->ITC_L3L4()->der_rD_final); - -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_trackpar); - -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_phiL_0); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_phiL_1); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_phiL_2); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_phiL_3); - -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_zL_0); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_zL_1); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_zL_2); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_zL_3); - -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_der_phiL); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_der_zL); - -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_phiD_0); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_phiD_1); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_phiD_2); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_phiD_3); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_phiD_4); - -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_rD_0); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_rD_1); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_rD_2); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_rD_3); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_rD_4); - -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_der_phiD); -v.at("L3L4").push_back(&globals->ITC_L3L4()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// L5L6 -//////////////////////////////////////////////////////////////////////////// -v["L5L6"]; - -v.at("L5L6").push_back(&globals->ITC_L5L6()->rinv_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->phi0_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->t_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->z0_final); - -v.at("L5L6").push_back(&globals->ITC_L5L6()->phiL_0_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->phiL_1_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->phiL_2_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->phiL_3_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->zL_0_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->zL_1_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->zL_2_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->zL_3_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->der_phiL_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->der_zL_final); - -v.at("L5L6").push_back(&globals->ITC_L5L6()->phiD_0_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->phiD_1_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->phiD_2_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->phiD_3_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->phiD_4_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->rD_0_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->rD_1_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->rD_2_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->rD_3_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->rD_4_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->der_phiD_final); -v.at("L5L6").push_back(&globals->ITC_L5L6()->der_rD_final); - -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_trackpar); - -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_phiL_0); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_phiL_1); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_phiL_2); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_phiL_3); - -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_zL_0); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_zL_1); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_zL_2); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_zL_3); - -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_der_phiL); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_der_zL); - -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_phiD_0); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_phiD_1); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_phiD_2); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_phiD_3); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_phiD_4); - -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_rD_0); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_rD_1); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_rD_2); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_rD_3); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_rD_4); - -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_der_phiD); -v.at("L5L6").push_back(&globals->ITC_L5L6()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// F1F2 -//////////////////////////////////////////////////////////////////////////// -v["F1F2"]; - -v.at("F1F2").push_back(&globals->ITC_F1F2()->rinv_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->phi0_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->t_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->z0_final); - -v.at("F1F2").push_back(&globals->ITC_F1F2()->phiL_0_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->phiL_1_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->phiL_2_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->zL_0_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->zL_1_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->zL_2_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->der_phiL_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->der_zL_final); - -v.at("F1F2").push_back(&globals->ITC_F1F2()->phiD_0_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->phiD_1_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->phiD_2_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->rD_0_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->rD_1_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->rD_2_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->der_phiD_final); -v.at("F1F2").push_back(&globals->ITC_F1F2()->der_rD_final); - -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_trackpar); - -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_phiL_0); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_phiL_1); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_phiL_2); - -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_zL_0); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_zL_1); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_zL_2); - -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_der_phiL); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_der_zL); - -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_phiD_0); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_phiD_1); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_phiD_2); - -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_rD_0); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_rD_1); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_rD_2); - -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_der_phiD); -v.at("F1F2").push_back(&globals->ITC_F1F2()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// B1B2 -//////////////////////////////////////////////////////////////////////////// -v["B1B2"]; - -v.at("B1B2").push_back(&globals->ITC_B1B2()->rinv_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->phi0_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->t_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->z0_final); - -v.at("B1B2").push_back(&globals->ITC_B1B2()->phiL_0_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->phiL_1_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->phiL_2_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->zL_0_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->zL_1_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->zL_2_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->der_phiL_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->der_zL_final); - -v.at("B1B2").push_back(&globals->ITC_B1B2()->phiD_0_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->phiD_1_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->phiD_2_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->rD_0_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->rD_1_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->rD_2_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->der_phiD_final); -v.at("B1B2").push_back(&globals->ITC_B1B2()->der_rD_final); - -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_trackpar); - -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_phiL_0); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_phiL_1); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_phiL_2); - -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_zL_0); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_zL_1); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_zL_2); - -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_der_phiL); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_der_zL); - -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_phiD_0); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_phiD_1); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_phiD_2); - -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_rD_0); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_rD_1); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_rD_2); - -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_der_phiD); -v.at("B1B2").push_back(&globals->ITC_B1B2()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// F3F4 -//////////////////////////////////////////////////////////////////////////// -v["F3F4"]; - -v.at("F3F4").push_back(&globals->ITC_F3F4()->rinv_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->phi0_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->t_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->z0_final); - -v.at("F3F4").push_back(&globals->ITC_F3F4()->phiL_0_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->phiL_1_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->phiL_2_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->zL_0_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->zL_1_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->zL_2_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->der_phiL_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->der_zL_final); - -v.at("F3F4").push_back(&globals->ITC_F3F4()->phiD_0_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->phiD_1_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->phiD_2_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->rD_0_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->rD_1_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->rD_2_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->der_phiD_final); -v.at("F3F4").push_back(&globals->ITC_F3F4()->der_rD_final); - -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_trackpar); - -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_phiL_0); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_phiL_1); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_phiL_2); - -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_zL_0); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_zL_1); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_zL_2); - -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_der_phiL); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_der_zL); - -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_phiD_0); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_phiD_1); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_phiD_2); - -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_rD_0); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_rD_1); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_rD_2); - -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_der_phiD); -v.at("F3F4").push_back(&globals->ITC_F3F4()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// B3B4 -//////////////////////////////////////////////////////////////////////////// -v["B3B4"]; - -v.at("B3B4").push_back(&globals->ITC_B3B4()->rinv_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->phi0_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->t_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->z0_final); - -v.at("B3B4").push_back(&globals->ITC_B3B4()->phiL_0_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->phiL_1_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->phiL_2_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->zL_0_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->zL_1_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->zL_2_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->der_phiL_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->der_zL_final); - -v.at("B3B4").push_back(&globals->ITC_B3B4()->phiD_0_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->phiD_1_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->phiD_2_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->rD_0_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->rD_1_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->rD_2_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->der_phiD_final); -v.at("B3B4").push_back(&globals->ITC_B3B4()->der_rD_final); - -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_trackpar); - -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_phiL_0); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_phiL_1); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_phiL_2); - -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_zL_0); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_zL_1); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_zL_2); - -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_der_phiL); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_der_zL); - -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_phiD_0); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_phiD_1); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_phiD_2); - -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_rD_0); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_rD_1); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_rD_2); - -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_der_phiD); -v.at("B3B4").push_back(&globals->ITC_B3B4()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// L1F1 -//////////////////////////////////////////////////////////////////////////// -v["L1F1"]; - -v.at("L1F1").push_back(&globals->ITC_L1F1()->rinv_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->phi0_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->t_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->z0_final); - -v.at("L1F1").push_back(&globals->ITC_L1F1()->phiL_0_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->phiL_1_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->phiL_2_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->zL_0_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->zL_1_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->zL_2_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->der_phiL_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->der_zL_final); - -v.at("L1F1").push_back(&globals->ITC_L1F1()->phiD_0_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->phiD_1_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->phiD_2_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->phiD_3_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->rD_0_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->rD_1_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->rD_2_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->rD_3_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->der_phiD_final); -v.at("L1F1").push_back(&globals->ITC_L1F1()->der_rD_final); - -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_trackpar); - -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_phiL_0); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_phiL_1); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_phiL_2); - -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_zL_0); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_zL_1); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_zL_2); - -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_der_phiL); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_der_zL); - -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_phiD_0); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_phiD_1); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_phiD_2); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_phiD_3); - -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_rD_0); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_rD_1); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_rD_2); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_rD_3); - -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_der_phiD); -v.at("L1F1").push_back(&globals->ITC_L1F1()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// L1B1 -//////////////////////////////////////////////////////////////////////////// -v["L1B1"]; - -v.at("L1B1").push_back(&globals->ITC_L1B1()->rinv_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->phi0_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->t_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->z0_final); - -v.at("L1B1").push_back(&globals->ITC_L1B1()->phiL_0_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->phiL_1_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->phiL_2_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->zL_0_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->zL_1_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->zL_2_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->der_phiL_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->der_zL_final); - -v.at("L1B1").push_back(&globals->ITC_L1B1()->phiD_0_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->phiD_1_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->phiD_2_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->phiD_3_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->rD_0_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->rD_1_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->rD_2_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->rD_3_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->der_phiD_final); -v.at("L1B1").push_back(&globals->ITC_L1B1()->der_rD_final); - -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_trackpar); - -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_phiL_0); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_phiL_1); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_phiL_2); - -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_zL_0); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_zL_1); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_zL_2); - -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_der_phiL); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_der_zL); - -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_phiD_0); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_phiD_1); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_phiD_2); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_phiD_3); - -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_rD_0); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_rD_1); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_rD_2); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_rD_3); - -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_der_phiD); -v.at("L1B1").push_back(&globals->ITC_L1B1()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// L2F1 -//////////////////////////////////////////////////////////////////////////// -v["L2F1"]; - -v.at("L2F1").push_back(&globals->ITC_L2F1()->rinv_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->phi0_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->t_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->z0_final); - -v.at("L2F1").push_back(&globals->ITC_L2F1()->phiL_0_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->phiL_1_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->phiL_2_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->zL_0_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->zL_1_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->zL_2_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->der_phiL_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->der_zL_final); - -v.at("L2F1").push_back(&globals->ITC_L2F1()->phiD_0_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->phiD_1_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->phiD_2_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->phiD_3_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->rD_0_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->rD_1_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->rD_2_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->rD_3_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->der_phiD_final); -v.at("L2F1").push_back(&globals->ITC_L2F1()->der_rD_final); - -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_trackpar); - -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_phiL_0); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_phiL_1); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_phiL_2); - -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_zL_0); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_zL_1); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_zL_2); - -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_der_phiL); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_der_zL); - -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_phiD_0); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_phiD_1); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_phiD_2); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_phiD_3); - -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_rD_0); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_rD_1); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_rD_2); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_rD_3); - -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_der_phiD); -v.at("L2F1").push_back(&globals->ITC_L2F1()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////// -// L2B1 -//////////////////////////////////////////////////////////////////////////// -v["L2B1"]; - -v.at("L2B1").push_back(&globals->ITC_L2B1()->rinv_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->phi0_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->t_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->z0_final); - -v.at("L2B1").push_back(&globals->ITC_L2B1()->phiL_0_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->phiL_1_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->phiL_2_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->zL_0_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->zL_1_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->zL_2_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->der_phiL_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->der_zL_final); - -v.at("L2B1").push_back(&globals->ITC_L2B1()->phiD_0_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->phiD_1_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->phiD_2_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->phiD_3_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->rD_0_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->rD_1_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->rD_2_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->rD_3_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->der_phiD_final); -v.at("L2B1").push_back(&globals->ITC_L2B1()->der_rD_final); - -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_trackpar); - -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_phiL_0); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_phiL_1); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_phiL_2); - -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_zL_0); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_zL_1); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_zL_2); - -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_der_phiL); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_der_zL); - -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_phiD_0); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_phiD_1); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_phiD_2); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_phiD_3); - -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_rD_0); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_rD_1); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_rD_2); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_rD_3); - -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_der_phiD); -v.at("L2B1").push_back(&globals->ITC_L2B1()->valid_der_rD); -//////////////////////////////////////////////////////////////////////////// - -for (const auto &calculator : v) { - const std::string &layer = calculator.first; - const std::vector v = calculator.second; - ofstream fv("TC_" + layer + (settings.writeVerilog() ? ".v" : ".cpp")); - - if (settings.writeVerilog()) - VarBase::design_print(v, fv, VarBase::verilog); - else - VarBase::design_print(v, fv, VarBase::hls); - fv.close(); -} diff --git a/L1Trigger/TrackFindingTracklet/test/WriteInvTables.icc b/L1Trigger/TrackFindingTracklet/test/WriteInvTables.icc deleted file mode 100644 index 6c1b3fcaf7ff4..0000000000000 --- a/L1Trigger/TrackFindingTracklet/test/WriteInvTables.icc +++ /dev/null @@ -1,83 +0,0 @@ -edm::LogVerbatim("Tracklet") << " Writing Inverse Tables"; - -ofstream finv; -void (*writeLUT)(const VarInv&, ofstream&) = NULL; -string extension = ""; -if (settings.writeInvTable()) { - writeLUT = [](const VarInv& x, ofstream& fs) -> void { return x.writeLUT(fs, VarBase::verilog); }; - extension = "h"; -} else { - writeLUT = [](const VarInv& x, ofstream& fs) -> void { return x.writeLUT(fs, VarBase::hls); }; - extension = "tab"; -} - -finv.open("TC_L1L2_drinv." + extension); -writeLUT(globals->ITC_L1L2()->drinv, finv); -finv.close(); -finv.open("TC_L1L2_invt." + extension); -writeLUT(globals->ITC_L1L2()->invt, finv); -finv.close(); -finv.open("TC_L3L4_drinv." + extension); -writeLUT(globals->ITC_L3L4()->drinv, finv); -finv.close(); -finv.open("TC_L3L4_invt." + extension); -writeLUT(globals->ITC_L3L4()->invt, finv); -finv.close(); -finv.open("TC_L5L6_drinv." + extension); -writeLUT(globals->ITC_L5L6()->drinv, finv); -finv.close(); -finv.open("TC_L5L6_invt." + extension); -writeLUT(globals->ITC_L5L6()->invt, finv); -finv.close(); - -finv.open("F1F2_drinv." + extension); -writeLUT(globals->ITC_F1F2()->drinv, finv); -finv.close(); -finv.open("F1F2_invt." + extension); -writeLUT(globals->ITC_F1F2()->invt, finv); -finv.close(); -finv.open("B1B2_drinv." + extension); -writeLUT(globals->ITC_B1B2()->drinv, finv); -finv.close(); -finv.open("B1B2_invt." + extension); -writeLUT(globals->ITC_B1B2()->invt, finv); -finv.close(); - -finv.open("F3F4_drinv." + extension); -writeLUT(globals->ITC_F3F4()->drinv, finv); -finv.close(); -finv.open("F3F4_invt." + extension); -writeLUT(globals->ITC_F3F4()->invt, finv); -finv.close(); -finv.open("B3B4_drinv." + extension); -writeLUT(globals->ITC_B3B4()->drinv, finv); -finv.close(); -finv.open("B3B4_invt." + extension); -writeLUT(globals->ITC_B3B4()->invt, finv); -finv.close(); - -finv.open("L1F1_drinv." + extension); -writeLUT(globals->ITC_L1F1()->drinv, finv); -finv.close(); -finv.open("L1F1_invt." + extension); -writeLUT(globals->ITC_L1F1()->invt, finv); -finv.close(); -finv.open("L1B1_drinv." + extension); -writeLUT(globals->ITC_L1B1()->drinv, finv); -finv.close(); -finv.open("L1B1_invt." + extension); -writeLUT(globals->ITC_L1B1()->invt, finv); -finv.close(); - -finv.open("L2F1_drinv." + extension); -writeLUT(globals->ITC_L2F1()->drinv, finv); -finv.close(); -finv.open("L2F1_invt." + extension); -writeLUT(globals->ITC_L2F1()->invt, finv); -finv.close(); -finv.open("L2B1_drinv." + extension); -writeLUT(globals->ITC_L2B1()->drinv, finv); -finv.close(); -finv.open("L2B1_invt." + extension); -writeLUT(globals->ITC_L2B1()->invt, finv); -finv.close();