/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/RawEvent/RawEvent-00-03-19/RawEvent/RawData.h

Go to the documentation of this file.
00001 #ifndef RawData_H
00002 #define RawData_H 
00003 #include <iostream>
00004 #include <vector>
00005 #include <stdint.h>
00006 #include <functional>
00007 #include <algorithm>
00008 #include "GaudiKernel/ContainedObject.h"
00009 #include "Identifier/Identifier.h"
00010 #include "GaudiKernel/Kernel.h"
00011 #include "GaudiKernel/ContainedObject.h"
00012 #include "GaudiKernel/SmartRefVector.h"
00013  
00014 #include "GaudiKernel/ObjectVector.h"
00015 #include "GaudiKernel/ObjectList.h"
00016 
00017 /*
00018  *
00019  */
00020 
00021 class RawData : virtual public ContainedObject { 
00022 public:
00023   // Constructor
00024   RawData(const Identifier& id, const unsigned int timeChannel=0, const unsigned int chargeChannel=0);
00025 
00026   RawData(const unsigned int id);
00027 
00028   // Set time channel
00029   void setTimeChannel(const unsigned int timeChannel);
00030  
00031   // Set charge channel
00032   void setChargeChannel(const unsigned int chargeChannel);
00033 
00034   // Set track index
00035   void setTrackIndex(const int trackIndex);
00036   
00037   // Get associated id
00038   virtual Identifier identify() const;
00039 
00040   // Get associated int id 
00041   unsigned int getIntId() const;
00042 
00043   // Get time channel 
00044   unsigned int getTimeChannel() const; 
00045  
00046   // Get charge channel 
00047   unsigned int getChargeChannel() const;
00048 
00049   // Get track index
00050   int getTrackIndex() const;
00051 
00052   // Add two signals: if channel is the same, charge adds up, time set to the earliest value
00053   RawData &operator+=(const RawData &);
00054   
00055 
00057   virtual StreamBuffer& serialize( StreamBuffer& s ) const;
00058   virtual StreamBuffer& serialize( StreamBuffer& s );
00059         
00061   virtual std::ostream& fillStream( std::ostream& s ) const;
00062  
00063 protected:
00064   RawData(const RawData &);
00065 
00066   RawData &operator=(const RawData &);
00067 
00068   const Identifier m_id; //Offline ID for readout channel
00069   
00070   unsigned int m_timeChannel;
00071   
00072   unsigned int m_chargeChannel; 
00073 
00074   const unsigned int m_intId;
00075 
00076   int m_trackIndex;
00077 };
00078 
00080 inline StreamBuffer& RawData::serialize( StreamBuffer& s ) const {
00081       ContainedObject::serialize(s);
00082          s<< m_timeChannel
00083           << m_chargeChannel;
00084         return s;
00085 }
00086 
00087 inline StreamBuffer& RawData::serialize( StreamBuffer& s ) {
00088         return serialize(s); 
00089 }
00090 
00092  
00093 inline std::ostream& RawData::fillStream( std::ostream& s ) const {
00094         s << "class RawData :" << std::endl
00095           << " m_id: " << m_intId
00096           << " m_timeChannel: " << m_timeChannel
00097           << " m_chargeChannel: " << m_chargeChannel
00098           << std::endl;
00099         return s;
00100 }
00101 
00102 #endif

Generated on Tue Nov 29 22:58:35 2016 for BOSS_7.0.2 by  doxygen 1.4.7