PandaRoot
PndEmcMultiWaveform.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //=============================================================================
14 // PndEmcMultiWaveform.h
15 //
16 // Class to hold multiple waveforms from one Emc Hit / ADC readout
17 //
18 // Author: Christian Hammmann
19 // chammann@hiskp.uni-bonn.de
20 //
21 //=============================================================================
22 
23 //#pragma once
24 #ifndef PNDEMCMULTIWAVEFORM_H
25 #define PNDEMCMULTIWAVEFORM_H
26 
27 #include "PndEmcWaveform.h"
28 
35 
37 
38  public:
39  PndEmcMultiWaveform() : PndEmcWaveform(), fSignals(1, std::vector<Double_t>(0, 0.)), fActiveWaveform(1){};
40 
41  PndEmcMultiWaveform(Int_t trackid, Long_t detId, Long_t waveform_length = 128, Int_t hitIndex = -1);
42 
44  {
45  fSignal.clear();
46  fSignals.clear();
47  };
48 
49  // PndEmcMultiWaveform(const PndEmcMultiWaveform& copy);
50 
51  void SetWaveform(const std::vector<Double_t> &signal, Int_t length, Int_t Waveform);
52 
53  virtual void clearAndReset();
54  virtual void Clear(Option_t *)
55  {
56  fSignal.clear();
57  fSignals.clear();
58  };
59  Int_t GetNumberOfWaveforms() const { return fSignals.size(); };
60  Int_t GetActiveWaveform() const { return fActiveWaveform; };
61  void SetActiveWaveform(Int_t active = 1) { fActiveWaveform = active; };
62 
63  virtual std::vector<Double_t> GetSignal() const;
64 
65  private:
66  std::vector<std::vector<Double_t>> fSignals;
67  Int_t fActiveWaveform;
68 
70 };
71 
72 #endif
Int_t GetActiveWaveform() const
virtual void clearAndReset()
interface for waveform modifiers
STL namespace.
Int_t GetNumberOfWaveforms() const
virtual void Clear(Option_t *)
ClassDef(PndEmcAbsWaveformModifier, 1)
void SetWaveform(const std::vector< Double_t > &signal, Int_t length, Int_t Waveform)
virtual std::vector< Double_t > GetSignal() const
std::vector< Double_t > fSignal
represents a simulated waveform in an emc crystal
Class to hold multiple waveforms from one Emc Hit / ADC readout.
void SetActiveWaveform(Int_t active=1)