TVldContext Class Reference

A tag for identifying the required "context" when interfacing with the DBI. More...

#include <TVldContext.hxx>

Inheritance diagram for TVldContext:
Inheritance graph
[legend]
Collaboration diagram for TVldContext:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TVldContext ()
 TVldContext (const TSK_DBI_Context &context)
 TVldContext (const DbiDetector::Detector_t &detector, const DbiSimFlag::SimFlag_t mcflag, const TVldTimeStamp &time)
virtual ~TVldContext ()
const char * AsString (Option_t *option="") const
DbiDetector::Detector_t GetDetector () const
DbiSimFlag::SimFlag_t GetSimFlag () const
TVldTimeStamp GetTimeStamp () const
Bool_t IsNull () const
Bool_t IsValid () const
 Return opposite of IsNull().
void Print (Option_t *option="") const

Protected Attributes

DbiDetector::Detector_t fDetector
DbiSimFlag::SimFlag_t fSimFlag
TVldTimeStamp fTimeStamp

Friends

Bool_t operator< (const TVldContext &lhs, const TVldContext &rhs)
Bool_t operator== (const TVldContext &lhs, const TVldContext &rhs)
Bool_t operator!= (const TVldContext &lhs, const TVldContext &rhs)
Bool_t operator<= (const TVldContext &lhs, const TVldContext &rhs)
Bool_t operator> (const TVldContext &lhs, const TVldContext &rhs)
Bool_t operator>= (const TVldContext &lhs, const TVldContext &rhs)

Detailed Description

A tag for identifying the required "context" when interfacing with the DBI.

Author:
(last to touch it)
Author
finch
Version:
Revision
1.1
Date:
Date
2011/01/18 05:49:20

Contact: R. Hatcher

Created on: 2000.05.03

Definition at line 38 of file TVldContext.hxx.


Constructor & Destructor Documentation

TVldContext::TVldContext (  )  [inline]

Definition at line 143 of file TVldContext.hxx.

00144   :  fDetector(DbiDetector::kUnknown), 
00145      fSimFlag(DbiSimFlag::kUnknown), 
00146      fTimeStamp() {
00147    // Default constructor (unknown detector, simflag, timestamp=now)
00148 }

TVldContext::TVldContext ( const TSK_DBI_Context context  ) 

Definition at line 35 of file TVldContext.cxx.

References fSimFlag, TSK_DBI_Context::IsMC(), and DbiSimFlag::kMC.

00036   : fDetector(DbiDetector::kNear), fSimFlag(DbiSimFlag::kData), fTimeStamp(context.GetTimeStamp(),0)
00037 {
00038    // constructor from context
00039    if(context.IsMC())
00040       fSimFlag = DbiSimFlag::kMC;
00041 }

Here is the call graph for this function:

TVldContext::TVldContext ( const DbiDetector::Detector_t detector,
const DbiSimFlag::SimFlag_t  mcflag,
const TVldTimeStamp time 
)

Definition at line 44 of file TVldContext.cxx.

00047    : fDetector(detector), fSimFlag(mcFlag), fTimeStamp(tstamp)
00048 {
00049    // normal constructor
00050 }

TVldContext::~TVldContext (  )  [inline, virtual]

Definition at line 150 of file TVldContext.hxx.

00150 { ; }


Member Function Documentation

const char * TVldContext::AsString ( Option_t *  option = ""  )  const

Return a formatted string of the contents of this object User should copy result because it points to a statically allocated string.

Definition at line 53 of file TVldContext.cxx.

References TVldTimeStamp::AsString(), DbiSimFlag::AsString(), DbiDetector::AsString(), fTimeStamp, GetDetector(), and GetSimFlag().

Referenced by TDbiValidityRec::IsCompatible(), Print(), and TVldValidate::TestContext().

00054 {
00055    // Return a formatted string of the contents of this object
00056    // User should copy result because it points to a
00057    // statically allocated string.
00058 
00059    static char newstring[80] = " ";
00060 
00061    switch (option[0]) {
00062    case 'c':
00063    case 'C':
00064      sprintf(newstring,"{%c%c %s}",
00065              DbiDetector::AsString(GetDetector())[0],
00066              DbiSimFlag::AsString(GetSimFlag())[0],
00067              fTimeStamp.AsString("c"));
00068      break;
00069    default:
00070      sprintf(newstring,"{%6.6s|%6.6s|%s}",
00071              DbiDetector::AsString(GetDetector()),
00072              DbiSimFlag::AsString(GetSimFlag()),
00073              fTimeStamp.AsString("c"));
00074    }
00075 
00076    return newstring;
00077 }

Here is the call graph for this function:

Here is the caller graph for this function:

DbiDetector::Detector_t TVldContext::GetDetector (  )  const [inline]
DbiSimFlag::SimFlag_t TVldContext::GetSimFlag (  )  const [inline]
TVldTimeStamp TVldContext::GetTimeStamp (  )  const [inline]
Bool_t TVldContext::IsNull (  )  const

Return true if this was initialized by default ctor we can only test detector type and simflag

Definition at line 89 of file TVldContext.cxx.

References fDetector, fSimFlag, DbiSimFlag::kUnknown, and DbiDetector::kUnknown.

Referenced by IsValid().

00090 {
00091    // Return true if this was initialized by default ctor
00092    // we can only test detector type and simflag
00093    return fDetector==DbiDetector::kUnknown && fSimFlag == DbiSimFlag::kUnknown;
00094 
00095 }

Here is the caller graph for this function:

Bool_t TVldContext::IsValid (  )  const [inline]

Return opposite of IsNull().

Definition at line 62 of file TVldContext.hxx.

References IsNull().

00062 { return !IsNull(); }

Here is the call graph for this function:

void TVldContext::Print ( Option_t *  option = ""  )  const

Definition at line 80 of file TVldContext.cxx.

References AsString().

00081 {
00082    // Print this object
00083 
00084    printf("%s\n",AsString(option));
00085 
00086 }

Here is the call graph for this function:


Friends And Related Function Documentation

Bool_t operator!= ( const TVldContext lhs,
const TVldContext rhs 
) [friend]
Bool_t operator< ( const TVldContext lhs,
const TVldContext rhs 
) [friend]
Bool_t operator<= ( const TVldContext lhs,
const TVldContext rhs 
) [friend]
Bool_t operator== ( const TVldContext lhs,
const TVldContext rhs 
) [friend]
Bool_t operator> ( const TVldContext lhs,
const TVldContext rhs 
) [friend]
Bool_t operator>= ( const TVldContext lhs,
const TVldContext rhs 
) [friend]

Member Data Documentation

Definition at line 79 of file TVldContext.hxx.

Referenced by GetDetector(), IsNull(), operator!=(), operator<(), and operator==().

Definition at line 80 of file TVldContext.hxx.

Referenced by GetSimFlag(), IsNull(), operator!=(), operator<(), operator==(), and TVldContext().

Definition at line 81 of file TVldContext.hxx.

Referenced by AsString(), GetTimeStamp(), operator!=(), operator<(), and operator==().


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

Generated on 11 Aug 2013 for SKDatabase by  doxygen 1.6.1