10 std::multimap<int,Identifier> indexmap;
14 indexmap.insert(std::pair<int,Identifier>(std::abs(itr->second),itr->first));
15 std::vector< std::vector<float> > tmp(
m_buf);
19 for (;i<(int)tmp.size();i++){
22 std::multimap<int,Identifier>::iterator pos;
23 for ( pos=indexmap.lower_bound(i); pos!=indexmap.upper_bound(i); ++pos){
26 shared_id=pos->second;
27 this->
push_back(shared_id,tmp[std::abs(i)]);
29 this->
share(pos->second,shared_id);
35 std::cout <<
"dbg:" <<
m_bufmap.size() <<
" " <<
m_buf.size() << std::endl;
40 os << store.tag() << std::endl ;
43 std::map<int, std::vector<Identifier> > indextoidentmap ;
45 indextoidentmap[it.second].push_back(it.first) ;
47 os << indextoidentmap.size() << std::endl ;
50 for( std::map<
int, std::vector<Identifier> >
::const_iterator it = indextoidentmap.begin() ;
51 it != indextoidentmap.end(); ++it) {
52 os << it->second.size() <<
" " ;
53 for(
auto vit : it->second)
55 const std::vector<float>&
data = store[it->second.front()] ;
56 os <<
data.size() <<
" " ;
69 std::vector<int> identifiers(0) ;
70 std::vector<float>
data(0) ;
71 constexpr int maxLines=2000000;
72 constexpr int maxSize=2000000;
75 if ((nlines>=0) and (nlines<maxLines)) {
76 for(
int iline = 0; iline <nlines; ++iline) {
79 if ((size>=0) and (size<maxSize)){
80 identifiers.resize(size) ;
81 for(
int i=0; i<size; ++i) is >> (identifiers[i]) ;
85 log << MSG::ERROR <<
"size of identifier is incorrect" <<
endmsg;
89 if ((size>=0) and (size<maxSize)){
91 for(
int i=0; i<size; ++i) is >> (
data[i]) ;
95 log << MSG::ERROR <<
"size of data is incorrect" <<
endmsg;
100 std::vector<int>::const_iterator it = identifiers.begin() ;
std::ostream & operator<<(std::ostream &os, const FloatArrayStore &store)
std::istream & operator>>(std::istream &is, FloatArrayStore &store)
char data[hepevt_bytes_allocation_ATLAS]
class FloatArrayStore Access and manipulate an indexed storage of float vectors
void cleanUp()
remove data with no index pointing to it
void share(const Identifier &ident, const Identifier &referenceIdent)
makes index ident share data with referenceIdent
BufferMap::const_iterator map_citr
BufferMap m_bufmap
The std::map.
void push_back(const Identifier &ident, const std::vector< float > &value)
makes new indices
void dbg() const
print method
Buffer m_buf
The std::vector<float> stored in each second element.
singleton-like access to IMessageSvc via open function and helper
IMessageSvc * getMessageSvc(bool quiet=false)