All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Types | Private Attributes | List of all members
sbnd::trigger::ArtdaqFragmentProducer Class Reference
Inheritance diagram for sbnd::trigger::ArtdaqFragmentProducer:

Public Member Functions

 ArtdaqFragmentProducer (fhicl::ParameterSet const &p)
 
 ArtdaqFragmentProducer (ArtdaqFragmentProducer const &)=delete
 
 ArtdaqFragmentProducer (ArtdaqFragmentProducer &&)=delete
 
ArtdaqFragmentProduceroperator= (ArtdaqFragmentProducer const &)=delete
 
ArtdaqFragmentProduceroperator= (ArtdaqFragmentProducer &&)=delete
 
void produce (art::Event &e) override
 

Private Types

enum  LIMITS { max_hits_in_fragment = 50, num_febs = 255, num_channels = 32 }
 

Private Attributes

int fRun
 
int fSubrun
 
int fEvent
 
art::InputTag fSimModuleLabel
 name of detsim producer More...
 
art::InputTag fCRTSimLabel
 name of CRT producer More...
 
std::string fFEBDataLabel
 name of FEBData producer More...
 
bool fVerbose
 print information about what's going on More...
 
double fClockSpeedCRT
 
size_t fFirstFEBMac5
 lowest mac5 address for CRT FEBs More...
 
std::string taggers [num_febs]
 
uint16_t feb_hits_in_fragments [num_febs]
 
uint16_t ADCs [num_febs][max_hits_in_fragment][num_channels]
 
uint32_t T0s [num_febs][max_hits_in_fragment]
 
uint32_t T1s [num_febs][max_hits_in_fragment]
 
bool empty_fragment [num_febs]
 
geo::GeometryCore const * fGeometryService
 
CRTGeoAlg fCrtGeo
 
std::string fInputModuleNameWvfm
 
std::string fInputModuleNameTrigger
 
int fBaseline
 
int fMultiplicityThreshold
 
double fBeamWindowLength
 
uint32_t nChannelsFrag
 
uint32_t wfm_length
 
opdet::sbndPDMapAlg pdMap
 
std::vector< unsigned int > channelList
 
std::vector< std::vector< short > > wvf_channel
 
double fSampling
 
art::ServiceHandle
< art::TFileService > 
tfs
 
CLHEP::HepRandomEngine & fTriggerTimeEngine
 

Detailed Description

Definition at line 86 of file ArtdaqFragmentProducer_module.cc.

Member Enumeration Documentation

Constructor & Destructor Documentation

sbnd::trigger::ArtdaqFragmentProducer::ArtdaqFragmentProducer ( fhicl::ParameterSet const &  p)
explicit

Definition at line 165 of file ArtdaqFragmentProducer_module.cc.

