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;
21 <<
"GctDigiToPsbText::GctDigiToPsbText : "
22 <<
" couldn't create the file " <<
fileName
30 for (
unsigned i=0;
i<4;
i++)
47 uint16_t
data[4][2]= {{0}};
48 for (
int i=0;
i<4;
i++)
49 for (
int j=0;
j<2;
j++)
52 std::stringstream sstrm;
54 sstrm << std::uppercase;
56 sstrm.unsetf(std::ios::uppercase);
59 unsigned short cbs[2] = {1,0};
63 unsigned iIsola, iNoIso;
65 for(
int i=0;
i<4;
i++) {
72 data[iIsola][cycle] = gctIsolaEm->at(
i).raw();
73 data[iNoIso][cycle] = gctNoIsoEm->at(
i).raw();
77 sstrm << setw(4) << setfill(
'0') << std::hex
78 << (data[iIsola][cycle] & 0x7fff) + ((cbs[cycle]&0x1)<<15);
79 m_file[iIsola] << sstrm.str() << std::endl;
81 sstrm << setw(4) << setfill(
'0') << std::hex
82 << (data[iNoIso][cycle] & 0x7fff) + ((cbs[cycle]&0x1)<<15);
83 m_file[iNoIso] << sstrm.str() << std::endl;
87 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
char data[epos_bytes_allocation]
volatile std::atomic< bool > shutdown_flag false
virtual void analyze(const edm::Event &, const edm::EventSetup &)
GctDigiToPsbText(const edm::ParameterSet &)