Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:21

0001 #ifndef EventFilter_CSCRawToDigi_CSCAnodeData_h
0002 #define EventFilter_CSCRawToDigi_CSCAnodeData_h
0003 
0004 #include "EventFilter/CSCRawToDigi/interface/CSCAnodeDataFormat.h"
0005 #include <memory>
0006 
0007 class CSCALCTHeader;
0008 
0009 class CSCAnodeData {
0010 public:
0011   /// a blank one, for Monte Carlo
0012   CSCAnodeData(const CSCALCTHeader &);
0013   /// fill from a real datastream
0014   CSCAnodeData(const CSCALCTHeader &, const unsigned short *buf);
0015 
0016   unsigned short *data() { return theData->data(); }
0017   /// the amount of the input binary buffer read, in 16-bit words
0018   unsigned short int sizeInWords() const { return theData->sizeInWords(); }
0019 
0020   /// input layer is from 1 to 6
0021   std::vector<CSCWireDigi> wireDigis(int layer) const { return theData->wireDigis(layer); }
0022   std::vector<std::vector<CSCWireDigi> > wireDigis() const;
0023 
0024   void add(const CSCWireDigi &wireDigi, int layer) { theData->add(wireDigi, layer); }
0025 
0026   static bool selfTest();
0027 
0028 private:
0029   std::shared_ptr<CSCAnodeDataFormat> theData;
0030   int firmwareVersion;
0031 };
0032 
0033 #endif