166  : EDProducer{p},
167  fSimModuleLabel(p.get<std::string>("SimModuleLabel", "largeant")),
168  fCRTSimLabel(p.get<std::string>("CRTSimLabel", "crt")),
169  fFEBDataLabel(p.get<std::string>("FEBDataLabel", "crtsim")),
170  fVerbose(p.get<bool>("Verbose", false)),
171  fClockSpeedCRT(p.get<double>("ClockSpeedCRT")),
172  fFirstFEBMac5(p.get<size_t>("FirstFEBMac5", 0)),
173  fInputModuleNameWvfm(p.get<std::string>("InputModuleNameWvfm")),
174  fInputModuleNameTrigger(p.get<std::string>("InputModuleNameTrigger")),
175  fBaseline(p.get<int>("Baseline",8000)),
176  fMultiplicityThreshold(p.get<int>("MultiplicityThreshold")),
177  fBeamWindowLength(p.get<double>("BeamWindowLength", 1.6)),
178  nChannelsFrag(p.get<double>("nChannelsFrag", 15)),
179  wfm_length(p.get<double>("WfmLength", 5120)),
180  fTriggerTimeEngine(art::ServiceHandle<rndm::NuRandomService>{}->createEngine(*this, "HepJamesRandom", "trigger", p, "SeedTriggerTime"))
181  // More initializers here.
182 {
183  // Call appropriate produces<>() functions here.
184  produces< std::vector<artdaq::Fragment> >();
185 
186  // Get a pointer to the fGeometryServiceetry service provider
187  fGeometryService = lar::providerFrom<geo::Geometry>();
188 
189  // get clock
190  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataForJob();
191  fSampling = clockData.OpticalClock().Frequency(); // MHz
192 
193  // build PD map and channel list
194  auto subsetCondition = [](auto const& i)->bool { return i["pd_type"] == "pmt_coated" || i["pd_type"] == "pmt_uncoated"; };
195  auto pmtMap = pdMap.getCollectionFromCondition(subsetCondition);
196  if (fVerbose) std::cout << "Number of PDs selected: \t" << pmtMap.size() << "\n";
197  for(auto const& i:pmtMap){
198  channelList.push_back(i["channel"]);
199  }
200 
201 }
pdgs p
Definition: selectors.fcl:22
nlohmann::json getCollectionFromCondition(Func condition)
Definition: sbndPDMapAlg.hh:85
art::InputTag fSimModuleLabel
name of detsim producer
bool fVerbose
print information about what&#39;s going on
size_t fFirstFEBMac5
lowest mac5 address for CRT FEBs
art::InputTag fCRTSimLabel
name of CRT producer
std::string fFEBDataLabel
name of FEBData producer
BEGIN_PROLOG could also be cout
sbnd::trigger::ArtdaqFragmentProducer::ArtdaqFragmentProducer ( ArtdaqFragmentProducer const &  )
delete
sbnd::trigger::ArtdaqFragmentProducer::ArtdaqFragmentProducer ( ArtdaqFragmentProducer &&  )
delete

Member Function Documentation

ArtdaqFragmentProducer& sbnd::trigger::ArtdaqFragmentProducer::operator= ( ArtdaqFragmentProducer const &  )
delete
ArtdaqFragmentProducer& sbnd::trigger::ArtdaqFragmentProducer::operator= ( ArtdaqFragmentProducer &&  )
delete
void sbnd::trigger::ArtdaqFragmentProducer::produce ( art::Event &  e)
override

Definition at line 204 of file ArtdaqFragmentProducer_module.cc.

