Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DbiSqlContext Class Reference

#include <DbiSqlContext.h>

Inheritance diagram for DbiSqlContext:

DbiString List of all members.

Public Types

enum  IntervalType {
  kBefore, kAfter, kMisses, kThroughout,
  kWithin, kOverlaps, kStarts, kEnds,
  kUndefined
}

Public Member Functions

 DbiSqlContext (const std::string &ctxt="")
 DbiSqlContext (IntervalType interval, VldTimeStamp start, VldTimeStamp end, Detector::Detector_t det, SimFlag::SimFlag_t sim)
virtual ~DbiSqlContext ()
VldTimeStamp GetTimeStart () const
VldTimeStamp GetTimeEnd () const
Detector::Detector_t GetDetector () const
SimFlag::SimFlag_t GetSimFlag () const

Private Attributes

IntervalType fIntervalType
VldTimeStamp fTimeStart
VldTimeStamp fTimeEnd
Detector::Detector_t fDetType
SimFlag::SimFlag_t fSimType

Member Enumeration Documentation

enum DbiSqlContext::IntervalType
 

Enumeration values:
kBefore 
kAfter 
kMisses 
kThroughout 
kWithin 
kOverlaps 
kStarts 
kEnds 
kUndefined 

Definition at line 33 of file DbiSqlContext.h.

00033                      { kBefore,      kAfter,    kMisses,
00034                        kThroughout,  kWithin,   kOverlaps,
00035                        kStarts,      kEnds,
00036                        kUndefined };


Constructor & Destructor Documentation

DbiSqlContext::DbiSqlContext const std::string &  ctxt = ""  ) 
 

Definition at line 20 of file DbiSqlContext.cxx.

References LEA_CTOR, and MSG.

00020                                                   :
00021 DbiString(ctxt),
00022 fIntervalType(kUndefined),
00023 fDetType(Detector::kUnknown),
00024 fSimType(SimFlag::kUnknown)
00025 {
00026 //
00027 //  Purpose:  Default constructor
00028 //
00029 //  Contact:   N. West
00030 //
00031 
00032   LEA_CTOR    //Leak Checker
00033 
00034   MSG("Dbi", Msg::kVerbose) << "Creating DbiSqlContext" << endl;
00035 
00036 }
//.....................................................................

DbiSqlContext::DbiSqlContext IntervalType  interval,
VldTimeStamp  start,
VldTimeStamp  end,
Detector::Detector_t  det,
SimFlag::SimFlag_t  sim
 

Definition at line 39 of file DbiSqlContext.cxx.

References VldTimeStamp::AsString(), det, kAfter, kBefore, kEnds, kMisses, kOverlaps, kStarts, kThroughout, kWithin, LEA_CTOR, and MSG.

00043                                                    :
00044 fIntervalType(interval),
00045 fTimeStart(start),
00046 fTimeEnd(end),
00047 fDetType(det),
00048 fSimType(sim)
00049 {
00050 //
00051 //  Purpose:  Main constructor
00052 //
00053 //  Contact:   N. West
00054 //
00055 
00056   LEA_CTOR    //Leak Checker
00057 
00058   MSG("Dbi", Msg::kVerbose) << "Creating DbiSqlContext" << endl;
00059 
00060   switch (interval) {
00061 
00062   case kBefore:
00063     (*this) <<     "TIMEEND <= \'"   << start.AsString("s") << '\'';
00064     break;
00065 
00066   case kAfter:
00067     (*this) <<     "TIMESTART >= \'" << end.AsString("s")   << '\'';
00068     break;
00069 
00070   case kMisses:
00071     (*this) <<     "TIMESTART >= \'" << end.AsString("s")   << '\''
00072             << " or TIMEEND <= \'"   << start.AsString("s") << '\'';
00073     break;
00074 
00075   case kThroughout:
00076     (*this) <<     "TIMESTART <= \'" << start.AsString("s") << '\''
00077             << " and TIMEEND >= \'"  << end.AsString("s")   << '\'';
00078     break;
00079 
00080   case kWithin:
00081     (*this) <<     "TIMESTART >= \'" << start.AsString("s") << '\''
00082             << " and TIMEEND <= \'"  << end.AsString("s")   << '\'';
00083     break;
00084 
00085   case kOverlaps:
00086     (*this) <<     "TIMESTART < \'"  << end.AsString("s")   << '\''
00087             << " and TIMEEND > \'"   << start.AsString("s") << '\'';
00088     break;
00089 
00090   case kStarts:
00091     (*this) <<     "TIMESTART >= \'" << start.AsString("s") << '\''
00092             << " and TIMESTART < \'" << end.AsString("s")   << '\'';
00093     break;
00094 
00095   case kEnds:
00096     (*this) <<     "TIMEEND > \'"    << start.AsString("s") << '\''
00097             << " and TIMEEND <=  \'" << end.AsString("s")   << '\'';
00098     break;
00099 
00100   default:
00101     (*this) << " 1 = 0 "; //An impossible condition (hopefully)
00102   }
00103 
00104   (*this) << " and DetectorMask & " << static_cast<unsigned int>(fDetType) 
00105           << " and SimMask & "      << static_cast<unsigned int>(fSimType);
00106 }

DbiSqlContext::~DbiSqlContext  )  [virtual]
 

Definition at line 111 of file DbiSqlContext.cxx.

References LEA_DTOR, and MSG.

00111                               {
00112 //
00113 //
00114 //  Purpose: Destructor
00115 //
00116 //  Contact:   N. West
00117 //
00118 
00119   LEA_DTOR    //Leak Checker
00120 
00121   MSG("Dbi", Msg::kVerbose) << "Destroying DbiSqlContext" << endl;
00122 
00123 }


Member Function Documentation

Detector::Detector_t DbiSqlContext::GetDetector  )  const [inline]
 

Definition at line 52 of file DbiSqlContext.h.

Referenced by DbuDaqFileModule::MyOwn_BeginRun(), and DbiResultPtr< T >::NewQuery().

00052 { return fDetType; }

SimFlag::SimFlag_t DbiSqlContext::GetSimFlag  )  const [inline]
 

Definition at line 53 of file DbiSqlContext.h.

Referenced by DbuDaqFileModule::MyOwn_BeginRun(), and DbiResultPtr< T >::NewQuery().

00053 { return fSimType; }

VldTimeStamp DbiSqlContext::GetTimeEnd  )  const [inline]
 

Definition at line 51 of file DbiSqlContext.h.

Referenced by DbuDaqFileModule::MyOwn_BeginRun().

00051 { return fTimeEnd; }

VldTimeStamp DbiSqlContext::GetTimeStart  )  const [inline]
 

Definition at line 50 of file DbiSqlContext.h.

Referenced by DbuDaqFileModule::MyOwn_BeginRun().

00050 { return fTimeStart; }


Member Data Documentation

Detector::Detector_t DbiSqlContext::fDetType [private]
 

Definition at line 65 of file DbiSqlContext.h.

IntervalType DbiSqlContext::fIntervalType [private]
 

Definition at line 62 of file DbiSqlContext.h.

SimFlag::SimFlag_t DbiSqlContext::fSimType [private]
 

Definition at line 66 of file DbiSqlContext.h.

VldTimeStamp DbiSqlContext::fTimeEnd [private]
 

Definition at line 64 of file DbiSqlContext.h.

VldTimeStamp DbiSqlContext::fTimeStart [private]
 

Definition at line 63 of file DbiSqlContext.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:09:04 2010 for loon by  doxygen 1.3.9.1