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
18
eformat::old::ROBFragment::ROBFragment
(
const
uint32_t* it )
19
:
eformat
::
old
::
Header
( it,
eformat
::
ROB
), m_start(
specific_header
() ) {}
20
21
bool
eformat::old::ROBFragment::check
()
const
{
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
27
bool
eformat::old::ROBFragment::check_tree
()
const
{
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
46
eformat::old::RODFragment
eformat::old::ROBFragment::rod
(
size_t
n
)
const
{
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
}
f
TFile f("ana_bhabha660a_dqa_mcPat_zy_old.root")
n
const Int_t n
Definition
DataBase/tau_mode.c:57
EFORMAT_SIZE_CHECK
#define EFORMAT_SIZE_CHECK(actual, informed)
Definition
Event/eformat/include/eformat/SizeCheckIssue.h:64
eformat::old::Header::check
virtual bool check() const
Definition
Header24.cxx:27
eformat::old::Header::offset
const uint32_t * offset(void) const
Definition
Event/eformat/include/eformat/old/Header.h:115
eformat::old::Header::fragment_size_word
uint32_t fragment_size_word() const
Definition
Event/eformat/include/eformat/old/Header.h:71
eformat::old::Header::Header
Header(const uint32_t *it, uint32_t match)
Definition
Header24.cxx:21
eformat::old::Header::child
const uint32_t * child(size_t n) const
Definition
Header24.cxx:36
eformat::old::Header::noffset
uint32_t noffset() const
Definition
Event/eformat/include/eformat/old/Header.h:109
eformat::old::Header::nspecific
uint32_t nspecific() const
Definition
Event/eformat/include/eformat/old/Header.h:121
eformat::old::Header::specific_header
const uint32_t * specific_header(void) const
Definition
Event/eformat/include/eformat/old/Header.h:127
eformat::old::Header::header_size_word
uint32_t header_size_word() const
Definition
Event/eformat/include/eformat/old/Header.h:77
eformat::old::ROBFragment::check
virtual bool check() const
Definition
ROBFragment24.cxx:21
eformat::old::ROBFragment::check_tree
bool check_tree() const
Definition
ROBFragment24.cxx:27
eformat::old::ROBFragment::rod
eformat::old::RODFragment rod(size_t n) const
Definition
ROBFragment24.cxx:46
eformat::old::ROBFragment::ROBFragment
ROBFragment(const uint32_t *it)
Definition
ROBFragment24.cxx:18
eformat::old::RODFragment
Definition
Event/eformat/include/eformat/old/RODFragment.h:32
eformat::old
Definition
Event/eformat/include/eformat/old/FullEventFragment.h:21
eformat
Definition
Event/eformat/include/eformat/BadVersionIssue.h:20
eformat::ROB
@ ROB
The ROB marker.
Definition
Event/eformat/include/eformat/HeaderMarker.h:28
8.0.0
BOSS_Source
Event
eformat
src
old
ROBFragment24.cxx
Generated by
1.16.1