EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairDbBinaryFile Class Reference

#include <EicRoot/blob/master/dbase/dbInterface/FairDbBinaryFile.h>

+ Collaboration diagram for FairDbBinaryFile:

Public Member Functions

 FairDbBinaryFile (const char *fileName="", Bool_t input=kTRUE)
 
 ~FairDbBinaryFile ()
 
string GetFileName () const
 
Bool_t IsOK () const
 
Bool_t IsReading () const
 
Bool_t IsWriting () const
 
void Close ()
 
FairDbBinaryFileoperator>> (Bool_t &num)
 
FairDbBinaryFileoperator<< (const Bool_t &num)
 
FairDbBinaryFileoperator>> (Int_t &num)
 
FairDbBinaryFileoperator<< (const Int_t &num)
 
FairDbBinaryFileoperator>> (UInt_t &num)
 
FairDbBinaryFileoperator<< (const UInt_t &num)
 
FairDbBinaryFileoperator>> (Double_t &num)
 
FairDbBinaryFileoperator<< (const Double_t &num)
 
FairDbBinaryFileoperator>> (ValTimeStamp &ts)
 
FairDbBinaryFileoperator<< (const ValTimeStamp &ts)
 
FairDbBinaryFileoperator>> (string &str)
 
FairDbBinaryFileoperator<< (const string &str)
 
FairDbBinaryFileoperator>> (ValRange &vr)
 
FairDbBinaryFileoperator<< (const ValRange &vr)
 
FairDbBinaryFileoperator>> (vector< FairDbTableRow * > &arr)
 
FairDbBinaryFileoperator<< (vector< FairDbTableRow * > &arr)
 
char * ReleaseArrayBuffer ()
 

Static Public Member Functions

static Bool_t CanReadL2Cache ()
 
static Bool_t CanWriteL2Cache ()
 
static void SetWorkDir (const string &dir)
 
static void SetReadAccess (Bool_t access=kTRUE)
 
static void SetWriteAccess (Bool_t access=kTRUE)
 

Private Member Functions

 FairDbBinaryFile (const FairDbBinaryFile &)
 
FairDbBinaryFile operator= (const FairDbBinaryFile &)
 
Bool_t CanRead ()
 
Bool_t CanWrite ()
 
void CheckFileStatus ()
 
Bool_t Read (char *bytes, UInt_t numBytes)
 
Bool_t Write (const char *bytes, UInt_t numBytes)
 

Private Attributes

fstream * fFile
 Associated file, may be null.
 
Bool_t fReading
 
Bool_t fHasErrors
 
char * fArrayBuffer
 
string fFileName
 

Static Private Attributes

static string fgWorkDir
 
static Bool_t fgReadAccess = kTRUE
 
static Bool_t fgWriteAccess = kTRUE
 

Detailed Description

Definition at line 24 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 24 of file FairDbBinaryFile.h

Constructor & Destructor Documentation

FairDbBinaryFile::FairDbBinaryFile ( const char *  fileName = "",
Bool_t  input = kTRUE 
)

Definition at line 36 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 36 of file FairDbBinaryFile.cxx

References fFile, fFileName, fgReadAccess, fgWorkDir, fgWriteAccess, fHasErrors, and in.

FairDbBinaryFile::~FairDbBinaryFile ( )

Definition at line 68 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 68 of file FairDbBinaryFile.cxx

References Close(), fArrayBuffer, and fFile.

+ Here is the call graph for this function:

FairDbBinaryFile::FairDbBinaryFile ( const FairDbBinaryFile )
private

Member Function Documentation

Bool_t FairDbBinaryFile::CanRead ( )
private

Definition at line 313 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 313 of file FairDbBinaryFile.cxx

References fReading, and IsOK().

Referenced by operator>>(), and Read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool_t FairDbBinaryFile::CanReadL2Cache ( )
inlinestatic

Definition at line 85 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 85 of file FairDbBinaryFile.h

References fgReadAccess, and fgWorkDir.

Referenced by FairDbTableProxy::CanReadL2Cache().

+ Here is the caller graph for this function:

Bool_t FairDbBinaryFile::CanWrite ( )
private

Definition at line 324 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 324 of file FairDbBinaryFile.cxx

References fReading, and IsOK().