205 {
206 
207  // Fetch basic event info
208  // event information
209  fRun = e.run();
210  fSubrun = e.subRun();
211  fEvent = e.id().event();
212  if(fVerbose){
213  std::cout<<"============================================"<<std::endl
214  <<"Run = "<<fRun<<", SubRun = "<<fSubrun<<", Event = "<<fEvent<<std::endl
215  <<"============================================"<<std::endl;
216  }
217 
218  //----------------------------------------------------------------------------------------------------------
219  // CRT
220  //----------------------------------------------------------------------------------------------------------
221 
222  for(int i=0; i<num_febs; i++){empty_fragment[i]=true;}
223 
224  int num_module = fCrtGeo.NumModules();
225 
226  //----------------------------------------------------------------------------------------------------------
227  // GETTING PRODUCTS
228  //----------------------------------------------------------------------------------------------------------
229 
230  // Get FEB data from the event
231  art::Handle<std::vector<sbnd::crt::FEBData>> feb_data_h;
232  e.getByLabel(fFEBDataLabel, feb_data_h);
233 
234  // make sure hits look good
235  if (!feb_data_h.isValid()) {
236  throw art::Exception(art::errors::Configuration) << "could not locate FEBData." << std::endl;;
237  }
238 
239  std::vector<art::Ptr<sbnd::crt::FEBData>> feb_data_v;
240  art::fill_ptr_vector(feb_data_v, feb_data_h);
241 
242  art::FindManyP<sim::AuxDetIDE, sbnd::crt::FEBTruthInfo> febdata_to_ides (feb_data_h, e, fFEBDataLabel);
243 
244  //Fill arrays with default values
246 
247  // fragments vector
248  std::unique_ptr<std::vector<artdaq::Fragment>> vecFrag = std::make_unique<std::vector<artdaq::Fragment>>();
249 
250  // set properties of fragment that are common to event
251  //quantities in fragment
252  uint16_t lostcpu = 0;
253  uint16_t lostfpga = 0;
254  uint32_t coinc = 0;
255  uint16_t lost_hits = 0; //number of lost hits from the previous one
256 
257 
258  //metadata
259  uint64_t run_start_time = 0;
260  uint64_t this_poll_start = 0;
261  uint64_t this_poll_end = 0;
262  int32_t system_clock_deviation = 0;
263  uint32_t feb_hits_in_poll = 0;
264 
265  //information from fragment header
266  uint64_t sequence_id = fEvent;
267 
268  uint64_t temp_last_time = 0;
269 
270  //random number generator to bu used to simulate pedestal
271  std::default_random_engine generator;
272  std::normal_distribution<double> distribution(175.0,23.0);
273 
274  //loop through FEBData product and sort by module/mac5
275  for (size_t feb_i = 0; feb_i < feb_data_v.size(); feb_i++) {
276 
277  auto const feb_data = feb_data_v[feb_i];
278 
279  if(fVerbose){std::cout << "FEB " << feb_i << " with mac " << feb_data->Mac5() << std::endl;}
280 
281  empty_fragment[feb_data->Mac5()] = false;
282 
283  int channel = feb_data->Mac5() * 32;
284  std::string stripName = fCrtGeo.ChannelToStripName(channel);
285  std::string tagger = fCrtGeo.GetTaggerName(stripName);
286  taggers[feb_data->Mac5()] = tagger;
287 
288  T0s[feb_data->Mac5()][feb_hits_in_fragments[feb_data->Mac5()]] = feb_data->Ts0();
289  T1s[feb_data->Mac5()][feb_hits_in_fragments[feb_data->Mac5()]] = feb_data->Ts1();
290  for (int i_adc = 0; i_adc<32; i_adc++){
291  uint16_t adc = 0;
292  if (feb_data->ADC()[i_adc] > 4089){
293  adc = 4089;
294  }else if (feb_data->ADC()[i_adc] == 0){
295  //pull from a normal distribution to simulate pedestal
296  adc = distribution(generator);
297  }else{
298  adc = feb_data->ADC()[i_adc];
299  }
300  ADCs[feb_data->Mac5()][feb_hits_in_fragments[feb_data->Mac5()]][i_adc] = adc;
301  }
302 
303  feb_hits_in_fragments[feb_data->Mac5()]++;
304 
305  }//FEBData loop
306 
307  //make one fragment for every module
308  for (size_t feb_i = fFirstFEBMac5; feb_i < num_module+fFirstFEBMac5; feb_i++){
309  //quantities in fragment
310  if (empty_fragment[feb_i]){
311  //if no hits for a module, make a simulated "T1 reset" event to avoid missing fragments
312  feb_hits_in_fragments[feb_i] = 1;
313  int channel = feb_i * 32;
314  std::string stripName = fCrtGeo.ChannelToStripName(channel);
315  std::string tagger = fCrtGeo.GetTaggerName(stripName);
316  taggers[feb_i] = tagger;
317 
318  T0s[feb_i][0] = 0;
319  T1s[feb_i][0] = 0;
320  for (int i_adc = 0; i_adc<32; i_adc++){
321  uint16_t adc = distribution(generator);
322  ADCs[feb_i][0][i_adc] = adc;
323  }
324  }
325 
326  if (feb_hits_in_fragments[feb_i]==0) continue;
327 
328  //metadata
329  uint8_t mac5 = (uint8_t)feb_i; //last 8 bits of FEB mac5 address
330  uint16_t feb_hits_in_fragment = feb_hits_in_fragments[feb_i];
331 
332  sbndaq::BernCRTFragmentMetadataV2 metadata;
333 
334  metadata.set_mac5(mac5);
335  metadata.set_clock_deviation(system_clock_deviation);
336  metadata.set_hits_in_poll(feb_hits_in_poll);
337  metadata.set_hits_in_fragment(feb_hits_in_fragment);
338  metadata.set_run_start_time(run_start_time);
339  metadata.update_poll_time(this_poll_start, this_poll_end);
340 
341  uint64_t timestamp = (uint64_t)(T0s[feb_i][feb_hits_in_fragments[feb_i]]/fClockSpeedCRT); //absolute timestamp
342 
343  // create fragment
345  uint16_t fragmentIDVal = 32768 + 12288 + (plane_num * 256) + (uint16_t)mac5;
346  if(fVerbose){std::cout<<"fragmentID: "<<std::bitset<16>{fragmentIDVal}<<std::endl;}
347  auto fragment_uptr = artdaq::Fragment::FragmentBytes(sizeof(sbndaq::BernCRTHitV2)*metadata.hits_in_fragment(), //payload_size
348  sequence_id,
349  fragmentIDVal,
350  sbndaq::detail::FragmentType::BERNCRTV2,
351  metadata,
352  timestamp
353  ); // unique pointer
354 
355  // populate fragment
356  std::vector<sbndaq::BernCRTHitV2> data_vec;
357  for (int i_frag = 0; i_frag<feb_hits_in_fragments[feb_i]; i_frag++){
358  sbndaq::BernCRTHitV2 hit;
359 
360  uint8_t flags = 3;
361  uint32_t ts0 = T0s[feb_i][i_frag];
362  uint32_t ts1 = T1s[feb_i][i_frag];
363 
364  if (ts0==0){flags=7;}else if (ts1==0){flags=11;}
365 
366  uint64_t feb_hit_number = feb_hits_in_fragments[feb_i]; //hit counter for individual FEB, including hits lost in FEB or fragment generator
367  timestamp = (uint64_t)ts0/fClockSpeedCRT; //absolute timestamp
368  uint64_t last_accepted_timestamp = temp_last_time; //timestamp of previous accepted hit
369  temp_last_time = timestamp;
370 
371  hit.flags = (uint16_t)flags;
372  hit.lostcpu = (uint16_t)lostcpu;
373  hit.lostfpga = (uint16_t)lostfpga;
374  hit.ts0 = (uint32_t)ts0;
375  hit.ts1 = (uint32_t)ts1;
376  for (int i_adc = 0; i_adc<32; i_adc++){
377  hit.adc[i_adc] = ADCs[feb_i][i_frag][i_adc];
378  }
379  hit.coinc = (uint32_t)coinc;
380  hit.feb_hit_number = (uint64_t)feb_hit_number;
381  hit.timestamp = (uint64_t)timestamp;
382  hit.last_accepted_timestamp = (uint64_t)last_accepted_timestamp;
383  hit.lost_hits = (uint16_t)lost_hits;
384 
385  data_vec.emplace_back(hit);
386  }//bern crt hit vector
387 
388  //copy data vector of hits into the fragment we made
389  std::memcpy(fragment_uptr->dataBeginBytes(), data_vec.data(), sizeof(sbndaq::BernCRTHitV2)*metadata.hits_in_fragment());
390 
391  // add fragment to vector
392  vecFrag->push_back(*fragment_uptr);
393 
394  }//module (mac5) loop
395 
396  int num_crt_frags = vecFrag->size();
397  if(fVerbose) std::cout << "CRT Fragments written: " << num_crt_frags << std::endl;
398 
399  //----------------------------------------------------------------------------------------------------------
400  // PMT
401  //----------------------------------------------------------------------------------------------------------
402 
403  // access PMT waveforms and hardware trigger information
404  art::Handle< std::vector< raw::OpDetWaveform > > wvfmHandle;
405  art::Handle< std::vector< sbnd::comm::pmtTrigger > > triggerHandle;
406  e.getByLabel(fInputModuleNameWvfm, wvfmHandle);
407  e.getByLabel(fInputModuleNameTrigger, triggerHandle);
408 
409  if(!wvfmHandle.isValid()) {
410  throw art::Exception(art::errors::Configuration)
411  << "Could not find any waveforms, input must contain OpDetWaveforms." << "\n";
412  }
413  if(!triggerHandle.isValid()) {
414  throw art::Exception(art::errors::Configuration)
415  << "Could not find any PMT hardware trigger object, must run PMT trigger producer before running this module." << "\n";
416  }
417 
418  // create empty vectors to hold waveforms for each channel
419  double fMinStartTime = -1510.0;//in us
420  double fMaxEndTime = 1510.0;//in us
421 
422  for(auto const& wvf : (*wvfmHandle)) {
423  double fChNumber = wvf.ChannelNumber();
424  std::string opdetType = pdMap.pdType(fChNumber);
425  // only look at pmts
426  if (opdetType != "pmt_coated" && opdetType != "pmt_uncoated") continue;
427  if (wvf.TimeStamp() < fMinStartTime){ fMinStartTime = wvf.TimeStamp(); }
428  if ((double(wvf.size()) / fSampling + wvf.TimeStamp()) > fMaxEndTime){ fMaxEndTime = double(wvf.size()) / fSampling + wvf.TimeStamp();}
429  }
430 
431  if (fVerbose){std::cout<<"MinStartTime: "<<fMinStartTime<<" MaxEndTime: "<<fMaxEndTime<<std::endl;}
432 
433  std::vector<short> wvf_0; wvf_0.reserve((int)(3020*1e6/2));
434  for (double i = fMinStartTime; i<fMaxEndTime+(1./fSampling); i+=(1./fSampling)){
435  wvf_0.push_back(fBaseline);
436  }
437  for (size_t i = 0; i < channelList.size(); i++){
438  wvf_channel.push_back(wvf_0);
439  }
440 
441  // counters
442  int num_pmt_wvf = 0;
443 
444  // loop through waveform handles
445  size_t wvf_id = -1;
446  size_t hist_id = -1;
447  for(auto const& wvf : (*wvfmHandle)) {
448  wvf_id++;
449  double fChNumber = wvf.ChannelNumber();
450  std::string opdetType = pdMap.pdType(fChNumber);
451 
452  // only look at pmts
453  if (opdetType != "pmt_coated" && opdetType != "pmt_uncoated") continue;
454 
455  num_pmt_wvf++;
456 
457  double fStartTime = wvf.TimeStamp(); // in us
458  double fEndTime = double(wvf.size()) / fSampling + fStartTime; // in us
459 
460  // create full waveform
461  std::vector<short> wvf_full; wvf_full.reserve((short)(3020*1e6/2));
462 
463  if (fStartTime > fMinStartTime){
464  for (double i = fStartTime-fMinStartTime; i>0.; i-=(1./fSampling)){
465  wvf_full.push_back(fBaseline);
466  }
467  }
468 
469  for(unsigned int i = 0; i < wvf.size(); i++) {
470  wvf_full.push_back(wvf[i]);
471  }
472 
473  if (fEndTime < fMaxEndTime){
474  for (double i = fMaxEndTime-fEndTime; i>0.; i-=(1./fSampling)){
475  wvf_full.push_back(fBaseline);
476  }
477  }
478 
479  // combine waveform with any other waveforms from same channel
480  int i_ch = -1.;
481  auto ich = std::find(channelList.begin(), channelList.end(), fChNumber);
482  if (ich != channelList.end()){
483  i_ch = ich - channelList.begin();
484  }
485  if (wvf_channel.at(i_ch).size() < wvf_full.size()){
486  if (fVerbose) std::cout<<"Full waveform -- Previous Channel" << fChNumber <<" Size: "<<wvf_channel.at(i_ch).size()<<"New Channel" << fChNumber <<" Size: "<<wvf_full.size()<<std::endl;
487  for(unsigned int i = wvf_channel.at(i_ch).size(); i < wvf_full.size(); i++) {
488  wvf_channel.at(i_ch).push_back(fBaseline);
489  }
490  }
491  for(unsigned int i = 0; i < wvf_full.size(); i++) {
492  wvf_channel.at(i_ch)[i] += (wvf_full[i] - fBaseline);
493  }
494 
495  hist_id++;
496 
497  wvfmHandle.clear();
498  } // waveform handle loop
499 
500  // access hardware trigger information
501  std::vector<size_t> triggerIndex;
502  for(auto const& trigger : (*triggerHandle)) {
503  for (size_t idx = 0; idx < trigger.numPassed.size(); idx++) {
504  if (trigger.numPassed[idx] >= fMultiplicityThreshold) {
505  // save index
506  triggerIndex.push_back(idx);
507  // skip ahead by 5120 samples (downsampled by 4) before checking again
508  idx += 1280;
509  }
510  }
511  } // trigger handle loop
512 
513  if (fVerbose) std::cout << "Number of PMT hardware triggers found: " << triggerIndex.size() << std::endl;
514 
515  // set properties of fragment that are common to event
516  uint32_t nChannelsTotal = channelList.size();
517  //uint32_t nChannelsFrag = 15;
518  uint32_t nFrag = (uint32_t)nChannelsTotal/nChannelsFrag;
519  //uint32_t wfm_length = 5120; // ~10us, 2ns tick
520 
521  // fragment properties
522  uint32_t sequenceIDVal = fEvent;
523 
524  // create and populate common metadata
525  sbndaq::CAENV1730FragmentMetadata metadata;
526  metadata.nChannels = nChannelsFrag + 1; // 15 PMT channels + final channel to store beam window / trigger information
527  metadata.nSamples = wfm_length;
528 
529  // fragment handle properties
530  uint32_t eventCounterVal = fEvent;
531  uint32_t boardIDVal = 0;
532  uint32_t triggerTimeTagVal = (uint32_t)CLHEP::RandFlat::shoot(&fTriggerTimeEngine, 0, 1e9);
533  uint32_t eventSizeVal = ((wfm_length * (nChannelsFrag+1)) * sizeof(uint16_t) + sizeof(sbndaq::CAENV1730EventHeader)) / sizeof(uint32_t);
534 
535  // loop over PMT hardware triggers
536  for (auto wvfIdx : triggerIndex) {
537 
538  // index in full waveform, 2ns tick
539  size_t trigIdx = wvfIdx*4;
540  size_t startIdx = trigIdx-500; // -1us
541 
542  // determine and set timestamp for particular trigger
543  double triggerTime = fMinStartTime + wvfIdx*0.008; // in us
544  double timestampVal = 0.5 + (triggerTime*1e-6); // in seconds // std::time(nullptr); // current time
545  metadata.timeStampSec = (uint32_t)timestampVal;
546  metadata.timeStampNSec = (uint32_t)(timestampVal*1e9);
547 
548  // create fragments to hold waveforms, set properties and populate
549  // 15 PMTs stored per fragment, 120/15 = 8 fragments per trigger
550  for (size_t counter = 0; counter < nFrag; counter++) {
551 
552  // create fragment
553  const auto fragment_datasize_bytes = metadata.ExpectedDataSize();
554  uint32_t fragmentIDVal = counter;
555  auto fragment_uptr = artdaq::Fragment::FragmentBytes(fragment_datasize_bytes, sequenceIDVal, fragmentIDVal, sbndaq::detail::FragmentType::CAENV1730, metadata); // unique pointer
556  fragment_uptr->setTimestamp(timestampVal);
557 
558  // populate fragment header
559  auto header_ptr = reinterpret_cast<sbndaq::CAENV1730EventHeader*>(fragment_uptr->dataBeginBytes());
560 
561  header_ptr->eventCounter = eventCounterVal;
562  header_ptr->boardID = boardIDVal;
563  header_ptr->triggerTimeTag = triggerTimeTagVal; // ns // set timetag as random value for event
564  header_ptr->eventSize = eventSizeVal;
565 
566  // populate waveforms
567  // populate fragment with waveform
568  uint16_t* data_begin = reinterpret_cast<uint16_t*>(fragment_uptr->dataBeginBytes() + sizeof(sbndaq::CAENV1730EventHeader));
569  uint16_t* value_ptr = data_begin;
570  uint16_t value = 0;
571  size_t ch_offset = 0;
572 
573  // loop over channels
574  for (size_t i_ch = 0; i_ch < nChannelsFrag; i_ch++) {
575  ch_offset = (size_t)(i_ch*wfm_length);
576  // loop over waveform
577  for (size_t i_t = 0; i_t < wfm_length; i_t++) {
578  // set value
579  value = wvf_channel[counter*nChannelsFrag + i_ch][startIdx+i_t];
580  value_ptr = data_begin + ch_offset + i_t;
581  *value_ptr = value;
582  }
583  }
584 
585  // create add beam window trigger waveform
586  ch_offset = (size_t)(nChannelsFrag*wfm_length);
587  size_t beamStartIdx = abs(fMinStartTime)*1000/2;
588  size_t beamEndIdx = beamStartIdx + fBeamWindowLength*1000/2;
589  // loop over waveform
590  for (size_t i_t = 0; i_t < wfm_length; i_t++) {
591  // set value
592  if (startIdx + i_t >= beamStartIdx && startIdx + i_t <= beamEndIdx) value = 1;
593  else value = 0;
594  value_ptr = data_begin + ch_offset + i_t;
595  *value_ptr = value;
596  }
597 
598  // add fragment to vector
599  vecFrag->push_back(*fragment_uptr);
600  }
601  }
602 
603  if(fVerbose) std::cout << "PMT Fragments written: " << vecFrag->size() - num_crt_frags << std::endl;
604 
605 
606  //produce fragment vector
607  e.put(std::move(vecFrag));
608 
609  // clear variables
610  wvf_channel.clear();
611  wvf_channel.shrink_to_fit();
612 
613 } // ArtdaqFragmentProducer::produce()
std::vector< std::vector< short > > wvf_channel
process_name hit
Definition: cheaterreco.fcl:51
T abs(T value)
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
Definition: counter.h:285
std::string ChannelToStripName(size_t channel) const
enum::sbnd::CRTPlane GetPlaneIndex(std::string tagger)
void fill(const art::PtrVector< recob::Hit > &hits, int only_plane)
std::string GetTaggerName(std::string name) const
uint16_t ADCs[num_febs][max_hits_in_fragment][num_channels]
bool fVerbose
print information about what&#39;s going on
do i e
size_t fFirstFEBMac5
lowest mac5 address for CRT FEBs
uint32_t T0s[num_febs][max_hits_in_fragment]
temporary value
std::string pdType(size_t ch) const override
uint32_t T1s[num_febs][max_hits_in_fragment]
std::string fFEBDataLabel
name of FEBData producer
BEGIN_PROLOG could also be cout

