CMS 3D CMS Logo

CSCTFEvent.h
Go to the documentation of this file.
1 #ifndef CSCTFEvent_h
2 #define CSCTFEvent_h
3 
5 #include <vector>
6 
7 class CSCTFEvent {
8 private:
10  int nRecords;
11 
12 public:
13  // Before we do unpacking, we need to do basic TF format checks (TF Binary Examiner)
14  enum {
18  WORD_COUNT = 0x10,
19  CONFIGURATION = 0x20,
20  NONSENSE = 0x40
21  };
22 
23  std::vector<CSCSPEvent> SPs(void) const throw() {
24  std::vector<CSCSPEvent> result;
25  result.reserve(nRecords);
26  for (int spNum = 0; spNum < nRecords; spNum++)
27  result.push_back(sp[spNum]);
28  return result;
29  }
30 
31  // Faster analog of the previous function:
32  std::vector<const CSCSPEvent *> SPs_fast(void) const throw() {
33  std::vector<const CSCSPEvent *> retval;
34  retval.clear();
35  retval.reserve(nRecords);
36  for (int spNum = 0; spNum < nRecords; spNum++)
37  retval.push_back(sp + spNum);
38  return retval;
39  }
40 
41  unsigned int unpack(const unsigned short *buf, unsigned int length);
42 
43  CSCTFEvent(void) {}
44 };
45 
46 #endif
CSCTFEvent::MISSING_TRAILER
Definition: CSCTFEvent.h:16
CSCTFEvent::OUT_OF_BUFFER
Definition: CSCTFEvent.h:17
CSCTFEvent::WORD_COUNT
Definition: CSCTFEvent.h:18
CSCSPEvent.h
CSCSPEvent
Definition: CSCSPEvent.h:9
CSCTFEvent::NONSENSE
Definition: CSCTFEvent.h:20
CSCTFEvent::CONFIGURATION
Definition: CSCTFEvent.h:19
CSCTFEvent::sp
CSCSPEvent sp[12]
Definition: CSCTFEvent.h:9
CSCTFEvent::nRecords
int nRecords
Definition: CSCTFEvent.h:10
CSCTFEvent::SPs_fast
std::vector< const CSCSPEvent * > SPs_fast(void) const
Definition: CSCTFEvent.h:32
CSCTFEvent::CSCTFEvent
CSCTFEvent(void)
Definition: CSCTFEvent.h:43
CSCTFEvent::MISSING_HEADER
Definition: CSCTFEvent.h:15
CSCTFEvent::unpack
unsigned int unpack(const unsigned short *buf, unsigned int length)
Definition: CSCTFEvent.cc:6
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCTFEvent::SPs
std::vector< CSCSPEvent > SPs(void) const
Definition: CSCTFEvent.h:23
mps_fire.result
result
Definition: mps_fire.py:311
CSCTFEvent
Definition: CSCTFEvent.h:7