ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Event.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Event.h
1 // -*- c++ -*-
2 #ifndef __EVENT_H__
3 #define __EVENT_H__
4 
5 //#include <stddef.h>
6 
7 #include "packet.h"
8 #include <ctime>
9 
10 // virtual base class for an "event"
11 
12 const char *get_evt_mnemonic(const int);
13 
23 //class PHLeanTimeStamp;
24 
25 #ifndef __CINT__
27 #else
28 class Event {
29 #endif
30 
31 public:
32  inline virtual ~Event(){};
33 
34  // **** info & debug utils ******
39  virtual unsigned int getEvtLength() =0;
40 
47  virtual int getEvtType() =0;
48 
55  virtual int getEvtSequence() =0;
56 
61  virtual int getRunNumber() =0;
62 
69  virtual void identify(std::ostream& os = std::cout) const = 0;
70 
79  virtual void listFrame( const int id=0, std::ostream& os=std::cout) const {};
80 
81  virtual void listHistory( const int id=0, std::ostream& os=std::cout) const {};
82  virtual void listError( const int id=0, std::ostream& os=std::cout) const {};
83 
106  virtual unsigned int getFrameEntry( const char *what, const int id=0, const int index =0) const { return 0; };
107 
108 
109  // ***** packet handling *****
115  virtual Packet* getPacket(const int)=0;
116 
122  virtual Packet* getPacket(const int, const int hitFormat)=0;
123 
130  virtual int getPacketList(Packet*[], const int length) =0;
131 
136  virtual int existPacket (const int packetid)=0;
137 
138  // **** event copying *****
146  virtual int Copy ( int *destination, const unsigned int length, int *nw, const char * what ="" )=0;
147 
148 
154  virtual int getErrorCode() {return 0;};
155 
156 
162  virtual unsigned int getTagWord( const int i=0) const { return 0;};
163 
164  virtual int is_pointer_type() const =0;
165 
166  // **** convert event from pointer- to data-based *****
175  virtual int convert ()=0;
176 
177  virtual int getDate() = 0;
178  virtual time_t getTime() const = 0;
179 };
180 
181 #endif /* __EVENT_H__ */