Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dune-raw-data
dune-raw-data
Overlays
NanoSliceWriter.hh
Go to the documentation of this file.
1
#ifndef dune_artdaq_Overlays_NanoSliceWriter_hh
2
#define dune_artdaq_Overlays_NanoSliceWriter_hh
3
4
#include "
dune-raw-data/Overlays/NanoSlice.hh
"
5
6
namespace
dune
{
7
class
NanoSliceWriter;
8
}
9
10
class
dune::NanoSliceWriter
:
public
dune::NanoSlice
{
11
12
public
:
13
14
// This constructor creates an empty NanoSlice which can be filled
15
// with the appropriate data
16
NanoSliceWriter
(uint8_t*
address
, uint32_t max_size_bytes,
17
uint16_t channel_number = 0);
18
19
// Sets the channel number for this NanoSlice.
20
void
setChannelNumber
(uint16_t
channel
);
21
22
// Adds the specified data sample NanoSlice. Returns true
23
// if it was successfully added, false if not (for example, if the
24
// additional sample would overflow the maximum size of the
25
// NanoSlice).
26
bool
addSample
(uint16_t
value
);
27
28
// Finalizes the NanoSlice. This takes care of updating the
29
// NanoSlice so that all internal pointers and data are consistent
30
// with the data that has been added. No more samples can be added
31
// once the NanoSlice has been finalized.
32
// This method returns the number of bytes that were reclaimed
33
// when the maximum size for this NanoSlice was reduced to match
34
// its actual current size.
35
int32_t
finalize
();
36
37
protected
:
38
39
// returns a pointer to the header
40
Header
*
header_
();
41
42
// returns a pointer to the first sample value
43
uint16_t *
data_
();
44
45
uint32_t
max_size_bytes_
;
46
};
47
48
#endif
/* dune_artdaq_Overlays_NanoSliceWriter_hh */
dune
Definition:
PdspHDFFileReader.hh:29
dune::NanoSliceWriter::NanoSliceWriter
NanoSliceWriter(uint8_t *address, uint32_t max_size_bytes, uint16_t channel_number=0)
Definition:
NanoSliceWriter.cc:4
address
Definition:
tableAs_t.cc:76
dune::NanoSliceWriter::data_
uint16_t * data_()
Definition:
NanoSliceWriter.cc:46
dune::NanoSlice::Header
Definition:
NanoSlice.hh:14
channel
uint8_t channel
Definition:
CRTFragment.hh:201
dune::NanoSlice
Definition:
NanoSlice.hh:10
dune::NanoSliceWriter::finalize
int32_t finalize()
Definition:
NanoSliceWriter.cc:34
dune::NanoSliceWriter::setChannelNumber
void setChannelNumber(uint16_t channel)
Definition:
NanoSliceWriter.cc:18
dune::NanoSliceWriter::header_
Header * header_()
Definition:
NanoSliceWriter.cc:41
dune::NanoSliceWriter::addSample
bool addSample(uint16_t value)
Definition:
NanoSliceWriter.cc:23
NanoSlice.hh
submit_mcc.value
value
Definition:
submit_mcc.py:159
dune::NanoSliceWriter::max_size_bytes_
uint32_t max_size_bytes_
Definition:
NanoSliceWriter.hh:45
dune::NanoSliceWriter
Definition:
NanoSliceWriter.hh:10
Generated by
1.8.11