/home/kolos/working/oh/oh/interface/OHReceiver.h

00001 /*
00002     OHReceiver.h - OH private header file.
00003     
00004     Fredrik Sandin, Oct 2001
00005     Sergei Kolos,   May 2004
00006     Herbert Kaiser, Aug 2006
00007 */
00008 
00009 #ifndef OH_RECEIVER_H
00010 #define OH_RECEIVER_H
00011 
00012 #include <vector>
00013 
00014 #include <is/infoiterator.h>
00015 #include <is/inforeceiver.h>
00016 #include <is/infodictionary.h>
00017 
00018 #include <oh/core/GraphData.h>
00019 #include <oh/core/ProfileData.h>
00020 #include <oh/core/HistogramData.h>
00021 #include <oh/OHUtil.h>
00022 #include <oh/exceptions.h>
00023 
00024 namespace oh
00025 {
00026     template <class , bool > class iterator;
00027 }
00028 
00029 
00031 
00076 class OHReceiver
00077 {
00078   template <class , bool > friend class oh::iterator;
00079   friend class OHSubscriber;
00080     
00081   public:
00082     typedef ISInfo::Reason      Reason;
00083 
00084     static const Reason Created = ISInfo::Created;
00085     static const Reason Updated = ISInfo::Updated;
00086     static const Reason Deleted = ISInfo::Deleted;
00087 
00089     virtual ~OHReceiver( ) { ; }
00090     
00092     void getHistogram(  const IPCPartition & p,
00093                         const std::string & server,
00094                         const std::string & provider,
00095                         const std::string & histoname,
00096                         bool  with_history = false,
00097                         int   how_many = -1 ) throw (daq::oh::ObjectNotFound,daq::oh::InvalidObject);
00098 
00100     void getObject(     const IPCPartition & p,
00101                         const std::string & server,
00102                         const std::string & provider,
00103                         const std::string & histoname,
00104                         bool  with_history = false,
00105                         int   how_many = -1 ) throw (daq::oh::ObjectNotFound,daq::oh::InvalidObject);
00106 
00108 
00112     virtual void receive_( const std::string & name, oh::HistogramData<char> & histogram ) = 0;
00113     virtual void receive_( const std::string & name, oh::HistogramData<short> & histogram ) = 0;
00114     virtual void receive_( const std::string & name, oh::HistogramData<int> & histogram ) = 0;
00115     virtual void receive_( const std::string & name, oh::HistogramData<float> & histogram ) = 0;
00116     virtual void receive_( const std::string & name, oh::HistogramData<double> & histogram ) = 0;
00117     virtual void receive_( const std::string & name, oh::ProfileData & histogram ) = 0;
00118     virtual void receive_( const std::string & name, oh::GraphData & graph ) = 0;
00119     virtual void receive_( const std::string & name, oh::Graph2DData & graph ) = 0;
00120     
00122 
00126     virtual void receive_( const std::string & name, std::vector<oh::HistogramData<char> > & set ) = 0;
00127     virtual void receive_( const std::string & name, std::vector<oh::HistogramData<short> > & set ) = 0;
00128     virtual void receive_( const std::string & name, std::vector<oh::HistogramData<int> > & set ) = 0;
00129     virtual void receive_( const std::string & name, std::vector<oh::HistogramData<float> > & set ) = 0;
00130     virtual void receive_( const std::string & name, std::vector<oh::HistogramData<double> > & set ) = 0;
00131     virtual void receive_( const std::string & name, std::vector<oh::ProfileData> & set ) = 0;
00132     virtual void receive_( const std::string & name, std::vector<oh::GraphData> & set ) = 0;
00133     virtual void receive_( const std::string & name, std::vector<oh::Graph2DData> & set ) = 0;
00134     
00137 
00142     virtual void objectChanged( const std::string & name, const OWLTime & time, Reason reason );
00143 
00144   private:
00145 
00147     void receive( ISInfoIterator * iterator, bool with_history, long how_many );
00148     
00150     void receive( ISCallbackInfo * info );
00151 
00152 };
00153 
00154 #endif // OH_RECEIVER_H

Generated on Thu Dec 21 16:26:02 2006 for OH User API by  doxygen 1.4.7