AdcChannelDataTester.h
Go to the documentation of this file.
1 // AdcChannelDataTester.h
2 //
3 // David Adams
4 // April 2018
5 //
6 // Class with functions to fill AdcChannelData for test purposes.
7 //
8 // Wire strums put data starting at tick i for channel or wire i.
9 // Where needed, the geometry is obtained from the geometry service.
10 
11 #ifndef AdcChannelDataTester_H
12 #define AdcChannelDataTester_H
13 
15 
17 
18 public:
19 
20  using Index = unsigned int;
21 
22  // Data used to fill each channel data object.
23  Index run =1;
25  Index event =0;
27  float pedestal =700.0;
28  Index nsam = 500;
29  std::vector<short> rawwf ={1200};
30  std::vector<float> samwf ={50.0};
31 
32  // Fill ADC data with passed channel number and the data associated with this tester.
33  // If nneded, the raw and prepared signals are resized to nsam.
34  // The waveforms offset by isam0 are added to the raw and prepared signals in ADC data.
35  int fill(AdcChannelData& acd, Index icha, Index isam0);
36 
37  // Strum channels 0 to ncha.
38  // If ncha ==0 , then # channels is taken from the geometry.
39  int strumChannels(AdcChannelDataMap& acds, Index ncha =0);
40 
41  // Strum all wires in TPC itpc in crystat icry.
42  int strumTpcWires(AdcChannelDataMap& acds, Index itpc, Index icry =0);
43 
44  // Strum all wires in a cryostat.
45  int strumCryoWires(AdcChannelDataMap& acds, Index icry =0);
46 
47  // Strum all wires in the detector.
49 
50 };
51 
52 #endif
unsigned int Index
std::vector< float > samwf
int strumCryoWires(AdcChannelDataMap &acds, Index icry=0)
int fill(AdcChannelData &acd, Index icha, Index isam0)
int strumChannels(AdcChannelDataMap &acds, Index ncha=0)
int strumTpcWires(AdcChannelDataMap &acds, Index itpc, Index icry=0)
std::map< AdcChannel, AdcChannelData > AdcChannelDataMap
int strumDetectorWires(AdcChannelDataMap &acds)
std::vector< short > rawwf