49 for (
size_t pos1 = 0, pos2 =
events.find(
',');; pos1 = pos2 + 1, pos2 =
events.find(
',', pos2 + 1)) {
50 if (pos2 != std::string::npos) {
52 if (sscanf(
events.substr(pos1, pos2 - pos1).c_str(),
"%ld", &
event) == 1 &&
event >= 0)
56 <<
") parameter: " <<
events.substr(pos1, pos2 - pos1);
63 <<
") parameter: " <<
events.substr(pos1,
events.length() - pos1);
67 std::ostringstream
tmp;
70 edm::LogInfo(
"CSCFileDumper") <<
" Following events will be dumped: " <<
tmp.str();
72 edm::LogInfo(
"CSCFileDumper") <<
" All events will be dumped";
96 unsigned short int length = fedData.
size();
100 std::ostringstream
name;
101 name <<
output <<
"_FED" <<
id <<
".raw" << std::ends;
103 if ((
file = fopen(
name.str().c_str(),
"wt")) ==
nullptr) {
112 size_t size = length / 2;
113 const unsigned short *
buf = (
unsigned short *)fedData.
data();
CSCFileDumper(edm::ParameterSet const &pset)
edm::EDGetTokenT< FEDRawDataCollection > i_token
Token for consumes interface & access to data.
void analyze(const edm::Event &e, const edm::EventSetup &c) override
size_t size() const
Lenght of the data buffer in bytes.
Log< level::Error, false > LogError
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
std::set< unsigned long > eventsToDump
std::vector< unsigned int > cscFEDids
std::map< int, FILE * > dump_files
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
Log< level::Info, false > LogInfo
~CSCFileDumper(void) override
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.