BOSS 7.0.5
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:[email protected]">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/old/ROBFragment.h"
14#include "eformat/old/RODFragment.h"
15#include "eformat/SizeCheckIssue.h"
16#include "eformat/HeaderMarker.h"
17
19 : eformat::old::Header(it, eformat::ROB),
20 m_start(specific_header())
21{
22}
23
25{
26 eformat::old::Header::check(); //< first do a generic check
27 if (nspecific() != 4) throw EFORMAT_SIZE_CHECK(4, nspecific());
28 return true;
29}
30
32{
33 check(); // check myself
34 for (size_t i=0; i<noffset(); ++i) {
35 size_t rod_size = 0;
36 //typical
37 if (noffset() == 1) rod_size = fragment_size_word() - header_size_word();
38 else { //more atypical, have to calculate
39 if (i != noffset() - 1) rod_size = (0xffffff & offset()[i+1]);
40 else rod_size = fragment_size_word();
41 rod_size -= (0xffffff & offset()[i]);
42 }
43 eformat::old::RODFragment f(child(i), rod_size);
44 f.check();
45 }
46 return true;
47}
48
50{
51 check();
52 size_t rod_size = 0;
53 //typical
54 if (noffset() == 1)
55 rod_size = fragment_size_word() - header_size_word();
56 else { //more atypical, have to calculate
57 if (n != noffset() - 1) rod_size = (0xffffff & offset()[n+1]);
58 else rod_size = fragment_size_word();
59 rod_size -= (0xffffff & offset()[n]);
60 }
61 eformat::old::RODFragment f(child(n), rod_size);
62 f.check();
63 return f;
64}
65
66
67
const Int_t n
#define EFORMAT_SIZE_CHECK(actual, informed)
virtual bool check() const
Definition: Header24.cxx:29
virtual bool check() const
eformat::old::RODFragment rod(size_t n) const
ROBFragment(const uint32_t *it)
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")