10 verbosity_ (ps.getUntrackedParameter<int>(
"verbosity",1)),
11 beg_fed_id_ (ps.getUntrackedParameter<int>(
"beg_fed_id",0)),
12 end_fed_id_ (ps.getUntrackedParameter<int>(
"end_fed_id",654)),
13 first_event_ (ps.getUntrackedParameter<int>(
"first_event",1)),
14 last_event_ (ps.getUntrackedParameter<int>(
"last_event",9999999)),
16 writeDcc_ (ps.getUntrackedParameter<bool>(
"writeDCC",
false)),
17 filename_ (ps.getUntrackedParameter<std::string>(
"filename",
"dump.bin"))
30 std::ofstream dumpFile (
filename_.c_str(),std::ios::app );
40 std::cout <<
"\n\n\n[EcalHexDumperModule] Event: "
43 <<
" size_fed: " << data.
size() <<
"\n"<< std::endl;
45 if ( ( data.
size() %16 ) !=0)
47 std::cout <<
"***********************************************" << std::endl;
48 std::cout<<
"Fed size in bits not multiple of 64, strange." << std::endl;
49 std::cout <<
"***********************************************" << std::endl;
53 int length = data.
size();
54 const unsigned long * pData = (
reinterpret_cast<unsigned long*
>(
const_cast<unsigned char*
> ( data.
data())));
56 for (
int words=0; words < length/4; (words+=2) )
58 std::cout << std::setw(8) << std::hex << pData[words+1] <<
" ";
59 std::cout << std::setw(8) << std::hex << pData[words] << std::endl;
67 dumpFile.write( reinterpret_cast <const char *> (pData), length);
bool getByType(Handle< PROD > &result) const
size_t size() const
Lenght of the data buffer in bytes.
void analyze(const edm::Event &e, const edm::EventSetup &c)
EcalHexDisplay(const edm::ParameterSet &ps)
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.