CSCAnodeData

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#ifndef EventFilter_CSCRawToDigi_CSCAnodeData_h
#define EventFilter_CSCRawToDigi_CSCAnodeData_h

#include "EventFilter/CSCRawToDigi/interface/CSCAnodeDataFormat.h"
#include <memory>

class CSCALCTHeader;

class CSCAnodeData {
public:
  /// a blank one, for Monte Carlo
  CSCAnodeData(const CSCALCTHeader &);
  /// fill from a real datastream
  CSCAnodeData(const CSCALCTHeader &, const unsigned short *buf);

  unsigned short *data() { return theData->data(); }
  /// the amount of the input binary buffer read, in 16-bit words
  unsigned short int sizeInWords() const { return theData->sizeInWords(); }

  /// input layer is from 1 to 6
  std::vector<CSCWireDigi> wireDigis(int layer) const { return theData->wireDigis(layer); }
  std::vector<std::vector<CSCWireDigi> > wireDigis() const;

  void add(const CSCWireDigi &wireDigi, int layer) { theData->add(wireDigi, layer); }

  static bool selfTest();

private:
  std::shared_ptr<CSCAnodeDataFormat> theData;
  int firmwareVersion;
};

#endif