Member Data Documentation

uint16_t sbnd::trigger::ArtdaqFragmentProducer::ADCs[num_febs][max_hits_in_fragment][num_channels]
private

Definition at line 125 of file ArtdaqFragmentProducer_module.cc.

std::vector<unsigned int> sbnd::trigger::ArtdaqFragmentProducer::channelList
private

Definition at line 148 of file ArtdaqFragmentProducer_module.cc.

bool sbnd::trigger::ArtdaqFragmentProducer::empty_fragment[num_febs]
private

Definition at line 128 of file ArtdaqFragmentProducer_module.cc.

int sbnd::trigger::ArtdaqFragmentProducer::fBaseline
private

Definition at line 140 of file ArtdaqFragmentProducer_module.cc.

double sbnd::trigger::ArtdaqFragmentProducer::fBeamWindowLength
private

Definition at line 142 of file ArtdaqFragmentProducer_module.cc.

double sbnd::trigger::ArtdaqFragmentProducer::fClockSpeedCRT
private

Definition at line 112 of file ArtdaqFragmentProducer_module.cc.

CRTGeoAlg sbnd::trigger::ArtdaqFragmentProducer::fCrtGeo
private

Definition at line 133 of file ArtdaqFragmentProducer_module.cc.

art::InputTag sbnd::trigger::ArtdaqFragmentProducer::fCRTSimLabel
private

