| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Context.h File Reference

#include "TimeStamp.h"
#include "Conventions/SimFlag.h"
#include "Conventions/Site.h"
#include "Conventions/DetectorId.h"
#include "Conventions/Niche.h"
#include <iosfwd>
#include <string>

Include dependency graph for Context.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


Classes

class  Context
 A tag for identifying a unique context: a place, time, and optional detector. More...

Functions

std::ostream & operator<< (std::ostream &os, const Context &c)
bool operator== (const Context &lhs, const Context &rhs)
bool operator!= (const Context &lhs, const Context &rhs)
bool operator< (const Context &lhs, const Context &rhs)
bool operator> (const Context &lhs, const Context &rhs)
bool operator<= (const Context &lhs, const Context &rhs)
bool operator>= (const Context &lhs, const Context &rhs)

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Context c 
)

Definition at line 56 of file Context.cc.

00057 {
00058     os << c.AsString();
00059     return os;
00060 
00062     if (os.good()) {
00063         if (os.tie()) os.tie()->flush(); // instead of opfx
00064         os << c.AsString();
00065     }
00066     // instead of os.osfx()
00067     if (os.flags() & std::ios::unitbuf) os.flush();
00068     return os;
00069 }

bool operator== ( const Context lhs,
const Context rhs 
)

Definition at line 102 of file Context.cc.

00103 {
00104     if (lhs.GetTimeStamp()==rhs.GetTimeStamp()) 
00105         if (lhs.GetSimFlag() == rhs.GetSimFlag()) 
00106             if (lhs.GetSite() == rhs.GetSite() ) 
00107                 if (lhs.GetDetId() == rhs.GetDetId())
00108                     return true;
00109                  
00110     return false;
00111 }

bool operator!= ( const Context lhs,
const Context rhs 
)

Definition at line 113 of file Context.cc.

00114 {
00115     if (lhs.GetTimeStamp()!=rhs.GetTimeStamp()) return true;
00116     if (lhs.GetSimFlag() != rhs.GetSimFlag()) return true;
00117     if (lhs.GetSite() != rhs.GetSite() ) return true;
00118     if (lhs.GetDetId() != rhs.GetDetId()) return true;
00119     return false;
00120 }

bool operator< ( const Context lhs,
const Context rhs 
)

Definition at line 122 of file Context.cc.

00123 {
00124     // Honest, this makes sense...
00125     if (lhs.GetTimeStamp() < rhs.GetTimeStamp()) return true;
00126     if (lhs.GetTimeStamp() == rhs.GetTimeStamp()) {
00127         if (lhs.GetSite() < rhs.GetSite()) return true;
00128         if (lhs.GetSite() == rhs.GetSite()) {
00129             if (lhs.GetDetId() < rhs.GetDetId()) return true;
00130         }
00131     }
00132     return false;
00133 }

bool operator> ( const Context lhs,
const Context rhs 
)

Definition at line 135 of file Context.cc.

00136 {
00137     return !(lhs<rhs) && !(lhs==rhs);
00138 }

bool operator<= ( const Context lhs,
const Context rhs 
)

Definition at line 140 of file Context.cc.

00141 {
00142     return (lhs<rhs) || (lhs==rhs);
00143 }

bool operator>= ( const Context lhs,
const Context rhs 
)

Definition at line 145 of file Context.cc.

00146 {
00147     return !(lhs<rhs);
00148 }

| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:15:31 2011 for Context by doxygen 1.4.7