12 double coincidence_time;
17 unsigned char Channel;
18 double FirstSampleTimeStamp;
19 unsigned short RawToTValue;
24 unsigned char FirstCellIndex;
25 unsigned char WaveformSize;
26 } HitStructInfoForWaveformAndMeasurements_t;
30 unsigned char Channel;
31 double FirstSampleTimeStamp;
34 unsigned char FirstCellIndex;
35 unsigned char WaveformSize;
36 } HitStructInfoForWaveformOnly_t;
46 "Error: No data has been loaded yet!\n \
47 Please call ReadFile() before calling any functions which manipulate data.\n \
53 "Error: Sampic::EventBuilder() must be called before any analysis can be performed."
67 void ReadFile(
string,
bool =
true,
int = 0,
string =
"out.root",
bool =
false,
long long = 0)
override;
69 void PlotWF(
int,
float = 0,
float = 0);
int start_read_at_channel
Do analysis only for limited range of channels to reduce memory usage.
Class containing SAMPIC data loader and Event Builder.
int GetCurrentEvent(int) override
Get the current event index for a certain waveform index.
vector< HitInfoReduced > hitInfo
Stores additional info about wf.
void PlotWF(int, float=0, float=0)
Plot any Waveform (can be called before EventBuilder to check data)
ReadSampic(int last_bin_file=0, int first_bin_file=0)
Initializer will call initializer of ReadRun class.
int GetWaveformIndex(int, int) override
Returns index of a certain event number (if data files are read in parallel threads)
void checkData(bool isBaselineCorrection=false) const override
Primitive check to see if data has been loaded.
void EventBuilder(double, vector< float >={}, vector< int > channels={}, unsigned int=1, bool=false)
Construct events based on coincident amplitude thresholds within a time window for different channels...
void ReadFile(string, bool=true, int=0, string="out.root", bool=false, long long=0) override
Routine to read files created by SAMPIC DAQ.
TH1F * Getwf(int, int, int=1) override
Helper that returns the waveform histogram for a certain channel number and a certain event number.
vector< vector< int > > wf_nr_event_storage
Stores all waveform numbers assigned to events.
bool eventsBuilt
Check if the data is grouped in events (SAMPIC needs manual event building)
int GetCurrentChannel(int) override
Get the current channel index for a certain waveform index.
vector< double > event_time_stamps
Stores all event times.
bool SkipEvent(int, int=-1) override
Check if event has skipped flag. Will return true if event flag is false but channel does not exist i...
vector< vector< int > > ch_nr_event_storage
Stores all channel numbers assigned to events.
Stores additional information with the waveforms.
double FirstSampleTimeStamp