41 virtual void endJob()
override;
82 std::cout <<
"Could not retrieve params from Event Setup" << std::endl;
96 if ( !stat( fileName.c_str(), &buffer ) ) {
97 std::cout <<
"File " << fileName <<
" already exists. It will not be overwritten." << std::endl;
100 file.open( fileName.c_str() );
101 if ( ! file.good()) {
102 std::cout <<
"Error opening file " << fileName << std::endl;
113 std::cout <<
"Writing tau isolation LUT to: " << fileName << std::endl;
114 file <<
"########################################\n"
121 <<
"# Format: Address Payload ## hwTauPt hwJetPt\n"
122 <<
"########################################\n";
125 for (
unsigned iAdd=0; iAdd<maxAdd; iAdd++) {
127 file << iAdd <<
" " << isoFlag <<
"\n";
130 std::cout <<
"%Error opening output file. Tau isolation LUT not written." << std::endl;
CaloParamsHelper * m_params
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static const unsigned int nbits_data
double tauMaxJetIsolationB() const
double tauMinPtJetIsolationB() const
#define DEFINE_FWK_MODULE(type)
Stage1TauIsolationLUT * isoTauLut
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
virtual void endJob() override
void addDefault(ParameterSetDescription const &psetDescription)
~L1TCaloStage1LutWriter()
std::string m_conditionsLabel
static const unsigned int nbitsTau
static const unsigned int nbitsJet
virtual void beginJob() override
T const * product() const
static const unsigned int lut_version
L1TCaloStage1LutWriter(const edm::ParameterSet &)
void writeIsoTauLut(const std::string &fileName)
int lutPayload(unsigned int) const
bool openOutputFile(const std::string &fileName, std::ofstream &file)
std::string m_isoTauLutName
volatile std::atomic< bool > shutdown_flag false
Power< A, B >::type pow(const A &a, const B &b)
double tauMaxJetIsolationA() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)