Analysis Software
Documentation for sPHENIX simulation 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 
78  virtual void listFrame( const int /*id*/=0, std::ostream& /*os*/=std::cout) const {};
79 
80  virtual void listHistory( const int /*id*/=0, std::ostream& /*os*/=std::cout) const {};
81  virtual void listError( const int /*id*/=0, std::ostream& /*os*/=std::cout) const {};
82 
105  virtual unsigned int getFrameEntry( const char * /*what*/, const int /*id*/=0, const int /*index */=0) const { return 0; };
106 
107 
108  // ***** packet handling *****
114  virtual Packet* getPacket(const int)=0;
115 
121  virtual Packet* getPacket(const int, const int /*hitFormat*/)=0;
122 
129  virtual int getPacketList(Packet*[], const int /*length*/) =0;
130 
135  virtual int existPacket (const int /*packetid*/)=0;
136 
137  // **** event copying *****
145  virtual int Copy ( int *destination, const unsigned int /*length*/, int *nw, const char * /*what */="" )=0;
146 
147 
153  virtual int getErrorCode() {return 0;};
154 
155 
161  virtual unsigned int getTagWord( const int /*i*/ =0) const { return 0;};
162 
163  virtual int is_pointer_type() const =0;
164 
165  // **** convert event from pointer- to data-based *****
174  virtual int convert ()=0;
175 
176  virtual int getDate() = 0;
177  virtual time_t getTime() const = 0;
178 };
179 
180 #endif /* __EVENT_H__ */