name of CRT producer

Definition at line 109 of file ArtdaqFragmentProducer_module.cc.

uint16_t sbnd::trigger::ArtdaqFragmentProducer::feb_hits_in_fragments[num_febs]
private

Definition at line 124 of file ArtdaqFragmentProducer_module.cc.

int sbnd::trigger::ArtdaqFragmentProducer::fEvent
private

Definition at line 103 of file ArtdaqFragmentProducer_module.cc.

std::string sbnd::trigger::ArtdaqFragmentProducer::fFEBDataLabel
private

name of FEBData producer

Definition at line 110 of file ArtdaqFragmentProducer_module.cc.

size_t sbnd::trigger::ArtdaqFragmentProducer::fFirstFEBMac5
private

lowest mac5 address for CRT FEBs

Definition at line 113 of file ArtdaqFragmentProducer_module.cc.

geo::GeometryCore const* sbnd::trigger::ArtdaqFragmentProducer::fGeometryService
private

Definition at line 132 of file ArtdaqFragmentProducer_module.cc.

std::string sbnd::trigger::ArtdaqFragmentProducer::fInputModuleNameTrigger
private

Definition at line 139 of file ArtdaqFragmentProducer_module.cc.

std::string sbnd::trigger::ArtdaqFragmentProducer::fInputModuleNameWvfm
private