Referenced by operator<<(), and Write().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Bool_t FairDbBinaryFile::CanWriteL2Cache ( )
inlinestatic

Definition at line 86 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 86 of file FairDbBinaryFile.h

References fgWorkDir, and fgWriteAccess.

Referenced by FairDbTableProxy::CanWriteL2Cache().

+ Here is the caller graph for this function:

void FairDbBinaryFile::CheckFileStatus ( )
private

Definition at line 335 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 335 of file FairDbBinaryFile.cxx

References Close(), fFile, fFileName, fHasErrors, and fReading.

Referenced by operator>>(), Read(), and Write().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void FairDbBinaryFile::Close ( )

Definition at line 79 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 79 of file FairDbBinaryFile.cxx

References fFile.

Referenced by CheckFileStatus(), operator>>(), and ~FairDbBinaryFile().

+ Here is the caller graph for this function:

string FairDbBinaryFile::GetFileName ( void  ) const
inline

Definition at line 35 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 35 of file FairDbBinaryFile.h

References fFileName.

Referenced by FairDbTableProxy::RestoreFromL2Cache().

+ Here is the caller graph for this function:

Bool_t FairDbBinaryFile::IsOK ( ) const
inline

Definition at line 36 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 36 of file FairDbBinaryFile.h

References fHasErrors.

Referenced by CanRead(), CanWrite(), IsReading(), and IsWriting().

+ Here is the caller graph for this function:

Bool_t FairDbBinaryFile::IsReading ( ) const
inline

Definition at line 37 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 37 of file FairDbBinaryFile.h

References fReading, and IsOK().

Referenced by FairDbValidityRec::Streamer(), FairDbResult::Streamer(), and FairDbResultNonAgg::Streamer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Bool_t FairDbBinaryFile::IsWriting ( ) const
inline

Definition at line 38 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 38 of file FairDbBinaryFile.h

References fReading, and IsOK().

Referenced by FairDbValidityRec::Streamer(), FairDbResult::Streamer(), and FairDbResultNonAgg::Streamer().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

FairDbBinaryFile& FairDbBinaryFile::operator<< ( const Bool_t &  num)
FairDbBinaryFile& FairDbBinaryFile::operator<< ( const Int_t &  num)
FairDbBinaryFile& FairDbBinaryFile::operator<< ( const UInt_t &  num)
FairDbBinaryFile& FairDbBinaryFile::operator<< ( const Double_t &  num)
FairDbBinaryFile& FairDbBinaryFile::operator<< ( const ValTimeStamp ts)
FairDbBinaryFile & FairDbBinaryFile::operator<< ( const string &  str)

Definition at line 147 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 147 of file FairDbBinaryFile.cxx

References Write().

+ Here is the call graph for this function:

FairDbBinaryFile & FairDbBinaryFile::operator<< ( const ValRange vr)

Definition at line 176 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 176 of file FairDbBinaryFile.cxx

References CanWrite(), ValRange::GetDataSource(), ValRange::GetDetectorMask(), ValRange::GetSimMask(), ValRange::GetTimeEnd(), and ValRange::GetTimeStart().

+ Here is the call graph for this function:

FairDbBinaryFile & FairDbBinaryFile::operator<< ( vector< FairDbTableRow * > &  arr)

Definition at line 282 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 282 of file FairDbBinaryFile.cxx

References EndMarker, marker(), p, and StartMarker.

+ Here is the call graph for this function:

FairDbBinaryFile FairDbBinaryFile::operator= ( const FairDbBinaryFile )
private
FairDbBinaryFile& FairDbBinaryFile::operator>> ( Bool_t &  num)
FairDbBinaryFile& FairDbBinaryFile::operator>> ( Int_t &  num)
FairDbBinaryFile& FairDbBinaryFile::operator>> ( UInt_t &  num)
FairDbBinaryFile& FairDbBinaryFile::operator>> ( Double_t &  num)
FairDbBinaryFile& FairDbBinaryFile::operator>> ( ValTimeStamp ts)
FairDbBinaryFile & FairDbBinaryFile::operator>> ( string &  str)

Definition at line 137 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 137 of file FairDbBinaryFile.cxx

References getline.

FairDbBinaryFile & FairDbBinaryFile::operator>> ( ValRange vr)

