21 #include "art_root_io/TFileService.h" 22 #include "art_root_io/TFileDirectory.h" 26 #include "lbne-raw-data/Overlays/TpcMilliSliceFragment.hh" 27 #include "lbne-raw-data/Services/ChannelMap/ChannelMapService.h" 28 #include "artdaq-core/Data/Fragment.hh" 49 class TpcDAQToOffline;
114 fTree = tfs->make<TTree>(
"FlatDigitTree",
"FlatDigitTree");
117 fTree->Branch(
"Channel" ,&
Channel ,
"Channel[DigSize]/F" );
119 fTree->Branch(
"ADCs" ,&
ADCs ,
"ADCs[DigSize][15000]/F");
124 for(
int i=0;i<20;i++) std::cout <<
"=";
126 std::cout <<
"Parameter Set" <<
std::endl;
127 for(
int i=0;i<20;i++) std::cout <<
"=";
133 std::cout <<
"fDebug: ";
137 for(
int i=0;i<20;i++) std::cout <<
"=";
152 try { rawFragments->size(); }
154 std::cout <<
"WARNING: Raw RCE data not found in event " << eventNumber <<
std::endl;
155 std::vector<raw::RawDigit> digits;
162 std::cerr <<
"Run: " << evt.
run()
163 <<
", SubRun: " << evt.
subRun()
164 <<
", Event: " << eventNumber
169 lbne::TpcNanoSlice::Header::nova_timestamp_t firstTimestamp;
170 std::vector<std::pair< std::pair<unsigned int,unsigned int>, lbne::TpcNanoSlice::Header::nova_timestamp_t> > DigitsIndexList;
178 std::cout <<
"Digits has size " << digits.size() <<
" digits[0] has " << digits[0].Samples() <<
std::endl;
185 for (
int dig=0; dig<
DigSize; ++dig ) {
186 int Chan = digits[dig].Channel();
197 std::cout <<
"JPD: this_time_stamp: " << this_time_stamp.
value() <<
std::endl;
unsigned int fZeroThreshold
Zero suppression threshold.
void produce(art::Event &evt) override
EventNumber_t event() const
enum raw::_compress Compress_t
void SetUseDefaults(bool f)
EDProducer(fhicl::ParameterSet const &pset)
Definition of basic raw digits.
raw::Compress_t fCompression
compression type to use
std::string fRawDataLabel
constexpr TimeValue_t value() const
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)
virtual float PedMean(raw::ChannelID_t ch) const
Retrieve pedestal information.
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#define DEFINE_ART_MODULE(klass)
art::Timestamp make_art_timestamp_from_nova_timestamp(lbne::TpcNanoSlice::Header::nova_timestamp_t this_nova_timestamp)
Collect all the RawData header files together.
T get(std::string const &key) const
std::string fOutputDataLabel
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
SubRunNumber_t subRun() const
float ADCs[MaxChannels][MaxSamples]
art::ServiceHandle< lbne::ChannelMapService > fChannelMap
ChannelMappingService::Channel Channel
IDNumber_t< Level::Event > EventNumber_t
void reconfigure(const fhicl::ParameterSet &pset)
ProductID put(std::unique_ptr< PROD > &&edp, FullSemantic< Level::Run > const semantic)
TpcDAQToOffline(fhicl::ParameterSet const &pset)
TpcDAQToOffline & operator=(TpcDAQToOffline const &)=delete
float Pedestal[MaxChannels]
cet::coded_exception< error, detail::translate > exception
QTextStream & endl(QTextStream &s)
void SetDetName(std::string detName)