Definition at line 138 of file ArtdaqFragmentProducer_module.cc.

int sbnd::trigger::ArtdaqFragmentProducer::fMultiplicityThreshold
private

Definition at line 141 of file ArtdaqFragmentProducer_module.cc.

int sbnd::trigger::ArtdaqFragmentProducer::fRun
private

Definition at line 101 of file ArtdaqFragmentProducer_module.cc.

double sbnd::trigger::ArtdaqFragmentProducer::fSampling
private

Definition at line 154 of file ArtdaqFragmentProducer_module.cc.

art::InputTag sbnd::trigger::ArtdaqFragmentProducer::fSimModuleLabel
private

name of detsim producer

Definition at line 108 of file ArtdaqFragmentProducer_module.cc.

int sbnd::trigger::ArtdaqFragmentProducer::fSubrun
private

Definition at line 102 of file ArtdaqFragmentProducer_module.cc.

CLHEP::HepRandomEngine& sbnd::trigger::ArtdaqFragmentProducer::fTriggerTimeEngine
private

Definition at line 160 of file ArtdaqFragmentProducer_module.cc.

bool sbnd::trigger::ArtdaqFragmentProducer::fVerbose
private

print information about what's going on

Definition at line 111 of file ArtdaqFragmentProducer_module.cc.

