Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
EventFilter
ESRawToDigi
interface
ESCrcKchipFast.h
Go to the documentation of this file.
1
#ifndef ESCrcKchipFast_H
2
#define ESCrcKchipFast_H
3
4
class
ESCrcKchipFast
{
5
6
private
:
7
8
uint32_t
crc
;
9
10
public
:
11
12
ESCrcKchipFast
() {
13
init
();
14
reset
() ;
15
};
16
17
void
init
() {
18
crc
= 0x0ffff ;
19
}
20
21
void
reset
() {
22
crc
= 0x0ffff ;
23
} ;
24
25
void
add
(
unsigned
int
data
) {
26
for
(
int
i
=0;
i
<16;
i
++)
27
{
28
if
((
crc
&0x0001) == (data&0x0001))
29
crc
=
crc
>>1;
30
else
31
crc
=(
crc
>>1)^0x8408;
// flipped 0x1021;
32
data=(data>>1);
33
}
34
};
35
36
uint32_t
get_crc
() {
37
return
crc
;
38
};
39
40
bool
isCrcOk
(
unsigned
int
crcin=0x0000) {
41
return
((
get_crc
()==crcin) ?
true
:
false
);
42
};
43
44
~ESCrcKchipFast
() { } ;
45
46
};
47
48
#endif
i
int i
Definition:
DBlmapReader.cc:9
ESCrcKchipFast
Definition:
ESCrcKchipFast.h:4
ESCrcKchipFast::crc
uint32_t crc
Definition:
ESCrcKchipFast.h:8
ESCrcKchipFast::isCrcOk
bool isCrcOk(unsigned int crcin=0x0000)
Definition:
ESCrcKchipFast.h:40
ESCrcKchipFast::add
void add(unsigned int data)
Definition:
ESCrcKchipFast.h:25
ESCrcKchipFast::init
void init()
Definition:
ESCrcKchipFast.h:17
ESCrcKchipFast::get_crc
uint32_t get_crc()
Definition:
ESCrcKchipFast.h:36
ESCrcKchipFast::reset
void reset()
Definition:
ESCrcKchipFast.h:21
ESCrcKchipFast::~ESCrcKchipFast
~ESCrcKchipFast()
Definition:
ESCrcKchipFast.h:44
ESCrcKchipFast::ESCrcKchipFast
ESCrcKchipFast()
Definition:
ESCrcKchipFast.h:12
AlCaHLTBitMon_QueryRunRegistry.data
tuple data
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:288
Generated for CMSSW Reference Manual by
1.8.5