19 char* kHeadsAddr = (
char*)0x00000300CAFE0000;
28 touchAll,
"/tmp/lem_preload_heads.lock");
30 heads->
fNHeads = ((
int*)kHeadsAddr)[0];
56 heads->
fNHeads = ((
int*)kHeadsAddr)[0];
105 heads->
fNHeads = ((
int*)kHeadsAddr)[0];
106 heads->
fLibSize = ((
int*)kHeadsAddr)[1];
123 heads->
fNHeads = ((
int*)kHeadsAddr)[0];
124 heads->
fLibSize = ((
int*)kHeadsAddr)[1];
149 os << hs.
fNHeads <<
" heads, for a librar of " << hs.
fLibSize <<
" events.";
static Heads * FromMMapOnDemand(const std::string &libPath)
int ChildIdxFor(int head, int child) const
bool FlipEvenFor(int head, int child) const
Mapping from a subset of the library to their best matches.
Eigen::Matrix< T, Eigen::Dynamic, 1 > head(const Eigen::Matrix< T, Eigen::Dynamic, 1 > &v, size_t n)
static HeadsTranspose * FromMMapOnDemand(const std::string &libPath)
long MMapFileAtAddress(const std::string &fname, void *addr, bool touchAll, const std::string &lockName)
bool FlipOddFor(int head, int child) const
Mapping from a subset of the library to their best matches.
Utilities for mapping in library files on-demand.
friend std::ostream & operator<<(std::ostream &, const lem::Heads &)
static HeadsTranspose * FromMMap(const std::string &libPath)
assert(nhit_max >=nhit_nbins)
static Heads * FromMMap(const std::string &libPath, bool touchAll)
void CreateOnDemandMapping(const std::string &fname, const char *base)