File indexing completed on 2024-04-06 12:04:04
0001 #ifndef ECALPSEUDOSTRIPINPUTDIGI_H
0002 #define ECALPSEUDOSTRIPINPUTDIGI_H
0003
0004 #include <ostream>
0005 #include <vector>
0006 #include "DataFormats/EcalDetId/interface/EcalTriggerElectronicsId.h"
0007 #include "DataFormats/EcalDigi/interface/EcalPseudoStripInputSample.h"
0008
0009
0010
0011
0012
0013 class EcalPseudoStripInputDigi {
0014 public:
0015 typedef EcalTriggerElectronicsId key_type;
0016
0017 EcalPseudoStripInputDigi();
0018 explicit EcalPseudoStripInputDigi(const EcalTriggerElectronicsId& id);
0019
0020 const EcalTriggerElectronicsId& id() const { return id_; }
0021 int size() const { return size_; }
0022
0023 const EcalPseudoStripInputSample& operator[](int i) const { return data_[i]; }
0024 const EcalPseudoStripInputSample& sample(int i) const { return data_[i]; }
0025
0026 void setSize(int size);
0027 void setSample(int i, const EcalPseudoStripInputSample& sam) { data_[i] = sam; }
0028 void setSampleValue(int i, uint16_t value) { data_[i].setValue(value); }
0029
0030 static const int MAXSAMPLES = 20;
0031
0032
0033 int pseudoStripInput() const;
0034
0035
0036 bool fineGrain() const;
0037
0038
0039 bool isDebug() const;
0040
0041
0042 int sampleOfInterest() const;
0043
0044 private:
0045 EcalTriggerElectronicsId id_;
0046 int size_;
0047 std::vector<EcalPseudoStripInputSample> data_;
0048 };
0049
0050 std::ostream& operator<<(std::ostream& s, const EcalPseudoStripInputDigi& digi);
0051
0052 #endif