StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
JanEvent.h
1 //
2 // Pibero Djawotho <pibero@iucf.indiana.edu>
3 // Indiana University
4 // Feb 18, 2006
5 //
6 
7 #ifndef JanEvent_hh
8 #define JanEvent_hh
9 
10 #include <iostream>
11 using namespace std;
12 
13 class JanEvent {
14 public:
15  JanEvent();
16 
17  char* header();
18  char* triggerData();
19  unsigned short* bemcData();
20  unsigned short* eemcData();
21  unsigned short bemcIn() const;
22  unsigned short eemcIn() const;
23 
24  void setHeader(const char*);
25  void setTriggerData(char*);
26  void setBemcData(unsigned short*);
27  void setEemcData(unsigned short*);
28 
29  friend istream& operator>>(istream& in, JanEvent& event);
30  friend ostream& operator<<(ostream& out, const JanEvent& event);
31 
32 private:
33  unsigned int mLength[4];
34  char mHeader[100];
35  char mTriggerData[20232];
36  unsigned short mBemcData[4800];
37  unsigned short mEemcData[960];
38 };
39 
40 inline char* JanEvent::header() { return mHeader; }
41 inline char* JanEvent::triggerData() { return mTriggerData; }
42 inline unsigned short* JanEvent::bemcData() { return mBemcData; }
43 inline unsigned short* JanEvent::eemcData() { return mEemcData; }
44 inline unsigned short JanEvent::bemcIn() const { return mLength[2] > 0; }
45 inline unsigned short JanEvent::eemcIn() const { return mLength[3] > 0; }
46 
47 #endif