ATLAS Offline Software
Loading...
Searching...
No Matches
Control
CoWTools
CoWTools
CoWRecord.h
Go to the documentation of this file.
1
// --*- c++ -*--
2
3
/*
4
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5
*/
6
7
#ifndef COWTOOLS_RECORD
8
#define COWTOOLS_RECORD
9
#include "
CoWTools/CoWRecordStats.h
"
10
11
namespace
CoWTools
{
12
class
CoWRecord
{
13
public
:
14
CoWRecord
(
bool
summary=
true
):
15
addrStart
(0),
16
addrEnd
(0),
17
perms
(0),
18
offset
(0),
19
inode
(0),
20
m_ms
(summary),
21
dmin
(0),
22
dmaj
(0)
23
{}
24
unsigned
long
addrStart
,
addrEnd
;
25
short
perms
;
26
unsigned
long
long
offset
;
27
unsigned
long
inode
;
28
CoWRecordStats
m_ms
;
29
unsigned
int
dmin
,
dmaj
;
30
void
parseRecord
(std::istream& in);
31
public
:
32
friend
CoWRecord
operator-
(
CoWRecord
lhs,
const
CoWRecord
& rhs){
33
return
lhs-=rhs;
34
}
35
CoWRecord
operator-
()
const
{
36
CoWRecord
m(*
this
);
37
m.m_ms=-
m_ms
;
38
return
m;
39
}
40
explicit
operator
bool()
const
{
41
auto
vals=
m_ms
.getValueArray();
42
for
(
int
i=0;i<11;i++){
43
if
(vals[i])
return
true
;
44
}
45
return
false
;
46
}
47
48
friend
CoWRecord
operator+
(
CoWRecord
lhs,
const
CoWRecord
& rhs){
49
return
lhs+=rhs;
50
}
51
52
inline
CoWRecord
&
operator+=
(
const
CoWRecord
& rhs){
53
perms
|=rhs.
perms
;
54
m_ms
+=rhs.
m_ms
;
55
return
*
this
;
56
}
57
58
inline
CoWRecord
&
operator-=
(
const
CoWRecord
& rhs){
59
perms
^=rhs.
perms
;
60
m_ms
-=rhs.
m_ms
;
61
return
*
this
;
62
}
63
};
64
65
}
//end namespace
66
67
#endif
CoWRecordStats.h
CoWTools::CoWRecordStats
Definition
CoWRecordStats.h:13
CoWTools::CoWRecord::inode
unsigned long inode
Definition
CoWRecord.h:27
CoWTools::CoWRecord::parseRecord
void parseRecord(std::istream &in)
Definition
CoWRecord.cxx:8
CoWTools::CoWRecord::operator-=
CoWRecord & operator-=(const CoWRecord &rhs)
Definition
CoWRecord.h:58
CoWTools::CoWRecord::operator-
friend CoWRecord operator-(CoWRecord lhs, const CoWRecord &rhs)
Definition
CoWRecord.h:32
CoWTools::CoWRecord::operator-
CoWRecord operator-() const
Definition
CoWRecord.h:35
CoWTools::CoWRecord::m_ms
CoWRecordStats m_ms
Definition
CoWRecord.h:28
CoWTools::CoWRecord::dmaj
unsigned int dmaj
Definition
CoWRecord.h:29
CoWTools::CoWRecord::addrEnd
unsigned long addrEnd
Definition
CoWRecord.h:24
CoWTools::CoWRecord::CoWRecord
CoWRecord(bool summary=true)
Definition
CoWRecord.h:14
CoWTools::CoWRecord::addrStart
unsigned long addrStart
Definition
CoWRecord.h:24
CoWTools::CoWRecord::operator+=
CoWRecord & operator+=(const CoWRecord &rhs)
Definition
CoWRecord.h:52
CoWTools::CoWRecord::dmin
unsigned int dmin
Definition
CoWRecord.h:29
CoWTools::CoWRecord::perms
short perms
Definition
CoWRecord.h:25
CoWTools::CoWRecord::offset
unsigned long long offset
Definition
CoWRecord.h:26
CoWTools::CoWRecord::operator+
friend CoWRecord operator+(CoWRecord lhs, const CoWRecord &rhs)
Definition
CoWRecord.h:48
CoWTools
Definition
CoWLibrary.h:15
Generated on
for ATLAS Offline Software by
1.14.0