Skip to content

Commit 85c3d8d

Browse files
committed
Merge branch 'release/v10_00_05'
2 parents 3138eba + 8144244 commit 85c3d8d

7 files changed

Lines changed: 92 additions & 7 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
1515

1616
find_package(cetmodules 3.20.00 REQUIRED)
17-
project(sbnobj VERSION 10.00.04 LANGUAGES CXX)
17+
project(sbnobj VERSION 10.00.05 LANGUAGES CXX)
1818

1919
message(STATUS
2020
"\n-- ============================================================================="
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* \class TPCChannelInfo
3+
*
4+
* \ingroup anab
5+
*
6+
* \brief TPCChannel Analysis Info
7+
*
8+
*/
9+
10+
#ifndef TPCChannelInfo_hh_
11+
#define TPCChannelInfo_hh_
12+
13+
14+
namespace anab {
15+
16+
struct TPCChannelInfo{
17+
unsigned channel; //!< Channel number
18+
float baseline; //!< Channel baseline
19+
float rms; //!< Channel RMS
20+
float even_fraction; //!< Fraction of even samples in waveform
21+
float xbad_fraction; //!< Fraction of samples equal to 0xBAD in the waveform
22+
};
23+
24+
}
25+
26+
27+
#endif

sbnobj/Common/Analysis/classes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "canvas/Persistency/Common/Wrapper.h"
22
#include "canvas/Persistency/Common/Assns.h"
33
#include "sbnobj/Common/Analysis/TPCPurityInfo.hh"
4+
#include "sbnobj/Common/Analysis/TPCChannelInfo.hh"
45
#include <vector>

sbnobj/Common/Analysis/classes_def.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
<lcgdict>
22

3+
<class name="anab::TPCChannelInfo" ClassVersion="10">
4+
<version ClassVersion="10" checksum="3801257877"/>
5+
</class>
6+
<class name="std::vector<anab::TPCChannelInfo>"/>
7+
<class name="art::Wrapper< anab::TPCChannelInfo>"/>
8+
<class name="art::Wrapper< std::vector<anab::TPCChannelInfo>>"/>
9+
310
<class name="anab::TPCPurityInfo" ClassVersion="12">
411
<version ClassVersion="12" checksum="2429165902"/>
512
<version ClassVersion="11" checksum="3124295666"/>

sbnobj/SBND/Timing/DAQTimestamp.cxx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,46 @@ namespace sbnd::timing {
1010
, fTimestamp(0)
1111
, fOffset(0)
1212
, fName("")
13+
, fTimestampPs(0)
1314
{}
1415

16+
//For decoding with sbndcode <= v10_04_??
1517
DAQTimestamp::DAQTimestamp(uint32_t channel, uint64_t timestamp, uint64_t offset, std::string name)
1618
: fChannel(channel)
1719
, fTimestamp(timestamp)
1820
, fOffset(offset)
1921
, fName(name)
22+
, fTimestampPs(0)
2023
{}
2124

25+
//For decoding with sbndcode <= v10_04_??
2226
DAQTimestamp::DAQTimestamp(uint32_t channel, uint64_t timestamp, uint64_t offset, std::array<char, 8> name)
2327
: fChannel(channel)
2428
, fTimestamp(timestamp)
2529
, fOffset(offset)
2630
, fName("")
31+
, fTimestampPs(0)
32+
{
33+
for(auto const& c : name)
34+
fName.push_back(c);
35+
}
36+
37+
//New addition for sbndcode version > v10_04_??
38+
DAQTimestamp::DAQTimestamp(uint32_t channel, uint64_t timestamp, uint64_t offset, std::string name, uint64_t timestampPs)
39+
: fChannel(channel)
40+
, fTimestamp(timestamp)
41+
, fOffset(offset)
42+
, fName(name)
43+
, fTimestampPs(timestampPs)
44+
{}
45+
46+
//New addition for sbndcode version > v10_04_??
47+
DAQTimestamp::DAQTimestamp(uint32_t channel, uint64_t timestamp, uint64_t offset, std::array<char, 8> name, uint64_t timestampPs)
48+
: fChannel(channel)
49+
, fTimestamp(timestamp)
50+
, fOffset(offset)
51+
, fName("")
52+
, fTimestampPs(timestampPs)
2753
{
2854
for(auto const& c : name)
2955
fName.push_back(c);
@@ -51,6 +77,11 @@ namespace sbnd::timing {
5177
return fName;
5278
}
5379

80+
uint64_t DAQTimestamp::TimestampPs() const
81+
{
82+
return fTimestampPs;
83+
}
84+
5485
void DAQTimestamp::SetChannel(uint32_t channel)
5586
{
5687
fChannel = channel;
@@ -70,6 +101,11 @@ namespace sbnd::timing {
70101
{
71102
fName = name;
72103
}
104+
105+
void DAQTimestamp::SetTimestampPs(uint64_t timestamp)
106+
{
107+
fTimestampPs = timestamp;
108+
}
73109
}
74110

75111
#endif

sbnobj/SBND/Timing/DAQTimestamp.hh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ namespace sbnd::timing {
2121
uint64_t fTimestamp; ///< Timestamp of signal [ns]
2222
uint64_t fOffset; ///< Channel specific offset [ns]
2323
std::string fName; ///< Name of channel input
24+
25+
//New addition for sbndcode version > v10_04_??
26+
uint64_t fTimestampPs; ///< Timestamp of signal [ps]
2427

2528
public:
2629

@@ -30,24 +33,28 @@ namespace sbnd::timing {
3033
DAQTimestamp();
3134

3235
/**
33-
* Constructor to set all parameters
36+
* Constructor to set 4 parameters but timestamp ps
37+
* For decoding with sbndcode <= v10_04_??
3438
*
3539
* @param channel Hardware channel
36-
* @param timestamp Timestamp of signal [ns]
40+
* @param timestamp Timestamp of signal [ns] in UTC format
3741
* @param offset Channel specific offset [ns]
3842
* @param name Name of channel input
3943
*/
4044
DAQTimestamp(uint32_t channel, uint64_t timestamp, uint64_t offset, std::string name);
45+
DAQTimestamp(uint32_t channel, uint64_t timestamp, uint64_t offset, std::array<char, 8> name);
4146

4247
/**
43-
* Constructor to set all parameters, using array for name
48+
* Constructor to set all parameters
49+
* For decoding with sbndcode > v10_04_??
4450
*
4551
* @param channel Hardware channel
46-
* @param timestamp Timestamp of signal [ns]
52+
* @param timestamp Timestamp of signal [ns] in UTC format
4753
* @param offset Channel specific offset [ns]
4854
* @param name Name of channel input
4955
*/
50-
DAQTimestamp(uint32_t channel, uint64_t timestamp, uint64_t offset, std::array<char, 8> name);
56+
DAQTimestamp(uint32_t channel, uint64_t timestamp, uint64_t offset, std::string name, uint64_t timestampPs);
57+
DAQTimestamp(uint32_t channel, uint64_t timestamp, uint64_t offset, std::array<char, 8> name, uint64_t timestampPs);
5158

5259
/**
5360
* Destructor
@@ -61,6 +68,9 @@ namespace sbnd::timing {
6168
uint64_t Timestamp() const;
6269
uint64_t Offset() const;
6370
std::string Name() const;
71+
72+
//New addition for sbndcode version > v10_04_??
73+
uint64_t TimestampPs() const;
6474

6575
/**
6676
* Setters
@@ -69,6 +79,9 @@ namespace sbnd::timing {
6979
void SetTimestamp(uint64_t timestamp);
7080
void SetOffset(uint64_t offset);
7181
void SetName(std::string name);
82+
83+
//New addition for sbndcode version > v10_04_??
84+
void SetTimestampPs(uint64_t timestamp);
7285
};
7386
}
7487

sbnobj/SBND/Timing/classes_def.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<lcgdict>
2-
<class name="sbnd::timing::DAQTimestamp" ClassVersion="10">
2+
<class name="sbnd::timing::DAQTimestamp" ClassVersion="11">
3+
<version ClassVersion="11" checksum="2804806845"/>
34
<version ClassVersion="10" checksum="810700615"/>
45
</class>
56
<class name="std::vector<sbnd::timing::DAQTimestamp>"/>

0 commit comments

Comments
 (0)