Public Member Functions | Protected Attributes | List of all members
detvar::RandomTPC Class Reference

Public Member Functions

 RandomTPC (const geo::GeometryCore *geom)
 
geo::TPCID GetTPC () const
 
readout::TPCsetID GetTPCset () const
 

Protected Attributes

std::vector< geo::CryostatIDfCryos
 
std::map< geo::CryostatID, std::vector< geo::TPCID > > fTPCs
 
std::map< geo::CryostatID, std::vector< readout::TPCsetID > > fTPCsets
 

Detailed Description

Definition at line 72 of file RandomChannelStatusService_service.cc.

Constructor & Destructor Documentation

detvar::RandomTPC::RandomTPC ( const geo::GeometryCore geom)
inline

Definition at line 75 of file RandomChannelStatusService_service.cc.

76  : fCryos(VectorViaSet<geo::CryostatID>(geom->begin_cryostat_id(),
77  geom->end_cryostat_id()))
78  {
79  for(geo::CryostatID c: fCryos){
80  fTPCs[c] = VectorViaSet<geo::TPCID>(geom->begin_TPC_id(c),
81  geom->end_TPC_id(c));
82 
83  fTPCsets[c] = VectorViaSet<readout::TPCsetID>(geom->begin_TPCset_id(c),
84  geom->end_TPCset_id(c));
85  }
86  }
TPC_id_iterator begin_TPC_id() const
Returns an iterator pointing to the first TPC ID in the detector.
TPCset_id_iterator end_TPCset_id() const
Returns an iterator pointing after the last TPC set ID in the detector.
std::map< geo::CryostatID, std::vector< geo::TPCID > > fTPCs
TPCset_id_iterator begin_TPCset_id() const
Returns an iterator pointing to the first TPC set ID in the detector.
TPC_id_iterator end_TPC_id() const
Returns an iterator pointing after the last TPC ID in the detector.
std::vector< geo::CryostatID > fCryos
std::map< geo::CryostatID, std::vector< readout::TPCsetID > > fTPCsets
cryostat_id_iterator begin_cryostat_id() const
Returns an iterator pointing to the first cryostat ID.
The data type to uniquely identify a cryostat.
Definition: geo_types.h:190
cryostat_id_iterator end_cryostat_id() const
Returns an iterator pointing after the last cryostat ID.

Member Function Documentation

geo::TPCID detvar::RandomTPC::GetTPC ( ) const
inline

Definition at line 88 of file RandomChannelStatusService_service.cc.

89  {
90  const geo::CryostatID c = fCryos[gRandom->Integer(fCryos.size())];
91  const std::vector<geo::TPCID>& ts = fTPCs.find(c)->second;
92  return ts[gRandom->Integer(ts.size())];
93  }
std::map< geo::CryostatID, std::vector< geo::TPCID > > fTPCs
std::vector< geo::CryostatID > fCryos
The data type to uniquely identify a cryostat.
Definition: geo_types.h:190
readout::TPCsetID detvar::RandomTPC::GetTPCset ( ) const
inline

Definition at line 95 of file RandomChannelStatusService_service.cc.

96  {
97  const geo::CryostatID c = fCryos[gRandom->Integer(fCryos.size())];
98  const std::vector<readout::TPCsetID>& ts = fTPCsets.find(c)->second;
99  return ts[gRandom->Integer(ts.size())];
100  }
std::vector< geo::CryostatID > fCryos
std::map< geo::CryostatID, std::vector< readout::TPCsetID > > fTPCsets
The data type to uniquely identify a cryostat.
Definition: geo_types.h:190

Member Data Documentation

std::vector<geo::CryostatID> detvar::RandomTPC::fCryos
protected

Definition at line 103 of file RandomChannelStatusService_service.cc.

std::map<geo::CryostatID, std::vector<geo::TPCID> > detvar::RandomTPC::fTPCs
protected

Definition at line 104 of file RandomChannelStatusService_service.cc.

std::map<geo::CryostatID, std::vector<readout::TPCsetID> > detvar::RandomTPC::fTPCsets
protected

Definition at line 105 of file RandomChannelStatusService_service.cc.


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