Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
dunecore
dunecore
DuneInterface
Tool
TimeOffsetTool.h
Go to the documentation of this file.
1
// TimeOffsetTool.h
2
3
#ifndef TimeOffsetTool_H
4
#define TimeOffsetTool_H
5
6
// Interface for a tool providing access to a timing offset,
7
// e.g. for the ADC samples from a TPC.
8
9
#include<string>
10
11
class
TimeOffsetTool
{
12
13
public
:
14
15
using
Index
=
unsigned
int
;
16
using
LongIndex
=
unsigned
long;
17
using
Name
=
std::string
;
18
19
// Data on which the offset may depend.
20
class
Data
{
21
public
:
22
Index
run
=0;
23
Index
subrun
=0;
24
Index
event
=0;
25
Index
channel
=0;
26
Index
fembID
=0;
27
LongIndex
triggerClock
=0;
28
};
29
30
// Class describing a time offset.
31
// value - Integral part of the offset (typically sufficient?)
32
// rem - value remainder if offset in non-integral
33
// unit - Unit for offset, e.g. tick, us, ns
34
class
Offset
{
35
public
:
36
int
status
=0;
37
long
value
=0;
38
double
rem =0.0;
39
Name
unit
;
40
bool
isValid
()
const
{
return
status == 0; }
41
const
Offset
&
setStatus
(
int
val
) { status =
val
;
return
*
this
; }
42
};
43
44
virtual
~TimeOffsetTool
() =
default
;
45
46
virtual
Offset
offset
(
const
Data
&
dat
)
const
=0;
47
48
};
49
50
#endif
TimeOffsetTool::Data::fembID
Index fembID
Definition:
TimeOffsetTool.h:26
val
Definition:
registry_via_id_test_2.cc:15
string
std::string string
Definition:
nybbler.cc:12
TimeOffsetTool::Offset::setStatus
const Offset & setStatus(int val)
Definition:
TimeOffsetTool.h:41
wirecell.sigproc.paper.noise.dat
dat
Definition:
noise.py:64
TimeOffsetTool::Data::channel
Index channel
Definition:
TimeOffsetTool.h:25
TimeOffsetTool::Offset::isValid
bool isValid() const
Definition:
TimeOffsetTool.h:40
TimeOffsetTool::Index
unsigned int Index
Definition:
TimeOffsetTool.h:15
TimeOffsetTool::offset
virtual Offset offset(const Data &dat) const =0
TimeOffsetTool::~TimeOffsetTool
virtual ~TimeOffsetTool()=default
create_imaplist.status
int status
Definition:
create_imaplist.py:5
testsqlite3.val
list val
Definition:
testsqlite3.py:13
keras_to_tensorflow.int
int
Definition:
keras_to_tensorflow.py:69
TimeOffsetTool::Data::run
Index run
Definition:
TimeOffsetTool.h:22
TimeOffsetTool::Name
std::string Name
Definition:
TimeOffsetTool.h:17
TimeOffsetTool::Data
Definition:
TimeOffsetTool.h:20
TimeOffsetTool::Data::subrun
Index subrun
Definition:
TimeOffsetTool.h:23
TimeOffsetTool::Offset
Definition:
TimeOffsetTool.h:34
TimeOffsetTool::Data::triggerClock
LongIndex triggerClock
Definition:
TimeOffsetTool.h:27
TimeOffsetTool
Definition:
TimeOffsetTool.h:11
TimeOffsetTool::Offset::unit
Name unit
Definition:
TimeOffsetTool.h:39
submit_mcc.value
value
Definition:
submit_mcc.py:159
TimeOffsetTool::LongIndex
unsigned long LongIndex
Definition:
TimeOffsetTool.h:16
Generated by
1.8.11