File indexing completed on 2024-04-06 12:04:04
0001 #ifndef ECALPSEUDOSTRIPINPUTSAMPLE_H
0002 #define ECALPSEUDOSTRIPINPUTSAMPLE_H
0003
0004 #include <ostream>
0005 #include <cstdint>
0006
0007
0008
0009
0010
0011
0012 class EcalPseudoStripInputSample {
0013 public:
0014 EcalPseudoStripInputSample();
0015 EcalPseudoStripInputSample(uint16_t data);
0016 EcalPseudoStripInputSample(int pseudoStripInput, bool finegrain);
0017
0018
0019 void setValue(uint16_t data) { theSample = data; }
0020
0021 uint16_t raw() const { return theSample; }
0022
0023 int pseudoStripInput() const { return theSample & 0xFFF; }
0024
0025 bool fineGrain() const { return (theSample & 0x1000) != 0; }
0026
0027
0028 uint16_t operator()() { return theSample; }
0029
0030 private:
0031 uint16_t theSample;
0032 };
0033
0034 std::ostream& operator<<(std::ostream& s, const EcalPseudoStripInputSample& samp);
0035
0036 #endif