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
CSCSPEvent.h
CSCTFEvent::WORD_COUNT
Definition: CSCTFEvent.h:18
CSCTFEvent::CONFIGURATION
Definition: CSCTFEvent.h:19
CSCSPEvent
Definition: CSCSPEvent.h:9
CSCTFEvent::sp
CSCSPEvent sp[12]
Definition: CSCTFEvent.h:9
CSCTFEvent::nRecords
int nRecords
Definition: CSCTFEvent.h:10
CSCTFEvent::OUT_OF_BUFFER
Definition: CSCTFEvent.h:17
CSCTFEvent::MISSING_TRAILER
Definition: CSCTFEvent.h:16
CSCTFEvent::SPs_fast
std::vector< const CSCSPEvent * > SPs_fast(void) const
Definition: CSCTFEvent.h:32
CSCTFEvent::MISSING_HEADER
Definition: CSCTFEvent.h:15
CSCTFEvent::CSCTFEvent
CSCTFEvent(void)
Definition: CSCTFEvent.h:43
CSCTFEvent::NONSENSE
Definition: CSCTFEvent.h:20
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:303
CSCTFEvent
Definition: CSCTFEvent.h:7