A tag for identifying the required "context" when interfacing with the DBI. More...
#include <TVldContext.hxx>
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) |
A tag for identifying the required "context" when interfacing with the DBI.
Contact: R. Hatcher
Created on: 2000.05.03
Definition at line 38 of file TVldContext.hxx.
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 }
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.
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 }
DbiDetector::Detector_t TVldContext::GetDetector | ( | ) | const [inline] |
Definition at line 54 of file TVldContext.hxx.
References fDetector.
Referenced by AsString(), TDbiDBProxy::FindTimeBoundaries(), TDbiValidityRec::HasExpired(), TVldRange::IsCompatible(), TDbiValidityRecBuilder::MakeGapRec(), TDbiDBProxy::QueryValidity(), and TDbiCache::Search().
00054 { return fDetector;}
DbiSimFlag::SimFlag_t TVldContext::GetSimFlag | ( | ) | const [inline] |
Definition at line 55 of file TVldContext.hxx.
References fSimFlag.
Referenced by AsString(), TDbiDBProxy::FindTimeBoundaries(), TDbiValidityRec::HasExpired(), TVldRange::IsCompatible(), TDbiValidityRecBuilder::MakeGapRec(), TDbiDBProxy::QueryValidity(), and TDbiCache::Search().
00055 { return fSimFlag;}
TVldTimeStamp TVldContext::GetTimeStamp | ( | ) | const [inline] |
Definition at line 56 of file TVldContext.hxx.
References fTimeStamp.
Referenced by TDbiDBProxy::FindTimeBoundaries(), TDbiValidityRec::HasExpired(), TVldRange::IsCompatible(), TDbiValidityRecBuilder::MakeGapRec(), TDbiDBProxy::QueryValidity(), and TDbiCache::Search().
00056 { return fTimeStamp;}
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 }
Bool_t TVldContext::IsValid | ( | ) | const [inline] |
Return opposite of IsNull().
Definition at line 62 of file TVldContext.hxx.
References IsNull().
00062 { return !IsNull(); }
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 }
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] |
DbiDetector::Detector_t TVldContext::fDetector [protected] |
Definition at line 79 of file TVldContext.hxx.
Referenced by GetDetector(), IsNull(), operator!=(), operator<(), and operator==().
DbiSimFlag::SimFlag_t TVldContext::fSimFlag [protected] |
Definition at line 80 of file TVldContext.hxx.
Referenced by GetSimFlag(), IsNull(), operator!=(), operator<(), operator==(), and TVldContext().
TVldTimeStamp TVldContext::fTimeStamp [protected] |
Definition at line 81 of file TVldContext.hxx.
Referenced by AsString(), GetTimeStamp(), operator!=(), operator<(), and operator==().