SND@LHC Software
Loading...
Searching...
No Matches
SNDLHCEventHeader.cxx File Reference
#include "SNDLHCEventHeader.h"
#include "SNDLHCEventHeaderConst.h"
#include "FairRootManager.h"
#include <ctime>
#include <iostream>
#include <map>
#include <string>
#include <vector>
Include dependency graph for SNDLHCEventHeader.cxx:

Go to the source code of this file.

Functions

constexpr int maskToShift (uint64_t mask)
 

Function Documentation

◆ maskToShift()

constexpr int maskToShift ( uint64_t  mask)
constexpr

Definition at line 14 of file SNDLHCEventHeader.cxx.

14 {
15 int c = 64; // c will be the number of zero bits on the right
16 mask &= -mask;
17 if (mask) c--;
18 if (mask & 0x00000000FFFFFFFF) c -= 32;
19 if (mask & 0x0000FFFF0000FFFF) c -= 16;
20 if (mask & 0x00FF00FF00FF00FF) c -= 8;
21 if (mask & 0x0F0F0F0F0F0F0F0F) c -= 4;
22 if (mask & 0x3333333333333333) c -= 2;
23 if (mask & 0x5555555555555555) c -= 1;
24
25 return c;
26}
c
Definition hnl.py:100