ATLAS Offline Software
Loading...
Searching...
No Matches
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
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);
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;
54 const coral::AttributeListSpecification* m_spec;
55};
56
57inline cool::ValidityKey CoraCoolObject::since() const { return m_since; }
58inline cool::ValidityKey CoraCoolObject::until() const { return m_until; }
59inline cool::ChannelId CoraCoolObject::channelId() const
60{return m_chan; }
61
64
67
69{return m_payload.size(); }
70
71#endif // CORACOOL_CORACOOLOBJECT_H
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
const_iterator end() const
cool::ValidityKey until() const
cool::ChannelId channelId() const
cool::ValidityKey m_since
AttrListVec::const_iterator const_iterator
cool::ValidityKey since() const
AttrListVec::size_type size_type
const coral::AttributeListSpecification * m_spec
const_iterator begin() const
void add(const coral::AttributeList &data)
std::vector< coral::AttributeList > AttrListVec
size_type size() const
AttrListVec m_payload
CoraCoolObject(const cool::ValidityKey &since, const cool::ValidityKey &until, const cool::ChannelId &chan)
cool::ValidityKey m_until
cool::ChannelId m_chan