Changeset 3392 in Sophya for trunk/SophyaLib/HiStats/basedtable.h


Ignore:
Timestamp:
Nov 22, 2007, 7:25:40 PM (18 years ago)
Author:
ansari
Message:

Implementation NTuple::Fill(), BaseDataTable:;AddRow()/GetRow() thread-safe - Reza 22/11/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/basedtable.h

    r2962 r3392  
    6363  {  row.Print(s);  return(s);  }
    6464
     65//  Forward class declaration for Thread-safe operations
     66class ThSafeOp;
     67
    6568//! Interface definition for classes handling data in a table.
    6669class BaseDataTable : public AnyDataObj , public NTupleInterface {
     
    8184  BaseDataTable(sa_size_t segsz=512);
    8285  virtual           ~BaseDataTable();
     86
     87  // Activate/deactivate thread-safe AddRow()/GetRow() operation
     88  virtual void      SetThreadSafe(bool fg=true);
     89  //! Return true if AddRow()/GetRow()  operations are thread-safe
     90  inline bool       IsThreadSafe() const { return ((mThS)?true:false); }
    8391 
    8492  //! Adds a column holding integer, named \b cnom
     
    193201  virtual DataTableRow&   GetRow(sa_size_t n, DataTableRow& row) const ;
    194202  //! Return the information stored in line (row) \b n of the table
    195   virtual MuTyV *   GetRow(sa_size_t n) const ;
     203  virtual MuTyV *   GetRow(sa_size_t n, MuTyV* mtvp=NULL) const ;
    196204  //! Return the information stored in line \b n of the table. Alias of GetLine
    197205  inline  MuTyV *   GetLine(sa_size_t n) const
     
    316324  std::vector< SegDBInterface<string> * > mSColsP;
    317325  std::vector< sa_size_t > mSColIdx;
     326
     327  ThSafeOp* mThS;       // != NULL -> Thread safe operations
    318328 
    319329};
Note: See TracChangeset for help on using the changeset viewer.