9 : m_gctInputLabel(iConfig.getParameter<edm::
InputTag>(
"GctInputLabel")),
10 m_textFileName(iConfig.getParameter<std::
string>(
"TextFileName")),
11 m_hexUpperCase(iConfig.getUntrackedParameter<bool>(
"HexUpperCase",
false)) {
13 for (
unsigned i = 0;
i < 4;
i++) {
14 std::stringstream fileStream;
15 int ii = (
i < 2) ?
i :
i + 4;
21 <<
"GctDigiToPsbText::GctDigiToPsbText : "
22 <<
" couldn't create the file " <<
fileName << std::endl;
29 for (
unsigned i = 0;
i < 4;
i++)
43 uint16_t
data[4][2] = {{0}};
44 for (
int i = 0;
i < 4;
i++)
45 for (
int j = 0;
j < 2;
j++)
48 std::stringstream sstrm;
50 sstrm << std::uppercase;
52 sstrm.unsetf(std::ios::uppercase);
55 unsigned short cbs[2] = {1, 0};
59 unsigned iIsola, iNoIso;
61 for (
int i = 0;
i < 4;
i++) {
68 data[iIsola][cycle] = gctIsolaEm->at(
i).raw();
69 data[iNoIso][cycle] = gctNoIsoEm->at(
i).raw();
73 sstrm << setw(4) << setfill(
'0') << std::hex << (data[iIsola][cycle] & 0x7fff) + ((cbs[cycle] & 0x1) << 15);
74 m_file[iIsola] << sstrm.str() << std::endl;
76 sstrm << setw(4) << setfill(
'0') << std::hex << (data[iNoIso][cycle] & 0x7fff) + ((cbs[cycle] & 0x1) << 15);
77 m_file[iNoIso] << sstrm.str() << std::endl;
81 for (
unsigned i = 0;
i < 4;
i++)
std::ofstream m_file[4]
handles for output files
std::string m_textFileName
basename for output files
edm::InputTag m_gctInputLabel
label for input digis
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
bool m_hexUpperCase
write upper case hex words
auto const good
min quality of good
~GctDigiToPsbText() override
char data[epos_bytes_allocation]
void analyze(const edm::Event &, const edm::EventSetup &) override
GctDigiToPsbText(const edm::ParameterSet &)