CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
15 
16  std::vector<CSCSPEvent> SPs(void) const throw() {
17  std::vector<CSCSPEvent> result;
18  result.reserve(nRecords);
19  for(int spNum=0; spNum<nRecords; spNum++) result.push_back(sp[spNum]);
20  return result;
21  }
22 
23  // Faster analog of the previous function:
24  std::vector<const CSCSPEvent*> SPs_fast(void) const throw() {
25  std::vector<const CSCSPEvent*> retval;
26  retval.clear();
27  retval.reserve(nRecords);
28  for(int spNum=0; spNum<nRecords; spNum++) retval.push_back(sp+spNum);
29  return retval;
30  }
31 
32  unsigned int unpack(const unsigned short *buf, unsigned int length) throw() ;
33 
34  CSCTFEvent(void){}
35 };
36 
37 #endif
unsigned int unpack(const unsigned short *buf, unsigned int length)
Definition: CSCTFEvent.cc:6
CSCTFEvent(void)
Definition: CSCTFEvent.h:34
tuple result
Definition: query.py:137
CSCSPEvent sp[12]
Definition: CSCTFEvent.h:9
std::vector< CSCSPEvent > SPs(void) const
Definition: CSCTFEvent.h:16
int nRecords
Definition: CSCTFEvent.h:10
std::vector< const CSCSPEvent * > SPs_fast(void) const
Definition: CSCTFEvent.h:24