LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
readout::ROPID Struct Reference

Class identifying a set of planes sharing readout channels. More...

#include "readout_types.h"

Inheritance diagram for readout::ROPID:
readout::TPCsetID geo::CryostatID

Public Types

using ROPID_t = unsigned int
 Type for the ID number. More...
 
using ThisID_t = ROPID
 Type of this ID. More...
 
using ParentID_t = TPCsetID
 Type of the parent ID. More...
 
template<std::size_t L>
using ID_t = details::AbsIDtype< L, ThisID_t >
 Type of the ID with the specified level L. More...
 
template<std::size_t A>
using UpperID_t = details::RelIDtype< A, ThisID_t >
 Type of the ID A levels above this one. More...
 
using TPCsetID_t = unsigned short
 Type for the ID number. More...
 
using CryostatID_t = unsigned int
 Type for the ID number. More...
 

Public Member Functions

constexpr ROPID ()=default
 Default constructor: an invalid plane ID. More...
 
constexpr ROPID (TPCsetID const &tpcsetid, ROPID_t r)
 
constexpr ROPID (CryostatID_t c, TPCsetID_t s, ROPID_t r)
 
constexpr auto const & deepestIndex () const
 Returns the value of the deepest ID available (readout plane's). More...
 
auto & deepestIndex ()
 Returns the deepest ID available (readout plane's). More...
 
constexpr ParentID_t const & parentID () const
 Return the parent ID of this one (a TPC set ID). More...
 
ParentID_tparentID ()
 Return the parent ID of this one (a TPC set ID). More...
 
template<std::size_t Index = 0U>
constexpr auto getIndex () const
 Returns the index level Index of this type. More...
 
template<std::size_t Index = 0U>
auto & writeIndex ()
 Returns the index level Index of this type. More...
 
template<std::size_t Above>
constexpr auto getRelIndex () const
 Returns the index Above levels higher than Level. More...
 
constexpr ROPID const & asROPID () const
 Conversion to ROPID (for convenience of notation). More...
 
ROPIDasROPID ()
 Conversion to ROPID (for convenience of notation). More...
 
constexpr ROPID const & asConstROPID ()
 Conversion to ROPID (for convenience of notation). More...
 
constexpr int cmp (ROPID const &other) const
 Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger. More...
 
constexpr TPCsetID const & asTPCsetID () const
 Conversion to TPCsetID (for convenience of notation). More...
 
TPCsetIDasTPCsetID ()
 Conversion to TPCsetID (for convenience of notation). More...
 
constexpr TPCsetID const & asConstTPCsetID ()
 Conversion to TPCsetID (for convenience of notation). More...
 
constexpr int cmp (TPCsetID const &other) const
 Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger. More...
 
constexpr int cmp (CryostatID const &other) const
 Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger. More...
 
constexpr CryostatID const & asCryostatID () const
 Conversion to CryostatID (for convenience of notation). More...
 
CryostatIDasCryostatID ()
 Conversion to CryostatID (for convenience of notation). More...
 
constexpr CryostatID const & asConstCryostatID ()
 Conversion to CryostatID (for convenience of notation). More...
 
std::string toString () const
 Human-readable representation of the ROP ID. More...
 
 operator std::string () const
 Human-readable representation of the ROP ID. More...
 
ID validity
constexpr operator bool () const
 Returns true if the ID is valid. More...
 
constexpr bool operator! () const
 Returns true if the ID is not valid. More...
 
void setValidity (bool valid)
 Sets the validity of the ID. More...
 
void markValid ()
 Sets the ID as valid. More...
 
void markInvalid ()
 Sets the ID as invalid. More...
 

Static Public Member Functions

static constexpr ROPID_t getInvalidID ()
 Return the value of the invalid ROP ID as a r-value. More...
 
template<typename T >
static constexpr int ThreeWayComparison (T a, T b)
 Returns < 0 if a < b, 0 if a == b, > 0 if a > b. More...
 

Public Attributes

ROPID_t ROP = InvalidID
 Index of the readout plane within its TPC set. More...
 
TPCsetID_t TPCset = InvalidID
 Index of the TPC set within its cryostat. More...
 
bool isValid = false
 Whether this ID points to a valid element. More...
 
CryostatID_t Cryostat = InvalidID
 Index of cryostat. More...
 

Static Public Attributes

static constexpr ROPID_t InvalidID = std::numeric_limits<ROPID_t>::max()
 Special code for an invalid ID. More...
 
static constexpr auto Level = readout::ElementLevel::ReadoutPlane
 Level of this element. More...
 

Detailed Description

Class identifying a set of planes sharing readout channels.

This identifier provides the TPC set location and a number representing the set of planes. This set is defined by not sharing readout channels with any other plane outside the set.

The name stands for "readout plane".

Definition at line 164 of file readout_types.h.

Member Typedef Documentation

using geo::CryostatID::CryostatID_t = unsigned int
inherited

Type for the ID number.

Definition at line 193 of file geo_types.h.

template<std::size_t L>
using readout::ROPID::ID_t = details::AbsIDtype<L, ThisID_t>

Type of the ID with the specified level L.

Definition at line 172 of file readout_types.h.

Type of the parent ID.

Definition at line 168 of file readout_types.h.

using readout::ROPID::ROPID_t = unsigned int

Type for the ID number.

Definition at line 165 of file readout_types.h.

Type of this ID.

Definition at line 167 of file readout_types.h.

using readout::TPCsetID::TPCsetID_t = unsigned short
inherited

Type for the ID number.

Definition at line 73 of file readout_types.h.

template<std::size_t A>
using readout::ROPID::UpperID_t = details::RelIDtype<A, ThisID_t>

Type of the ID A levels above this one.

Definition at line 176 of file readout_types.h.

Constructor & Destructor Documentation

constexpr readout::ROPID::ROPID ( )
default

Default constructor: an invalid plane ID.

constexpr readout::ROPID::ROPID ( TPCsetID const &  tpcsetid,
ROPID_t  r 
)
inline

Constructor: readout plane with index r in the TPC set identified by tpcsetid.

Definition at line 188 of file readout_types.h.

188 : TPCsetID(tpcsetid), ROP(r) {}
TRandom r
Definition: spectrum.C:23
ROPID_t ROP
Index of the readout plane within its TPC set.
constexpr TPCsetID()=default
Default constructor: an invalid TPC set ID.
constexpr readout::ROPID::ROPID ( CryostatID_t  c,
TPCsetID_t  s,
ROPID_t  r 
)
inline

Constructor: readout plane with index r in the cryostat index c, TPC set index s.

Definition at line 192 of file readout_types.h.

References readout::details::writeToString().

192 : TPCsetID(c, s), ROP(r) {}
TRandom r
Definition: spectrum.C:23
ROPID_t ROP
Index of the readout plane within its TPC set.
constexpr TPCsetID()=default
Default constructor: an invalid TPC set ID.

Member Function Documentation

constexpr CryostatID const& geo::CryostatID::asConstCryostatID ( )
inlineinherited

Conversion to CryostatID (for convenience of notation).

Definition at line 279 of file geo_types.h.

279 { return *this; }
constexpr ROPID const& readout::ROPID::asConstROPID ( )
inline

Conversion to ROPID (for convenience of notation).

Definition at line 226 of file readout_types.h.

226 { return *this; }
constexpr TPCsetID const& readout::TPCsetID::asConstTPCsetID ( )
inlineinherited

Conversion to TPCsetID (for convenience of notation).

Definition at line 134 of file readout_types.h.

134 { return *this; }
constexpr CryostatID const& geo::CryostatID::asCryostatID ( ) const
inlineinherited

Conversion to CryostatID (for convenience of notation).

Definition at line 275 of file geo_types.h.

Referenced by readout::operator!=(), geo::operator!=(), readout::operator<(), geo::operator<(), readout::operator<<(), geo::operator<<(), readout::operator==(), and geo::operator==().

275 { return *this; }
CryostatID& geo::CryostatID::asCryostatID ( )
inlineinherited

Conversion to CryostatID (for convenience of notation).

Definition at line 277 of file geo_types.h.

277 { return *this; }
constexpr ROPID const& readout::ROPID::asROPID ( ) const
inline

Conversion to ROPID (for convenience of notation).

Definition at line 222 of file readout_types.h.

222 { return *this; }
ROPID& readout::ROPID::asROPID ( )
inline

Conversion to ROPID (for convenience of notation).

Definition at line 224 of file readout_types.h.

224 { return *this; }
constexpr TPCsetID const& readout::TPCsetID::asTPCsetID ( ) const
inlineinherited

Conversion to TPCsetID (for convenience of notation).

Definition at line 130 of file readout_types.h.

Referenced by readout::operator!=(), readout::operator<(), readout::operator<<(), readout::operator==(), and geo::ChannelMapStandardAlg::ROPtoTPCs().

130 { return *this; }
TPCsetID& readout::TPCsetID::asTPCsetID ( )
inlineinherited

Conversion to TPCsetID (for convenience of notation).

Definition at line 132 of file readout_types.h.

132 { return *this; }
constexpr int readout::TPCsetID::cmp ( TPCsetID const &  other) const
inlineinherited

Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger.

Definition at line 137 of file readout_types.h.

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

Referenced by cmp(), and readout::operator<().

138  {
139  int cmp_res = CryostatID::cmp(other);
140  if (cmp_res == 0) // same cryostat: compare TPC set
141  return ThreeWayComparison(TPCset, other.TPCset);
142  else // return the order of cryostats
143  return cmp_res;
144  } // cmp()
static constexpr int ThreeWayComparison(T a, T b)
Returns < 0 if a < b, 0 if a == b, > 0 if a > b.
Definition: geo_types.h:289
TPCsetID_t TPCset
Index of the TPC set within its cryostat.
Definition: readout_types.h:90
constexpr int cmp(CryostatID const &other) const
Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger.
Definition: geo_types.h:269
constexpr int readout::ROPID::cmp ( ROPID const &  other) const
inline

Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger.

Definition at line 229 of file readout_types.h.

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

230  {
231  int cmp_res = TPCsetID::cmp(other);
232  if (cmp_res == 0) // same TPC set: compare plane
233  return ThreeWayComparison(ROP, other.ROP);
234  else // return the order of TPC set
235  return cmp_res;
236  } // cmp()
constexpr int cmp(TPCsetID const &other) const
Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger.
static constexpr int ThreeWayComparison(T a, T b)
Returns < 0 if a < b, 0 if a == b, > 0 if a > b.
Definition: geo_types.h:289
ROPID_t ROP
Index of the readout plane within its TPC set.
constexpr int geo::CryostatID::cmp ( CryostatID const &  other) const
inlineinherited

Returns < 0 if this is smaller than other, 0 if equal, > 0 if larger.

Definition at line 269 of file geo_types.h.

References geo::CryostatID::deepestIndex().

Referenced by readout::TPCsetID::cmp(), geo::OpDetID::cmp(), geo::TPCID::cmp(), readout::operator<(), and geo::operator<().

270  {
271  return ThreeWayComparison(deepestIndex(), other.deepestIndex());
272  }
static constexpr int ThreeWayComparison(T a, T b)
Returns < 0 if a < b, 0 if a == b, > 0 if a > b.
Definition: geo_types.h:289
constexpr auto const & deepestIndex() const
Returns the value of the deepest ID available (cryostat&#39;s).
Definition: geo_types.h:251
constexpr auto const& readout::ROPID::deepestIndex ( ) const
inline

Returns the value of the deepest ID available (readout plane's).

Definition at line 204 of file readout_types.h.

204 { return ROP; }
ROPID_t ROP
Index of the readout plane within its TPC set.
auto& readout::ROPID::deepestIndex ( )
inline

Returns the deepest ID available (readout plane's).

Definition at line 206 of file readout_types.h.

206 { return ROP; }
ROPID_t ROP
Index of the readout plane within its TPC set.
template<std::size_t Index>
constexpr auto readout::ROPID::getIndex ( ) const

Returns the index level Index of this type.

Definition at line 344 of file readout_types.h.

345 {
346  static_assert(Index <= Level, "This ID type does not have the requested Index level.");
347  return details::getAbsIDindex<Index>(*this);
348 } // readout::ROPID::getIndex() const
static constexpr auto Level
Level of this element.
static constexpr ROPID_t readout::ROPID::getInvalidID ( )
inlinestatic

Return the value of the invalid ROP ID as a r-value.

Definition at line 242 of file readout_types.h.

References InvalidID.

242 { return ROPID::InvalidID; }
static constexpr ROPID_t InvalidID
Special code for an invalid ID.
template<std::size_t Above>
constexpr auto readout::ROPID::getRelIndex ( ) const

Returns the index Above levels higher than Level.

Definition at line 358 of file readout_types.h.

359 {
360  static_assert(Above <= Level, "This ID type does not have the requested Index level.");
361  return getIndex<Level - Above>();
362 } // readout::ROPID::getRelIndex()
constexpr auto getIndex() const
Returns the index level Index of this type.
static constexpr auto Level
Level of this element.
void geo::CryostatID::markInvalid ( )
inlineinherited

Sets the ID as invalid.

Definition at line 238 of file geo_types.h.

References geo::details::writeToString().

Referenced by geo::PlaneGeo::ClosestWireID(), geo::GeometryCore::FindTPCAtPosition(), geo::GeometryCore::GetEndPlaneID(), geo::GeometryCore::GetEndTPCID(), and geo::GeometryCore::GetEndWireID().

238 { setValidity(false); }
void setValidity(bool valid)
Sets the validity of the ID.
Definition: geo_types.h:232
void geo::CryostatID::markValid ( )
inlineinherited

Sets the ID as valid.

Definition at line 235 of file geo_types.h.

235 { setValidity(true); }
void setValidity(bool valid)
Sets the validity of the ID.
Definition: geo_types.h:232
constexpr geo::CryostatID::operator bool ( ) const
inlineexplicitinherited

Returns true if the ID is valid.

Definition at line 226 of file geo_types.h.

226 { return isValid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:210
readout::ROPID::operator std::string ( ) const
inlineexplicit

Human-readable representation of the ROP ID.

Definition at line 199 of file readout_types.h.

199 { return toString(); }
std::string toString() const
Human-readable representation of the ROP ID.
constexpr bool geo::CryostatID::operator! ( ) const
inlineinherited

Returns true if the ID is not valid.

Definition at line 229 of file geo_types.h.

229 { return !isValid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:210
constexpr ParentID_t const& readout::ROPID::parentID ( ) const
inline

Return the parent ID of this one (a TPC set ID).

Definition at line 208 of file readout_types.h.

208 { return *this; }
ParentID_t& readout::ROPID::parentID ( )
inline

Return the parent ID of this one (a TPC set ID).

Definition at line 210 of file readout_types.h.

210 { return *this; }
void geo::CryostatID::setValidity ( bool  valid)
inlineinherited

Sets the validity of the ID.

Definition at line 232 of file geo_types.h.

232 { isValid = valid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:210
template<typename T >
static constexpr int geo::CryostatID::ThreeWayComparison ( a,
b 
)
inlinestaticinherited

Returns < 0 if a < b, 0 if a == b, > 0 if a > b.

Definition at line 289 of file geo_types.h.

290  {
291  return (a == b) ? 0 : ((a < b) ? -1 : +1);
292  }
std::string readout::ROPID::toString ( ) const
inline

Human-readable representation of the ROP ID.

Definition at line 198 of file readout_types.h.

198 { return details::writeToString(*this); }
std::string writeToString(T const &value)
Definition: readout_types.h:22
template<std::size_t Index>
auto & readout::ROPID::writeIndex ( )

Returns the index level Index of this type.

Definition at line 351 of file readout_types.h.

352 {
353  static_assert(Index <= Level, "This ID type does not have the requested Index level.");
354  return details::getAbsIDindex<Index>(*this);
355 } // readout::ROPID::writeIndex()
static constexpr auto Level
Level of this element.

Member Data Documentation

CryostatID_t geo::CryostatID::Cryostat = InvalidID
inherited

Index of cryostat.

Definition at line 211 of file geo_types.h.

Referenced by detsim::WienerFilterAna::analyze(), trkf::SpacePointAna::analyze(), pma::ProjectionMatchingAlg::buildShowerSeg(), mvapid::MVAAlg::CalcSegmentdEdxDist(), tca::ChgFracBetween(), tca::ChgFracNearEnd(), lar_cluster3d::StandardHit3DBuilder::CollectArtHits(), lar_cluster3d::SnippetHit3DBuilder::CollectArtHits(), trkf::SpacePointAlg::compatible(), tca::CompleteIncomplete3DVerticesInGaps(), ems::MultiEMShowers::convCluster(), geo::ChannelMapStandardAlg::ConvertROPtoWirePlane(), detinfo::DetectorPropertiesData::ConvertTicksToX(), geo::ChannelMapStandardAlg::ConvertTPCsetToTPC(), geo::ChannelMapStandardAlg::ConvertTPCtoTPCset(), geo::ChannelMapStandardAlg::ConvertWirePlaneToROP(), detinfo::DetectorPropertiesData::ConvertXToTicks(), geo::GeometryCore::Cryostat(), geo::GeometryCore::CryostatPtr(), cluster::ClusterCrawlerAlg::EncodeCTP(), tca::EncodeCTP(), ems::EndPoint::EndPoint(), trkf::SpacePointAlg::fillComplexSpacePoint(), tca::FillmAllTraj(), lar_pandora::PFParticleHitDumper::FillRecoWires(), trkf::SpacePointAlg::fillSpacePoint(), tca::FillWireHitRange(), tca::FillWireIntersections(), tca::Find3DVertices(), apa::DisambigAlg::FindChanTimeEndPts(), hit::HitCheater::FindHitsOnChannel(), larg4::LArVoxelReadoutGeometry::FindNestedVolume(), tca::FindParent(), tca::FindShowers3D(), geo::GeometryCore::FindTPCAtPosition(), tca::FitTP3Ds(), ems::EMShower3D::GetCloseHits(), geo::GeometryCore::GetClosestOpDet(), geo::GeometryCore::GetEndTPCID(), geo::GeometryCore::GetEndTPCsetID(), nnet::TrainingDataAlg::getProjection(), pma::Track3D::GetUnconstrainedProj3D(), detinfo::DetectorPropertiesData::GetXTicksOffset(), cluster::MergeClusterAlg::GlobalWire(), cluster::BlurredClusteringAlg::GlobalWire(), shower::EMShowerAlg::GlobalWire_(), geo::GeometryCore::HasCryostat(), tss::Hit2D::Hit2D(), ems::Hit2D::Hit2D(), pma::Hit3D::Hit3D(), lar_cluster3d::SpacePointHit3DBuilder::Hit3DBuilder(), hit::DisambigCheater::InitHitToWids(), trkf::KHitWireLine::KHitWireLine(), trkf::KHitWireX::KHitWireX(), lar_cluster3d::StandardHit3DBuilder::makeDeadChannelPair(), lar_cluster3d::SnippetHit3DBuilder::makeDeadChannelPair(), lar_cluster3d::StandardHit3DBuilder::makeHitPair(), lar_cluster3d::SnippetHit3DBuilder::makeHitPair(), lar_cluster3d::StandardHit3DBuilder::makeHitTriplet(), lar_cluster3d::SnippetHit3DBuilder::makeHitTriplet(), tca::MakePFPTjs(), trkf::SpacePointAlg::makeSpacePoints(), trkf::CosmicTrackerAlg::MakeSPT(), tca::Match2Planes(), evd::SimulationDrawer::MCTruthOrtho(), geo::ChannelMapStandardAlg::NTPCsets(), geo::operator!=(), geo::operator<(), anab::operator<<(), recob::operator<<(), geo::operator<<(), geo::operator==(), lar_cluster3d::PrincipalComponentsAlg::PCAAnalysis_2D(), tca::Print3S(), tca::Print3V(), tca::PrintAllTraj(), tca::PrintTP3Ds(), cluster::LineCluster::produce(), cluster::TrajCluster::produce(), hit::DPRawHitFinder::produce(), calo::Calorimetry::produce(), detsim::SimDriftElectrons::produce(), calo::GnocchiCalorimetry::produce(), trkf::SpacePointAlg::separation(), tca::SignalAtTp(), cheat::BackTracker::SpacePointHitsToWeightedXYZ(), apa::DisambigAlg::TrivialDisambig(), tca::ValidTwoPlaneMatch(), trkf::VertexFitAlg::VertexFit(), cluster::ClusterCrawlerAlg::Vtx3ClusterMatch(), cluster::ClusterCrawlerAlg::Vtx3ClusterSplit(), cluster::ClusterCrawlerAlg::VtxMatch(), tca::WireHitRangeOK(), and lar_cluster3d::SnippetHit3DBuilder::WireIDsIntersect().

constexpr ROPID_t readout::ROPID::InvalidID = std::numeric_limits<ROPID_t>::max()
static

Special code for an invalid ID.

Definition at line 179 of file readout_types.h.

Referenced by getInvalidID().

constexpr auto readout::ROPID::Level = readout::ElementLevel::ReadoutPlane
static

Level of this element.

Definition at line 239 of file readout_types.h.


The documentation for this struct was generated from the following file: