BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Header24.cxx
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/**
4 * @file old/Header.cxx
5 * @author <a href="mailto:Andre.dos.Anjos@cern.ch">Andre DOS ANJOS</a>
6 * $Author: zhangy $
7 * $Revision: 1.1.1.1 $
8 * $Date: 2009/06/19 07:35:41 $
9 *
10 * Implements the old Header class
11 */
12
13#include "eformat/BadVersionIssue.h"
14#include "eformat/HeaderMarker.h"
15#include "eformat/NoSuchChildIssue.h"
16#include "eformat/SizeCheckIssue.h"
17#include "eformat/Version.h"
18#include "eformat/WrongMarkerIssue.h"
19#include "eformat/old/Header.h"
20
21eformat::old::Header::Header( const uint32_t* it, uint32_t match ) : m_start( it ) {
22 // get endiannesso
23 uint32_t m = marker();
24 if ( m != match ) throw EFORMAT_WRONG_MARKER( m, match );
25}
26
28 if ( version() >> 16 != eformat::MAJOR_OLD_VERSION )
30 if ( header_size_word() != ( 9 + nstatus() + noffset() + nspecific() ) )
32 ( 9 + nstatus() + noffset() + nspecific() ) );
33 return true;
34}
35
36const uint32_t* eformat::old::Header::child( size_t n ) const {
37 if ( n >= noffset() ) throw EFORMAT_NO_SUCH_CHILD( n, noffset() );
38 return &m_start[0xffffff & offset()[n]];
39}
const Int_t n
#define EFORMAT_BAD_VERSION(current, supported)
#define EFORMAT_NO_SUCH_CHILD(req, total)
#define EFORMAT_SIZE_CHECK(actual, informed)
#define EFORMAT_WRONG_MARKER(current, expected)
virtual bool check() const
Definition Header24.cxx:27
Header(const uint32_t *it, uint32_t match)
Definition Header24.cxx:21
const uint32_t * child(size_t n) const
Definition Header24.cxx:36