11 const char*
name[12] = {
"registersSP1",
24 for (
int sp = 0; sp < 12; sp++) {
25 std::vector<std::string> regs =
pset.getParameter<std::vector<std::string> >(
name[sp]);
26 for (std::vector<std::string>::const_iterator
line = regs.begin();
line != regs.end();
line++)
30 alignment =
pset.getParameter<std::vector<double> >(
"alignment");
39 edm::LogInfo(
"L1-O2O: CSCTFConfigProducer") <<
"Producing "
40 <<
" L1MuCSCTFConfiguration from PSET";
42 std::unique_ptr<L1MuCSCTFConfiguration>
config = std::make_unique<L1MuCSCTFConfiguration>(
registers);
48 edm::LogInfo(
"L1-O2O: CSCTFConfigProducer") <<
"Producing "
49 <<
" L1MuCSCTFAlignment from PSET";
51 std::unique_ptr<L1MuCSCTFAlignment> al = std::make_unique<L1MuCSCTFAlignment>(
alignment);
56 edm::LogInfo(
"L1-O2O: CSCTFConfigProducer") <<
"Producing "
57 <<
" L1MuCSCPtLut from PSET";
59 std::unique_ptr<L1MuCSCPtLut> pt_lut = std::make_unique<L1MuCSCPtLut>();
65 <<
"CSCTFConfigProducer is unable to generate LUTs on the fly.\n"
66 "Specify full LUT file names or just avoid using CSCTFConfigProducer by uncommenting PTLUT "
67 "parameter sets in L1Trigger/CSCTrackFinder configuration."
75 if (
path.find(
".bin") != std::string::npos) {
76 std::ifstream
file(
path.c_str(), std::ios::binary);
77 file.read((
char*)lut, length *
sizeof(
unsigned short));
79 throw cms::Exception(
"Reading error") <<
"CSCTFConfigProducer cannot read " << length <<
" words from " <<
path
80 <<
" (errno=" << errno <<
")" << std::endl;
81 if ((
unsigned int)
file.gcount() != length *
sizeof(
unsigned short))
83 <<
"CSCTFConfigProducer read " << (
file.gcount() /
sizeof(
unsigned short)) <<
" words from " <<
path
84 <<
" instead of " << length <<
" (errno=" << errno <<
")" << std::endl;
90 <<
"CSCTFConfigProducer cannot open " <<
path <<
" (errno=" << errno <<
")" << std::endl;
91 unsigned int address = 0;
92 for (address = 0; !
file.eof() && address < length; address++)
94 if (address != length)
96 <<
"CSCTFConfigProducer read " << address <<
" words from " <<
path <<
" instead of " << length << std::endl;
99 LogDebug(
"CSCTFConfigProducer::readLUT") <<
" read from " <<
path <<
" " << length <<
" words" << std::endl;