#include <mySiStripNoises.h>
|
template<class Archive > |
void | serialize (Archive &ar, const unsigned int version) |
|
Definition at line 15 of file mySiStripNoises.h.
mySiStripNoises::mySiStripNoises |
( |
| ) |
|
|
inline |
mySiStripNoises::~mySiStripNoises |
( |
| ) |
|
|
inline |
uint16_t mySiStripNoises::decode |
( |
const uint16_t & |
strip, |
|
|
const Range & |
range |
|
) |
| const |
Definition at line 67 of file mySiStripNoises.cc.
References data, and relativeConstraints::value.
Referenced by ztail.Decoder::follow(), getNoise(), and ztail.Decoder::initial_synchronize().
68 const unsigned char *
data = &*(range.second -1);
69 static const uint16_t BITS_PER_STRIP = 9;
71 uint32_t lowBit =
strip * BITS_PER_STRIP;
72 uint8_t firstByteBit = (lowBit & 7);
73 uint8_t firstByteNBits = 8 - firstByteBit;
74 uint8_t firstByteMask = 0xffu << firstByteBit;
75 uint8_t secondByteMask = ~(0xffu << (BITS_PER_STRIP - firstByteNBits));
76 uint16_t
value = ((uint16_t(*(data-lowBit/8 )) & firstByteMask) >> firstByteBit) | ((uint16_t(*(data-lowBit/8-1)) & secondByteMask) << firstByteNBits);
char data[epos_bytes_allocation]
void mySiStripNoises::encode |
( |
InputVector & |
Vi, |
|
|
std::vector< unsigned char > & |
Vo_CHAR |
|
) |
| |
Definition at line 46 of file mySiStripNoises.cc.
References data, and mps_fire::i.
Referenced by put().
47 static const uint16_t BITS_PER_STRIP = 9;
48 const size_t VoSize = (size_t)((Vi.size() * BITS_PER_STRIP)/8+.999);
50 for(
size_t i = 0;
i<Vo.size(); ++
i)
53 for(
unsigned int stripIndex =0; stripIndex<Vi.size(); ++stripIndex){
54 unsigned char*
data = &Vo[Vo.size()-1];
55 uint32_t lowBit = stripIndex * BITS_PER_STRIP;
56 uint8_t firstByteBit = (lowBit & 0x7);
57 uint8_t firstByteNBits = 8 - firstByteBit;
58 uint8_t firstByteMask = 0xffu << firstByteBit;
59 uint8_t secondByteNbits = (BITS_PER_STRIP - firstByteNBits);
60 uint8_t secondByteMask = ~(0xffu << secondByteNbits);
62 *(data-lowBit/8) = (*(data-lowBit/8) & ~(firstByteMask)) | ((Vi[stripIndex] & 0xffu) <<firstByteBit);
63 *(data-lowBit/8-1) = (*(data-lowBit/8-1) & ~(secondByteMask)) | ((Vi[stripIndex] >> firstByteNBits) & secondByteMask);
char data[epos_bytes_allocation]
void mySiStripNoises::getDetIds |
( |
std::vector< uint32_t > & |
DetIds | ) |
const |
float mySiStripNoises::getNoise |
( |
const uint16_t & |
strip, |
|
|
const Range & |
range |
|
) |
| const |
bool mySiStripNoises::put |
( |
const uint32_t |
detID, |
|
|
InputVector & |
input |
|
) |
| |
template<class Archive >
void mySiStripNoises::serialize |
( |
Archive & |
ar, |
|
|
const unsigned int |
version |
|
) |
| |
|
private |
void mySiStripNoises::setData |
( |
float |
noise_, |
|
|
std::vector< short > & |
vped |
|
) |
| |
friend class boost::serialization::access |
|
friend |
template<typename CondSerializationT , typename Enabled >
std::vector<unsigned char> mySiStripNoises::v_noises |