3 #ifndef EMTFUnpackerTools_h 4 #define EMTFUnpackerTools_h 20 if (exp == 0)
return 1;
21 if (exp == 1)
return base;
22 return base *
PowInt(base, exp-1);
27 if (bits >> (nBits - 1) == 0)
return bits;
28 else return bits -
PowInt(2, nBits);
32 inline uint16_t
GetHexBits(uint16_t word, uint16_t lowBit, uint16_t highBit) {
33 return ( (word >> lowBit) & (
PowInt(2, (1 + highBit - lowBit)) - 1) );
37 inline uint32_t
GetHexBits(uint32_t word, uint32_t lowBit, uint32_t highBit) {
38 return ( (word >> lowBit) & (
PowInt(2, (1 + highBit - lowBit)) - 1) );
42 inline uint32_t
GetHexBits(uint16_t word1, uint16_t lowBit1, uint16_t highBit1,
43 uint16_t word2, uint16_t lowBit2, uint16_t highBit2) {
44 uint16_t word1_sel = (word1 >> lowBit1) & (
PowInt(2, (1 + highBit1 - lowBit1)) - 1);
45 uint16_t word2_sel = (word2 >> lowBit2) & (
PowInt(2, (1 + highBit2 - lowBit2)) - 1);
46 return ( (word2_sel << (1 + highBit1 - lowBit1)) | word1_sel );
int PowInt(int base, int exp)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
int TwosCompl(int nBits, int bits)
base
Make Sure CMSSW is Setup ##.
uint16_t GetHexBits(uint16_t word, uint16_t lowBit, uint16_t highBit)