#include "TRT_ConditionsData/FloatArrayStore.h"
#include "GaudiKernel/MsgStream.h"
#include "AthenaKernel/getMessageSvc.h"
#include <iostream>
Go to the source code of this file.
◆ operator<<()
| std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
const FloatArrayStore & | store ) |
Definition at line 40 of file FloatArrayStore.cxx.
40 {
41 os <<
store.tag() << std::endl ;
42
43
44 std::map<int, std::vector<Identifier> > indextoidentmap ;
45 for(auto it : store)
46 indextoidentmap[
it.second].push_back(
it.first) ;
47
48 os << indextoidentmap.size() << std::endl ;
49
50
51 for( std::map<
int, std::vector<Identifier> >
::const_iterator it = indextoidentmap.begin() ;
52 it != indextoidentmap.end(); ++it) {
53 os <<
it->second.size() <<
" " ;
54 for(
auto vit :
it->second)
56 const std::vector<float>&
data =
store[
it->second.front()] ;
61 }
63}
char data[hepevt_bytes_allocation_ATLAS]
◆ operator>>()
Definition at line 65 of file FloatArrayStore.cxx.
65 {
71 std::vector<float>
data(0) ;
72 constexpr int maxLines=2000000;
73 constexpr int maxSize=2000000;
74 int nlines ;
75 is >> nlines ;
76 if ((nlines>=0) and (nlines<maxLines)) {
77 for(int iline = 0; iline <nlines; ++iline) {
78 int size ;
79 is >> size ;
80 if ((size>=0) and (size<maxSize)){
83 }
84 else {
86 log << MSG::ERROR <<
"size of identifier is incorrect" <<
endmsg;
87 return is;
88 }
89 is >> size ;
90 if ((size>=0) and (size<maxSize)){
92 for(
int i=0; i<size; ++i) is >> (
data[
i]) ;
93 }
94 else {
96 log << MSG::ERROR <<
"size of data is incorrect" <<
endmsg;
97 return is;
98 }
103 }
104 }
105 return is ;
106}
class FloatArrayStore Access and manipulate an indexed storage of float vectors
IMessageSvc * getMessageSvc(bool quiet=false)
std::vector< Identifier > identifiers(const InDetSimDataCollection &coll)