uint32_t sbnd::trigger::ArtdaqFragmentProducer::nChannelsFrag
private

Definition at line 143 of file ArtdaqFragmentProducer_module.cc.

opdet::sbndPDMapAlg sbnd::trigger::ArtdaqFragmentProducer::pdMap
private

Definition at line 147 of file ArtdaqFragmentProducer_module.cc.

uint32_t sbnd::trigger::ArtdaqFragmentProducer::T0s[num_febs][max_hits_in_fragment]
private

Definition at line 126 of file ArtdaqFragmentProducer_module.cc.

uint32_t sbnd::trigger::ArtdaqFragmentProducer::T1s[num_febs][max_hits_in_fragment]
private

Definition at line 127 of file ArtdaqFragmentProducer_module.cc.

std::string sbnd::trigger::ArtdaqFragmentProducer::taggers[num_febs]
private

Definition at line 123 of file ArtdaqFragmentProducer_module.cc.

art::ServiceHandle<art::TFileService> sbnd::trigger::ArtdaqFragmentProducer::tfs
private

Definition at line 157 of file ArtdaqFragmentProducer_module.cc.

uint32_t sbnd::trigger::ArtdaqFragmentProducer::wfm_length
private

Definition at line 144 of file ArtdaqFragmentProducer_module.cc.

std::vector<std::vector<short> > sbnd::trigger::ArtdaqFragmentProducer::wvf_channel
private

Definition at line 151 of file ArtdaqFragmentProducer_module.cc.


The documentation for this class was generated from the following file: