ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
CoraCool
CoraCool
CoraCoolObject.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef CORACOOL_CORACOOLOBJECT_H
6
#define CORACOOL_CORACOOLOBJECT_H
7
// CoraCoolObject.h - interface to an object read from a CoraCool folder
8
// The object has COOL properties (start/end IOV, channel)
9
// and a payload consisting of a vector of coral::AttributeList
10
// Richard Hawkings, started 10/2006
11
12
#include <vector>
13
#include "CoralBase/Attribute.h"
14
#include "CoralBase/AttributeList.h"
15
#include "CoralBase/AttributeListSpecification.h"
16
#include "CoolKernel/types.h"
17
#include "CoolKernel/ValidityKey.h"
18
#include "CoolKernel/ChannelId.h"
19
20
class
CoraCoolObject
{
21
public
:
22
typedef
std::vector<coral::AttributeList>
AttrListVec
;
23
typedef
AttrListVec::const_iterator
const_iterator
;
24
typedef
AttrListVec::size_type
size_type
;
25
26
// constructor - the object initially has no payload data
27
// payload data is added after construction using the add method
28
CoraCoolObject
(
const
cool::ValidityKey&
since
,
29
const
cool::ValidityKey&
until
,
const
cool::ChannelId& chan);
30
// constructor specifying external AttributeListSpecification to use as a
31
// shared specification for all the attribute lists
32
CoraCoolObject
(
const
cool::ValidityKey&
since
,
33
const
cool::ValidityKey&
until
,
const
cool::ChannelId& chan,
34
const
coral::AttributeListSpecification* spec);
35
~CoraCoolObject
();
36
37
// data accessors
38
cool::ValidityKey
since
()
const
;
39
cool::ValidityKey
until
()
const
;
40
cool::ChannelId
channelId
()
const
;
41
// const iterators over the data members
42
const_iterator
begin
()
const
;
43
const_iterator
end
()
const
;
44
size_type
size
()
const
;
45
46
// add an AttributeList of payload data
47
void
add
(
const
coral::AttributeList& data);
48
49
private
:
50
cool::ValidityKey
m_since
;
51
cool::ValidityKey
m_until
;
52
cool::ChannelId
m_chan
;
53
AttrListVec
m_payload
;
54
const
coral::AttributeListSpecification*
m_spec
;
55
};
56
57
inline
cool::ValidityKey
CoraCoolObject::since
()
const
{
return
m_since
; }
58
inline
cool::ValidityKey
CoraCoolObject::until
()
const
{
return
m_until
; }
59
inline
cool::ChannelId
CoraCoolObject::channelId
()
const
60
{
return
m_chan
; }
61
62
inline
CoraCoolObject::const_iterator
CoraCoolObject::begin
()
const
63
{
return
m_payload
.begin(); }
64
65
inline
CoraCoolObject::const_iterator
CoraCoolObject::end
()
const
66
{
return
m_payload
.end(); }
67
68
inline
CoraCoolObject::size_type
CoraCoolObject::size
()
const
69
{
return
m_payload
.size(); }
70
71
#endif
// CORACOOL_CORACOOLOBJECT_H
CoraCoolObject::end
const_iterator end() const
Definition
CoraCoolObject.h:65
CoraCoolObject::until
cool::ValidityKey until() const
Definition
CoraCoolObject.h:58
CoraCoolObject::channelId
cool::ChannelId channelId() const
Definition
CoraCoolObject.h:59
CoraCoolObject::m_since
cool::ValidityKey m_since
Definition
CoraCoolObject.h:50
CoraCoolObject::const_iterator
AttrListVec::const_iterator const_iterator
Definition
CoraCoolObject.h:23
CoraCoolObject::since
cool::ValidityKey since() const
Definition
CoraCoolObject.h:57
CoraCoolObject::size_type
AttrListVec::size_type size_type
Definition
CoraCoolObject.h:24
CoraCoolObject::m_spec
const coral::AttributeListSpecification * m_spec
Definition
CoraCoolObject.h:54
CoraCoolObject::begin
const_iterator begin() const
Definition
CoraCoolObject.h:62
CoraCoolObject::add
void add(const coral::AttributeList &data)
Definition
CoraCoolObject.cxx:22
CoraCoolObject::AttrListVec
std::vector< coral::AttributeList > AttrListVec
Definition
CoraCoolObject.h:22
CoraCoolObject::size
size_type size() const
Definition
CoraCoolObject.h:68
CoraCoolObject::m_payload
AttrListVec m_payload
Definition
CoraCoolObject.h:53
CoraCoolObject::~CoraCoolObject
~CoraCoolObject()
Definition
CoraCoolObject.cxx:20
CoraCoolObject::CoraCoolObject
CoraCoolObject(const cool::ValidityKey &since, const cool::ValidityKey &until, const cool::ChannelId &chan)
Definition
CoraCoolObject.cxx:11
CoraCoolObject::m_until
cool::ValidityKey m_until
Definition
CoraCoolObject.h:51
CoraCoolObject::m_chan
cool::ChannelId m_chan
Definition
CoraCoolObject.h:52
Generated on
for ATLAS Offline Software by
1.17.0