37 #ifndef AIMS_IO_BCKR_H 
   38 #define AIMS_IO_BCKR_H 
   54     BckReader( 
const std::string& name ) : _name(name), _itemr( 0 ) {}
 
   59       { 
delete _itemr; _itemr = ir; }
 
   67   template<
class T> 
inline  
   72         << 
"Warning : .bck single frame reading not implemented yet -\n"  
   73         << 
"reading whole bucket\n";
 
   78     std::ifstream::off_type offset = buf; 
 
   81     bool ascii = ( hdr.
openMode() == 
"ascii" );
 
   82     std::ifstream       is( fname.c_str(), std::ios::in | std::ios::binary );
 
   85     is.unsetf( std::ios::skipws );
 
   91       is.unsetf( std::ios::skipws );
 
  101     int size = hdr.
dimT();
 
  102     uint32_t time=0, nitem=0;
 
  105     for ( 
int t=0; t<size; ++t )
 
  109             carto::StreamUtil::skip( is );
 
  111             if ( tmp != 
"-time" )
 
  114         sr->read( is, time );
 
  117             carto::StreamUtil::skip( is );
 
  122         sr->read( is, nitem );
 
  125         std::list<AimsBucketItem<T> >   & items = thing[ time ];
 
  128         for ( uint32_t n=0; n<nitem; ++n )
 
  130             ir->read( is, item );
 
  131             items.push_back(item);
 
  141 template<
class T> 
inline  
  145   reader.
read( thing );
 
aims::BckReader< T > & operator>>(aims::BckReader< T > &reader, AimsBucket< T > &thing)
The template base class for all types of bucket items.
The bucket base class to manage packages of points associated to their value during time.
void setHeader(const aims::PythonHeader &hdr)
BckReader(const std::string &name)
void read(AimsBucket< T > &thing, int frame=-1)
void setItemReader(ItemReader< T > *ir)
Default low-levels readers.
virtual ItemReader< T > * reader(const std::string &openmode="binar", bool bswap=false) const
Low-level "small item" reader, used by higher-level file readers.
static void launchErrnoExcept(const std::string &filename="")
#define AIMS_MAGIC_NUMBER
The class for EcatSino data write operation.