/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/eformat/eformat-00-00-04/src/old/Header24.cxx

Go to the documentation of this file.
00001 //Dear emacs, this is -*- c++ -*-
00002 
00013 #include "eformat/old/Header.h"
00014 #include "eformat/HeaderMarker.h"
00015 #include "eformat/Version.h"
00016 #include "eformat/SizeCheckIssue.h"
00017 #include "eformat/BadVersionIssue.h"
00018 #include "eformat/WrongMarkerIssue.h"
00019 #include "eformat/NoSuchChildIssue.h"
00020 
00021 eformat::old::Header::Header (const uint32_t* it, uint32_t match)
00022   : m_start(it)
00023 {
00024   //get endiannesso
00025   uint32_t m = marker();
00026   if (m != match) throw EFORMAT_WRONG_MARKER(m, match);
00027 }
00028 
00029 bool eformat::old::Header::check () const
00030 {
00031   if ( version() >> 16 != eformat::MAJOR_OLD_VERSION )
00032     throw EFORMAT_BAD_VERSION(version() >> 16, eformat::MAJOR_OLD_VERSION);
00033   if ( header_size_word() != (9 + nstatus() + noffset() + nspecific()) )
00034     throw EFORMAT_SIZE_CHECK(header_size_word(),
00035                              (9 + nstatus() + noffset() + nspecific()));
00036   return true;
00037 }
00038 
00039 const uint32_t* eformat::old::Header::child (size_t n) const
00040 {
00041   if (n >= noffset()) throw EFORMAT_NO_SUCH_CHILD(n, noffset());
00042   return &m_start[0xffffff & offset()[n]];
00043 }
00044 
00045 
00046 
00047 

Generated on Tue Nov 29 22:58:25 2016 for BOSS_7.0.2 by  doxygen 1.4.7