Definition at line 155 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 155 of file FairDbBinaryFile.cxx

References CanRead().

+ Here is the call graph for this function:

FairDbBinaryFile & FairDbBinaryFile::operator>> ( vector< FairDbTableRow * > &  arr)

Definition at line 190 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 190 of file FairDbBinaryFile.cxx

References CanRead(), CheckFileStatus(), Close(), EndMarker, fArrayBuffer, GetVTptr(), marker(), Read(), SetVTptr(), and StartMarker.

+ Here is the call graph for this function:

Bool_t FairDbBinaryFile::Read ( char *  bytes,
UInt_t  numBytes 
)
private

Definition at line 360 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 360 of file FairDbBinaryFile.cxx

References CanRead(), CheckFileStatus(), fFile, and fHasErrors.

Referenced by operator>>().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char* FairDbBinaryFile::ReleaseArrayBuffer ( )
inline

Definition at line 77 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 77 of file FairDbBinaryFile.h

References fArrayBuffer.

Referenced by FairDbResultNonAgg::Streamer().

+ Here is the caller graph for this function:

static void FairDbBinaryFile::SetReadAccess ( Bool_t  access = kTRUE)
inlinestatic

Definition at line 91 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 91 of file FairDbBinaryFile.h

References fgReadAccess.

static void FairDbBinaryFile::SetWorkDir ( const string &  dir)
inlinestatic

Definition at line 87 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 87 of file FairDbBinaryFile.h

References fgWorkDir.

Referenced by FairDbTableProxyRegistry::Config().

+ Here is the caller graph for this function:

static void FairDbBinaryFile::SetWriteAccess ( Bool_t  access = kTRUE)
inlinestatic

Definition at line 92 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 92 of file FairDbBinaryFile.h

References fgWriteAccess.

Bool_t FairDbBinaryFile::Write ( const char *  bytes,
UInt_t  numBytes 
)
private

Definition at line 370 of file FairDbBinaryFile.cxx.

View newest version in sPHENIX GitHub at line 370 of file FairDbBinaryFile.cxx

References CanWrite(), CheckFileStatus(), fFile, and fHasErrors.

Referenced by operator<<().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

char* FairDbBinaryFile::fArrayBuffer
private

Definition at line 117 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 117 of file FairDbBinaryFile.h

Referenced by operator>>(), ReleaseArrayBuffer(), and ~FairDbBinaryFile().

fstream* FairDbBinaryFile::fFile
private

Associated file, may be null.

Definition at line 112 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 112 of file FairDbBinaryFile.h

Referenced by CheckFileStatus(), Close(), FairDbBinaryFile(), Read(), Write(), and ~FairDbBinaryFile().

string FairDbBinaryFile::fFileName
private

Definition at line 118 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 118 of file FairDbBinaryFile.h

Referenced by CheckFileStatus(), FairDbBinaryFile(), and GetFileName().

Bool_t FairDbBinaryFile::fgReadAccess = kTRUE
staticprivate

Definition at line 121 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 121 of file FairDbBinaryFile.h

Referenced by CanReadL2Cache(), FairDbBinaryFile(), and SetReadAccess().

string FairDbBinaryFile::fgWorkDir
staticprivate

Definition at line 120 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 120 of file FairDbBinaryFile.h

Referenced by CanReadL2Cache(), CanWriteL2Cache(), FairDbBinaryFile(), and SetWorkDir().

Bool_t FairDbBinaryFile::fgWriteAccess = kTRUE
staticprivate

Definition at line 122 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 122 of file FairDbBinaryFile.h

Referenced by CanWriteL2Cache(), FairDbBinaryFile(), and SetWriteAccess().

Bool_t FairDbBinaryFile::fHasErrors
private

Definition at line 116 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 116 of file FairDbBinaryFile.h

Referenced by CheckFileStatus(), FairDbBinaryFile(), IsOK(), Read(), and Write().

Bool_t FairDbBinaryFile::fReading
private

Definition at line 115 of file FairDbBinaryFile.h.

View newest version in sPHENIX GitHub at line 115 of file FairDbBinaryFile.h

Referenced by CanRead(), CanWrite(), CheckFileStatus(), IsReading(), and IsWriting().


The documentation for this class was generated from the following files: