ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
A_Event.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file A_Event.h
1 #ifndef __A_EVENT_H
2 #define __A_EVENT_H
3 
4 #include "Event.h"
5 #include "EvtConstants.h"
6 #include "phenixOnline.h"
7 #include "EvtStructures.h"
8 
9 #if !defined(SunOS) && !defined(OSF1)
10 #include <map>
11 #endif
12 
13 #ifndef __CINT__
14 class WINDOWSEXPORT A_Event : public Event {
15 #else
16 class A_Event : public Event {
17 #endif
18 
19 public:
20  // constructors and destructors
21  A_Event( PHDWORD *);
22  A_Event( int *);
23  virtual ~A_Event();
24 
25  // info & debug utils
26 
27  virtual unsigned int getEvtLength();
28  virtual int getEvtType();
29  virtual int getEvtSequence();
30  virtual int getRunNumber();
31  // virtual PHTimeStamp * getTimeStamp() const;
32 
33  virtual void identify(std::ostream& os = std::cout) const;
34 
35  virtual void listFrame( const int id=0, OSTREAM& os=COUT ) const;
36 
37  virtual void listHistory( const int id=0, OSTREAM& os=COUT ) const;
38 
39  virtual void listError( const int id=0, OSTREAM& os=COUT ) const;
40 
41  unsigned int getFrameEntry( const char *what, const int id=0, const int index =0) const;
42 
43  // packet handling
44  virtual Packet* getPacket(const int);
45 
46  virtual Packet* getPacket(const int, const int hitFormat);
47 
48  virtual int getPacketList(Packet*[], const int);
49 
50  virtual int existPacket (const int);
51 
52  //event copying
53  virtual int Copy ( int *, const unsigned int, int *, const char *what ="");
54 
55 
56 
57  int getErrorCode();
58  unsigned int getTagWord( const int i=0) const
59  {
60  if ( i) return EventData->reserved[1];
61  return EventData->reserved[0];
62  };
63 
64  virtual int is_pointer_type() const;
65  virtual int convert ();
66 
67  static void dumpFrame(PHDWORD *fp, OSTREAM &os = COUT);
68  static void dumpErrorBlock(PHDWORD *fp, OSTREAM &os = COUT);
69 
70  static void dumpBlock(PHDWORD *p, UINT len, OSTREAM &os = COUT, const int how=EVT_HEXADECIMAL);
71 
72  virtual int getDate() { return 0;};
73  virtual time_t getTime() const;
74 
75  static Packet *makePacket(PHDWORD *pp, const int hitformat=0);
76 
77 protected:
78  virtual int updateFramelist();
79 
80  virtual unsigned int getFrameValue(const char *what, PHDWORD *fp, const unsigned int index =0) const;
81 
82 
83 #if !defined(SunOS) && !defined(OSF1)
84  virtual int createMap();
85 #endif
86  int is_data_type; // 0 is pointer based -- 1 is data based
90  int hasMap;
91  int errorcode;
92 
93 #if !defined(SunOS) && !defined(OSF1)
94  std::map <int, PHDWORD *> pmap;
95 
96 #endif
97 
98 };
99 
100 #endif
101 
102 
103