LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
readout Namespace Reference

Namespaces

 details
 

Classes

struct  ROPID
 Class identifying a set of planes sharing readout channels. More...
 
struct  TPCsetID
 Class identifying a set of TPC sharing readout channels. More...
 

Typedefs

typedef geo::CryostatID CryostatID
 

Functions

Readout ID comparison operators

The result of comparison with invalid IDs is undefined.

bool operator== (TPCsetID const &a, TPCsetID const &b)
 Comparison: the IDs point to the same TPC set (validity is ignored) More...
 
bool operator!= (TPCsetID const &a, TPCsetID const &b)
 Comparison: the IDs point to different TPC sets (validity is ignored) More...
 
bool operator< (TPCsetID const &a, TPCsetID const &b)
 Order TPCsetID in increasing Cryo, then TPC set. More...
 
bool operator== (ROPID const &a, ROPID const &b)
 Comparison: the IDs point to the same ROP (validity is ignored) More...
 
bool operator!= (ROPID const &a, ROPID const &b)
 Comparison: the IDs point to different ROPs (validity is ignored) More...
 
bool operator< (ROPID const &a, ROPID const &b)
 Order ROPID in increasing Cryo, then TPC set, then ROP. More...
 
std::ostream & operator<< (std::ostream &out, TPCsetID const &sid)
 Generic output of TPCsetID to stream. More...
 
std::ostream & operator<< (std::ostream &out, ROPID const &rid)
 Comparison: the IDs point to the same TPC set (validity is ignored) More...
 

Typedef Documentation

Definition at line 30 of file readout_types.h.

Function Documentation

bool readout::operator!= ( TPCsetID const &  a,
TPCsetID const &  b 
)
inline

Comparison: the IDs point to different TPC sets (validity is ignored)

Definition at line 175 of file readout_types.h.

References geo::CryostatID::asCryostatID(), and readout::TPCsetID::TPCset.

175  {
176  return (a.asCryostatID() != b.asCryostatID()) || (a.TPCset != b.TPCset);
177  } // operator!= (TPCsetID, TPCsetID)
bool readout::operator!= ( ROPID const &  a,
ROPID const &  b 
)
inline

Comparison: the IDs point to different ROPs (validity is ignored)

Definition at line 195 of file readout_types.h.

References readout::ROPID::asTPCsetID(), and readout::ROPID::ROP.

195  {
196  return (a.asTPCsetID() != b.asTPCsetID()) || (a.ROP != b.ROP);
197  } // operator!= (ROPID, ROPID)
bool readout::operator< ( TPCsetID const &  a,
TPCsetID const &  b 
)
inline

Order TPCsetID in increasing Cryo, then TPC set.

Definition at line 180 of file readout_types.h.

References geo::CryostatID::asCryostatID(), geo::CryostatID::cmp(), and readout::TPCsetID::TPCset.

180  {
181  int cmp_res = a.asCryostatID().cmp(b);
182  if (cmp_res == 0) // same cryostat: compare TPC set
183  return a.TPCset < b.TPCset;
184  else // return the order of cryostats
185  return cmp_res < 0;
186  } // operator< (TPCsetID, TPCsetID)
bool readout::operator< ( ROPID const &  a,
ROPID const &  b 
)
inline

Order ROPID in increasing Cryo, then TPC set, then ROP.

Definition at line 200 of file readout_types.h.

References readout::ROPID::asTPCsetID(), readout::TPCsetID::cmp(), and readout::ROPID::ROP.

200  {
201  int cmp_res = a.asTPCsetID().cmp(b);
202  if (cmp_res == 0) // same TPC set: compare ROP
203  return a.ROP < b.ROP;
204  else // return the order of TPC set
205  return cmp_res < 0;
206  } // operator< (ROPID, ROPID)
std::ostream& readout::operator<< ( std::ostream &  out,
TPCsetID const &  sid 
)
inline

Generic output of TPCsetID to stream.

Definition at line 214 of file readout_types.h.

References geo::CryostatID::asCryostatID(), and readout::TPCsetID::TPCset.

214  {
215  out << sid.asCryostatID() << " S:" << sid.TPCset;
216  return out;
217  } // operator<< (TPCsetID)
std::ostream& readout::operator<< ( std::ostream &  out,
ROPID const &  rid 
)
inline

Comparison: the IDs point to the same TPC set (validity is ignored)

Definition at line 219 of file readout_types.h.

References readout::ROPID::asTPCsetID(), and readout::ROPID::ROP.

219  {
220  out << rid.asTPCsetID() << " R:" << rid.ROP;
221  return out;
222  } // operator<< (ROPID)
bool readout::operator== ( TPCsetID const &  a,
TPCsetID const &  b 
)
inline

Comparison: the IDs point to the same TPC set (validity is ignored)

Definition at line 170 of file readout_types.h.

References geo::CryostatID::asCryostatID(), and readout::TPCsetID::TPCset.

170  {
171  return (a.asCryostatID() == b.asCryostatID()) && (a.TPCset == b.TPCset);
172  } // operator== (TPCsetID, TPCsetID)
bool readout::operator== ( ROPID const &  a,
ROPID const &  b 
)
inline

Comparison: the IDs point to the same ROP (validity is ignored)

Definition at line 190 of file readout_types.h.

References readout::ROPID::asTPCsetID(), and readout::ROPID::ROP.

190  {
191  return (a.asTPCsetID() == b.asTPCsetID()) && (a.ROP == b.ROP);
192  } // operator== (ROPID, ROPID)