LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
geo::CryostatID Struct Reference

The data type to uniquely identify a cryostat. More...

#include "geo_types.h"

Inheritance diagram for geo::CryostatID:
geo::OpDetID geo::TPCID readout::TPCsetID geo::PlaneID readout::ROPID geo::WireID

Public Types

using CryostatID_t = unsigned int
 Type for the ID number. More...
 

Public Member Functions

constexpr CryostatID ()=default
 Default constructor: an invalid cryostat. More...
 
constexpr CryostatID (CryostatID_t c)
 Constructor: valid ID of cryostat with index c. More...
 
constexpr CryostatID (CryostatID_t c, bool valid)
 Constructor: valid ID of cryostat with index c. More...
 
constexpr auto const & deepestIndex () const
 Returns the value of the deepest ID available (cryostat's). More...
 
auto & deepestIndex ()
 Returns the deepest ID available (cryostat's). More...
 
template<std::size_t Index>
constexpr auto getIndex () const
 Returns the index level Index of this type. More...
 
ID validity
constexpr operator bool () const
 Returns true if the ID is 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...
 
std::string toString () const
 Human-readable representation of the cryostat ID. More...
 
 operator std::string () const
 Human-readable representation of the cryostat ID. More...
 

Static Public Member Functions

static constexpr auto first ()
 
static constexpr CryostatID_t getInvalidID ()
 Return the value of the invalid ID as a r-value. More...
 

Public Attributes

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 CryostatID_t InvalidID = std::numeric_limits<CryostatID_t>::max()
 Special code for an invalid ID. More...
 
static constexpr auto Level = details::index_for<CryostatID>()
 Level of this element. More...
 

Detailed Description

The data type to uniquely identify a cryostat.

Definition at line 187 of file geo_types.h.

Member Typedef Documentation

using geo::CryostatID::CryostatID_t = unsigned int

Type for the ID number.

Definition at line 188 of file geo_types.h.

Constructor & Destructor Documentation

constexpr geo::CryostatID::CryostatID ( )
default

Default constructor: an invalid cryostat.

constexpr geo::CryostatID::CryostatID ( CryostatID_t  c)
inlineexplicit

Constructor: valid ID of cryostat with index c.

Definition at line 201 of file geo_types.h.

201 : isValid(true), Cryostat(c) {}
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:194
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:195
constexpr geo::CryostatID::CryostatID ( CryostatID_t  c,
bool  valid 
)
inline

Constructor: valid ID of cryostat with index c.

Definition at line 204 of file geo_types.h.

204 : isValid(valid), Cryostat(c) {}
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:194
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:195

Member Function Documentation

constexpr auto const& geo::CryostatID::deepestIndex ( ) const
inline

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

Definition at line 233 of file geo_types.h.

233 { return Cryostat; }
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:195
auto& geo::CryostatID::deepestIndex ( )
inline

Returns the deepest ID available (cryostat's).

Definition at line 235 of file geo_types.h.

235 { return Cryostat; }
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:195
static constexpr auto geo::CryostatID::first ( )
inlinestatic

Definition at line 206 of file geo_types.h.

Referenced by readout::TPCsetID::first(), geo::OpDetID::first(), and geo::TPCID::first().

206 { return CryostatID{0, true}; }
constexpr CryostatID()=default
Default constructor: an invalid cryostat.
template<std::size_t Index>
constexpr auto geo::CryostatID::getIndex ( ) const

Returns the index level Index of this type.

Definition at line 642 of file geo_types.h.

643 {
644  static_assert(Index <= Level, "This ID type does not have the requested Index level.");
645  return details::getAbsIDindex<Index>(*this);
646 }
static constexpr auto Level
Level of this element.
Definition: geo_types.h:241
static constexpr CryostatID_t geo::CryostatID::getInvalidID ( )
inlinestatic

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

Definition at line 244 of file geo_types.h.

References InvalidID.

Referenced by detsim::SimDriftElectrons::produce().

244 { return CryostatID::InvalidID; }
static constexpr CryostatID_t InvalidID
Special code for an invalid ID.
Definition: geo_types.h:192
void geo::CryostatID::markInvalid ( )
inline

Sets the ID as invalid.

Definition at line 220 of file geo_types.h.

References geo::details::writeToString().

220 { setValidity(false); }
void setValidity(bool valid)
Sets the validity of the ID.
Definition: geo_types.h:214
void geo::CryostatID::markValid ( )
inline

Sets the ID as valid.

Definition at line 217 of file geo_types.h.

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

Returns true if the ID is valid.

Definition at line 211 of file geo_types.h.

211 { return isValid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:194
geo::CryostatID::operator std::string ( ) const
inlineexplicit

Human-readable representation of the cryostat ID.

Definition at line 228 of file geo_types.h.

228 { return toString(); }
std::string toString() const
Human-readable representation of the cryostat ID.
Definition: geo_types.h:227
void geo::CryostatID::setValidity ( bool  valid)
inline

Sets the validity of the ID.

Definition at line 214 of file geo_types.h.

214 { isValid = valid; }
bool isValid
Whether this ID points to a valid element.
Definition: geo_types.h:194
std::string geo::CryostatID::toString ( ) const
inline

Human-readable representation of the cryostat ID.

Definition at line 227 of file geo_types.h.

227 { return details::writeToString(*this); }
std::string writeToString(T const &value)
Write the argument into a string.
Definition: geo_types.h:627

Member Data Documentation

CryostatID_t geo::CryostatID::Cryostat = InvalidID

Index of cryostat.

Definition at line 195 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(), detinfo::DetectorPropertiesData::ConvertTicksToX(), 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::FitTP3Ds(), ems::EMShower3D::GetCloseHits(), geo::GeometryCore::GetClosestOpDet(), calo::GnocchiCalorimetry::GetPitch(), pma::Track3D::GetUnconstrainedProj3D(), detinfo::DetectorPropertiesData::GetXTicksOffset(), cluster::MergeClusterAlg::GlobalWire(), cluster::BlurredClusteringAlg::GlobalWire(), shower::EMShowerAlg::GlobalWire_(), geo::GeometryCore::HasCryostat(), tss::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(), apa::APAGeometryAlg::NearestWireIDOnChan(), geo::WireReadoutStandardGeom::NTPCsets(), 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(), detsim::SimDriftElectrons::produce(), calo::Calorimetry::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 CryostatID_t geo::CryostatID::InvalidID = std::numeric_limits<CryostatID_t>::max()
static

Special code for an invalid ID.

Definition at line 192 of file geo_types.h.

Referenced by getInvalidID().

constexpr auto geo::CryostatID::Level = details::index_for<CryostatID>()
static

Level of this element.

Definition at line 241 of file geo_types.h.


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