00001
00002 #ifndef LHCBEVENT_RAWEVENT_H
00003 #define LHCBEVENT_RAWEVENT_H 1
00004
00005
00006
00007 #include <iostream>
00008 #include "GaudiKernel/Kernel.h"
00009 #include "GaudiKernel/StreamBuffer.h"
00010 #include "GaudiKernel/DataObject.h"
00011 #include "GlastEvent/Utilities/TriggerPattern.h"
00012 #include "GlastEvent/TopLevel/Definitions.h"
00013
00014
00015
00016 extern const CLID& CLID_RawEvent;
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00050 class RawEvent : public DataObject {
00051
00052 public:
00054 RawEvent(const char* name = "RawEvent")
00055 : DataObject(name),
00056 m_fromMC(false),
00057 m_errorStatus(0),
00058 m_highVoltageMask(0) { }
00060 virtual ~RawEvent() { }
00061
00063 virtual const CLID& clID() const { return RawEvent::classID(); }
00064 static const CLID& classID() { return CLID_RawEvent; }
00065
00067 bool fromMC () const {
00068 return m_fromMC;
00069 }
00071 void setFromMC (bool value) {
00072 m_fromMC = value;
00073 }
00074
00076 long errorStatus () const {
00077 return m_errorStatus;
00078 }
00080 void setErrorStatus (long value) {
00081 m_errorStatus = value;
00082 }
00083
00085 long highVoltageMask () const {
00086 return m_highVoltageMask;
00087 }
00089 void setHighVoltageMask (long value) {
00090 m_highVoltageMask = value;
00091 }
00092
00094 const TriggerPattern& triggerPattern () const {
00095 return m_triggerPattern;
00096 }
00098 void setTriggerPattern (const TriggerPattern& value) {
00099 m_triggerPattern = value;
00100 }
00101
00103 virtual StreamBuffer& serialize( StreamBuffer& s ) const;
00105 virtual StreamBuffer& serialize( StreamBuffer& s );
00106
00108 friend std::ostream& operator<< ( std::ostream& s, const RawEvent& obj ) {
00109 return obj.fillStream(s);
00110 }
00112 virtual std::ostream& fillStream( std::ostream& s ) const;
00113
00114 private:
00116 bool m_fromMC;
00118 long m_errorStatus;
00120 long m_highVoltageMask;
00122 TriggerPattern m_triggerPattern;
00123
00124 };
00125
00126
00127
00128
00129
00130
00131
00133 inline StreamBuffer& RawEvent::serialize( StreamBuffer& s ) const {
00134 DataObject::serialize(s);
00135
00136 return s;
00137
00138
00139
00140
00141 }
00142
00143
00145 inline StreamBuffer& RawEvent::serialize( StreamBuffer& s ) {
00146 DataObject::serialize(s);
00147 unsigned char u;
00148
00149
00150
00151
00152
00153 return s;
00154 }
00155
00156
00158 inline std::ostream& RawEvent::fillStream( std::ostream& s ) const {
00159 s << "class RawEvent :"
00160 << "\n Flag of origin = ";
00161 if( m_fromMC ) {
00162 s << " true";
00163 }
00164 else {
00165 s << "false";
00166 }
00167 s << "\n Error status = "
00168 << GlastEventField( GlastEvent::field12 )
00169 << m_errorStatus
00170 << "\n High voltage mask = "
00171 << GlastEventField( GlastEvent::field12 )
00172 << m_highVoltageMask
00173 << "\n Present triggers = " << m_triggerPattern;
00174 return s;
00175 }
00176
00177
00178 #endif // LHCBEVENT_RAWEVENT_H