Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
DataFormats
FEDRawData
src
FEDRawData.cc
Go to the documentation of this file.
1
9
#include <
DataFormats/FEDRawData/interface/FEDRawData.h
>
10
#include <
FWCore/Utilities/interface/Exception.h
>
11
#include <iostream>
12
13
using namespace
std;
14
15
FEDRawData::FEDRawData
()
16
{
17
}
18
19
FEDRawData::FEDRawData
(
size_t
newsize):data_(newsize){
20
if
(newsize%8!=0)
throw
cms::Exception
(
"DataCorrupt"
) <<
"FEDRawData::resize: "
<< newsize <<
" is not a multiple of 8 bytes."
<< endl;
21
}
22
23
FEDRawData::FEDRawData
(
const
FEDRawData
&
in
) : data_(in.data_)
24
{
25
}
26
FEDRawData::~FEDRawData
()
27
{
28
}
29
const
unsigned
char
*
FEDRawData::data
()
const
{
return
&
data_
[0];}
30
31
unsigned
char
*
FEDRawData::data
() {
return
&
data_
[0];}
32
33
void
FEDRawData::resize
(
size_t
newsize) {
34
if
(
size
()==newsize)
return
;
35
36
data_
.resize(newsize);
37
38
if
(newsize%8!=0)
throw
cms::Exception
(
"DataCorrupt"
) <<
"FEDRawData::resize: "
<< newsize <<
" is not a multiple of 8 bytes."
<< endl;
39
}
recoMuon::in
Definition:
RecoMuonEnumerators.h:6
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition:
FEDRawData.h:47
FEDRawData::FEDRawData
FEDRawData()
Default ctor.
Definition:
FEDRawData.cc:15
FEDRawData::resize
void resize(size_t newsize)
Definition:
FEDRawData.cc:33
FEDRawData
Definition:
FEDRawData.h:20
Exception.h
FEDRawData::data_
Data data_
Definition:
FEDRawData.h:56
edm::hlt::Exception
error
Definition:
HLTenums.h:24
FEDRawData.h
FEDRawData::data
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition:
FEDRawData.cc:29
FEDRawData::~FEDRawData
~FEDRawData()
Dtor.
Definition:
FEDRawData.cc:26
Generated for CMSSW Reference Manual by
1.8.5