tpcFragmentToRawDigits.h
Go to the documentation of this file.
1 #ifndef tpcFragmentToRawDigits_h
2 #define tpcFragmentToRawDigits_h
3 
4 // framework
8 
9 // lbne-raw-data
10 #include "lbne-raw-data/Services/ChannelMap/ChannelMapService.h"
11 #include "lbne-raw-data/Overlays/TpcMilliSliceFragment.hh"
12 #include "artdaq-core/Data/Fragment.hh"
13 
14 // From dunetpc
16 
17 // From larcore
19 
20 // From lardata
21 #include "lardataobj/RawData/raw.h"
23 #include "TTimeStamp.h"
24 
25 #include <map>
26 #include <iostream>
27 #include <vector>
28 #include <fstream>
29 
30 namespace DAQToOffline {
31 
32  // Unpack the given Fragments, and create a vector of RawDigits. The
33  // Fragments are expected to be carrying TPC data; this is not
34  // checked.
35 
36  std::vector<raw::RawDigit> tpcFragmentToRawDigits(artdaq::Fragments const& rawFragments,
37  std::vector<std::pair<std::pair<unsigned int,unsigned int>, lbne::TpcNanoSlice::Header::nova_timestamp_t> > &DigitsIndexList,
38  lbne::TpcNanoSlice::Header::nova_timestamp_t& firstTimestamp,
39  art::ServiceHandle<lbne::ChannelMapService> const& channelMap, bool useChannelMap,
40  bool debug,
41  raw::Compress_t compression,
42  unsigned int zeroThreshold);
43 
44  const lbne::TpcNanoSlice::Header::nova_timestamp_t nova_time_ticks_per_second = 64e6;
45 
46  // Convert nova time to DUNE timestamp.
47  // Please call instead DuneTimeConverter::fromNova(novaTime)
48  art::Timestamp make_art_timestamp_from_nova_timestamp(lbne::TpcNanoSlice::Header::nova_timestamp_t this_nova_timestamp);
49 
50  // For those who want the old convention where seconds are stored in the low word.
51  art::Timestamp old_make_art_timestamp_from_nova_timestamp(lbne::TpcNanoSlice::Header::nova_timestamp_t this_nova_timestamp);
52 
53 }
54 
55 #endif
enum raw::_compress Compress_t
struct vector vector
Definition of basic raw digits.
std::vector< raw::RawDigit > tpcFragmentToRawDigits(artdaq::Fragments const &rawFragments, std::vector< std::pair< std::pair< unsigned int, unsigned int >, lbne::TpcNanoSlice::Header::nova_timestamp_t > > &DigitsIndexList, lbne::TpcNanoSlice::Header::nova_timestamp_t &firstTimestamp, art::ServiceHandle< lbne::ChannelMapService > const &channelMap, bool useChannelMap, bool debug, raw::Compress_t compression, unsigned int zeroThreshold)
art::Timestamp make_art_timestamp_from_nova_timestamp(lbne::TpcNanoSlice::Header::nova_timestamp_t this_nova_timestamp)
Collect all the RawData header files together.
art::Timestamp old_make_art_timestamp_from_nova_timestamp(lbne::TpcNanoSlice::Header::nova_timestamp_t this_nova_timestamp)
const lbne::TpcNanoSlice::Header::nova_timestamp_t nova_time_ticks_per_second