File indexing completed on 2025-08-03 08:20:32
0001 #ifndef __A_EVENT_H
0002 #define __A_EVENT_H
0003
0004 #include "Event.h"
0005 #include "EvtConstants.h"
0006 #include "phenixOnline.h"
0007 #include "EvtStructures.h"
0008
0009 #if !defined(SunOS) && !defined(OSF1)
0010 #include <map>
0011 #endif
0012
0013 #ifndef __CINT__
0014 class WINDOWSEXPORT A_Event : public Event {
0015 #else
0016 class A_Event : public Event {
0017 #endif
0018
0019 public:
0020
0021 A_Event( PHDWORD *);
0022 A_Event( int *);
0023 ~A_Event();
0024
0025
0026
0027 unsigned int getEvtLength () const;
0028 int getEvtType() const;
0029 int getEvtSequence() const;
0030 int getRunNumber() const;
0031
0032 void identify(std::ostream& os = std::cout) const;
0033
0034 void listFrame( const int id=0, OSTREAM& os=COUT ) const;
0035
0036 void listHistory( const int id=0, OSTREAM& os=COUT ) const;
0037
0038 void listError( const int id=0, OSTREAM& os=COUT ) const;
0039
0040 unsigned int getFrameEntry( const char *what, const int id=0, const int index =0) const;
0041
0042
0043 Packet* getPacket(const int);
0044
0045 Packet* getPacket(const int, const int hitFormat);
0046
0047 int getPacketList(Packet*[], const int);
0048 std::vector<Packet *> getPacketVector();
0049
0050 int existPacket (const int);
0051
0052
0053 int Copy ( int *, const unsigned int, int *, const char *what ="");
0054
0055
0056
0057 int getErrorCode();
0058 unsigned int getTagWord( const int i=0) const
0059 {
0060 if ( i) return EventData->reserved[1];
0061 return EventData->reserved[0];
0062 };
0063
0064 int is_pointer_type() const;
0065 int convert ();
0066
0067 static void dumpFrame(PHDWORD *fp, OSTREAM &os = COUT);
0068 static void dumpErrorBlock(PHDWORD *fp, OSTREAM &os = COUT);
0069
0070 static void dumpBlock(PHDWORD *p, UINT len, OSTREAM &os = COUT, const int how=EVT_HEXADECIMAL);
0071
0072 int getDate() { return 0;};
0073 time_t getTime() const;
0074
0075 static Packet *makePacket(PHDWORD *pp, const int hitformat=0);
0076
0077 void setOriginBuffer(const int n) {originBuffer =n;};
0078 int getOriginBuffer() const {return originBuffer;};
0079
0080 protected:
0081 virtual int updateFramelist();
0082
0083 virtual unsigned int getFrameValue(const char *what, PHDWORD *fp, const unsigned int index =0) const;
0084
0085
0086 #if !defined(SunOS) && !defined(OSF1)
0087 virtual int createMap();
0088 #endif
0089 int is_data_type;
0090 evtdata_ptr EventData;
0091 PHDWORD **framelist;
0092 int NumberFrames;
0093 int hasMap;
0094 int errorcode;
0095 int originBuffer;
0096
0097 #if !defined(SunOS) && !defined(OSF1)
0098 std::map <int, PHDWORD *> pmap;
0099
0100 #endif
0101
0102 };
0103
0104 #endif
0105
0106
0107