BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
ROBFragment24.cxx
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/**
4 * @file old/ROBFragment.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 eformat 2.4 ROB fragment
11 */
12
13#include "eformat/HeaderMarker.h"
14#include "eformat/SizeCheckIssue.h"
15#include "eformat/old/ROBFragment.h"
16#include "eformat/old/RODFragment.h"
17
19 : eformat::old::Header( it, eformat::ROB ), m_start( specific_header() ) {}
20
22 eformat::old::Header::check(); //< first do a generic check
23 if ( nspecific() != 4 ) throw EFORMAT_SIZE_CHECK( 4, nspecific() );
24 return true;
25}
26
28 check(); // check myself
29 for ( size_t i = 0; i < noffset(); ++i )
30 {
31 size_t rod_size = 0;
32 // typical
33 if ( noffset() == 1 ) rod_size = fragment_size_word() - header_size_word();
34 else
35 { // more atypical, have to calculate
36 if ( i != noffset() - 1 ) rod_size = ( 0xffffff & offset()[i + 1] );
37 else rod_size = fragment_size_word();
38 rod_size -= ( 0xffffff & offset()[i] );
39 }
40 eformat::old::RODFragment f( child( i ), rod_size );
41 f.check();
42 }
43 return true;
44}
45
47 check();
48 size_t rod_size = 0;
49 // typical
50 if ( noffset() == 1 ) rod_size = fragment_size_word() - header_size_word();
51 else
52 { // more atypical, have to calculate
53 if ( n != noffset() - 1 ) rod_size = ( 0xffffff & offset()[n + 1] );
54 else rod_size = fragment_size_word();
55 rod_size -= ( 0xffffff & offset()[n] );
56 }
57 eformat::old::RODFragment f( child( n ), rod_size );
58 f.check();
59 return f;
60}
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
const Int_t n
#define EFORMAT_SIZE_CHECK(actual, informed)
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
virtual bool check() const
eformat::old::RODFragment rod(size_t n) const
ROBFragment(const uint32_t *it)