メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

TRecordAssociation.hh

解説を見る。
00001 // ============================================================================
00002 //  $Id: TRecordAssociation.hh,v 1.2 2004/03/07 10:30:27 goiwai Exp $
00003 //  $Name: CLDAQ-1-13-00 $
00004 //  $Log: TRecordAssociation.hh,v $
00005 //  Revision 1.2  2004/03/07 10:30:27  goiwai
00006 //  ROOTに組みこむためのおまじないマクロを埋めこみました。
00007 //  全てにおいて完全に動作するわけではありません。
00008 //
00009 //  Revision 1.1  2004/03/01 02:36:25  goiwai
00010 //  RecordDisplay用のクラス群を置きました.
00011 //  お蔵入りになってたものに手直しを加えたものですが,
00012 //  まだ不充分な点も在ります.徐々に修正していきたいと思います.
00013 //  DataRecordオブジェクトを表示するためのツール群なのでRecordDisplayと呼
00014 //  んでいます,多分にオフライン要素が強いです.
00015 //  オンラインよりにしたものを後でEventDisplay(Eventを表示)としてコミット
00016 //  します.
00017 //
00018 // ============================================================================
00019 #ifdef __CLDAQ_ROOT_USE
00020 #ifndef CLDAQ__TRECORDASSOCIATION_HH
00021 #define CLDAQ__TRECORDASSOCIATION_HH
00022 
00023 class TRecordDisplayCanvas;
00024 class TH1D;
00025 
00026 #include <TH1.h>
00027 #include "Tglobals.h"
00028 
00029 class TRecordAssociation
00030 {
00031 
00032   private:
00033     Tstring theRecordID;
00034     Tstring theSectionID;
00035     Tstring theSegmentID;
00036     Tstring theElementID;
00037     Tint theNumberOfBins;
00038     Tdouble theMinimumX;
00039     Tdouble theMaximumX;
00040     TRecordDisplayCanvas* theCanvas;
00041     TH1D* theHistogram;
00042     Tbool theValidAssociation;
00043 
00046 
00047   public:
00048     TRecordAssociation( const Tstring& recid = "",
00049                         const Tstring& secid = "",
00050                         const Tstring& segid = "",
00051                         const Tstring& eleid = "",
00052                         Tint nbin = -1,
00053                         Tdouble xmin = DBL_MAX,
00054                         Tdouble xmax = DBL_MIN,
00055                         TRecordDisplayCanvas* cv = 0,
00056                         TH1D* h = 0
00057                         );
00058     TRecordAssociation( const TRecordAssociation& right );
00059     ~TRecordAssociation();
00060 
00061   public:
00062     const TRecordAssociation& operator=( const TRecordAssociation& right );
00063     Tbool operator==( const TRecordAssociation& right ) const;
00064     Tbool operator!=( const TRecordAssociation& right ) const;
00065 
00066   public:
00067     friend Tostream& operator<<( Tostream& tos, const TRecordAssociation& right );
00068 
00069   public:
00070     const Tstring& GetRecordID() const;
00071     const Tstring& GetSectionID() const;
00072     const Tstring& GetSegmentID() const;
00073     const Tstring& GetElementID() const;
00074     Tint GetNumberOfBins() const;
00075     Tdouble GetMinimumX() const;
00076     Tdouble GetMaximumX() const;
00077     TRecordDisplayCanvas* GetCanvas() const;
00078     TH1D* GetHistogram() const;
00079     Tvoid SetRecordID( const Tstring& id );
00080     Tvoid SetSectionID( const Tstring& id );
00081     Tvoid SetSegmentID( const Tstring& id );
00082     Tvoid SetElementID( const Tstring& id );
00083     Tvoid SetNumberOfBins( Tint nbin );
00084     Tvoid SetMinimumX( Tdouble xmin );
00085     Tvoid SetMaximumX( Tdouble xmax );
00086     Tvoid SetCanvas( TRecordDisplayCanvas* cv );
00087     Tvoid SetHistogram( TH1D* h );
00088     Tbool IsValid() const;
00089 
00090   private:
00091     Tvoid checkValid();
00092 
00093 #ifdef __CLDAQ_ROOT_DLL
00094     ClassDef(TRecordAssociation,0)
00095 #endif
00096 
00097 };
00098 
00099 inline const Tstring& TRecordAssociation::GetRecordID() const
00100 {
00101   return theRecordID;
00102 }
00103 
00104 inline const Tstring& TRecordAssociation::GetSectionID() const
00105 {
00106   return theSectionID;
00107 }
00108 
00109 inline const Tstring& TRecordAssociation::GetSegmentID() const
00110 {
00111   return theSegmentID;
00112 }
00113 
00114 inline const Tstring& TRecordAssociation::GetElementID() const
00115 {
00116   return theElementID;
00117 }
00118 
00119 inline Tint TRecordAssociation::GetNumberOfBins() const
00120 {
00121   return theNumberOfBins;
00122 }
00123 
00124 inline Tdouble TRecordAssociation::GetMinimumX() const
00125 {
00126   return theMinimumX;
00127 }
00128 
00129 inline Tdouble TRecordAssociation::GetMaximumX() const
00130 {
00131   return theMaximumX;
00132 }
00133 
00134 inline TRecordDisplayCanvas* TRecordAssociation::GetCanvas() const
00135 {
00136   return theCanvas;
00137 }
00138 
00139 inline TH1D* TRecordAssociation::GetHistogram() const
00140 {
00141   return theHistogram;
00142 }
00143 
00144 inline Tvoid TRecordAssociation::SetRecordID( const Tstring& id )
00145 {
00146   theRecordID = id;
00147   checkValid();
00148   return;
00149 }
00150 
00151 inline Tvoid TRecordAssociation::SetSectionID( const Tstring& id )
00152 {
00153   theSectionID = id;
00154   checkValid();
00155   return;
00156 }
00157 
00158 inline Tvoid TRecordAssociation::SetSegmentID( const Tstring& id )
00159 {
00160   theSegmentID = id;
00161   checkValid();
00162   return;
00163 }
00164 
00165 inline Tvoid TRecordAssociation::SetElementID( const Tstring& id )
00166 {
00167   theElementID = id;  
00168   checkValid();
00169   return;
00170 }
00171 
00172 inline Tvoid TRecordAssociation::SetNumberOfBins( Tint nbin )
00173 {
00174   theNumberOfBins = nbin;
00175   checkValid();
00176   return;
00177 }
00178 
00179 inline Tvoid TRecordAssociation::SetMinimumX( Tdouble xmin )
00180 {
00181   theMinimumX = xmin;
00182   checkValid();
00183   return;
00184 }
00185 
00186 inline Tvoid TRecordAssociation::SetMaximumX( Tdouble xmax )
00187 {
00188   theMaximumX = xmax;
00189   checkValid();
00190   return;
00191 }
00192 
00193 inline Tvoid TRecordAssociation::SetCanvas( TRecordDisplayCanvas* cv )
00194 {
00195   theCanvas = cv;
00196   checkValid();
00197   return;
00198 }
00199 
00200 inline Tvoid TRecordAssociation::SetHistogram( TH1D* h )
00201 {
00202   theHistogram = h;
00203   checkValid();
00204   return;
00205 }
00206 
00207 inline Tbool TRecordAssociation::IsValid() const
00208 {
00209   return theValidAssociation;
00210 }
00211 
00212 #endif
00213 #endif

CLDAQ - a Class Library for Data AcQuisition (Version 1.13.0)
Go IWAI <goiwai@users.sourceforge.jp>