LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
cluster::ClusterCrawler Class Reference
Inheritance diagram for cluster::ClusterCrawler:
art::EDProducer art::ProducerBase art::Consumer art::EngineCreator art::ProductRegistryHelper

Public Types

using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = ProducerBase::Table< UserConfig, KeysToIgnore >
 

Public Member Functions

 ClusterCrawler (fhicl::ParameterSet const &pset)
 
virtual ~ClusterCrawler ()
 
void reconfigure (fhicl::ParameterSet const &pset)
 
void produce (art::Event &evt) override
 
void beginJob () override
 
template<typename PROD , BranchType B = InEvent>
ProductID getProductID (std::string const &instanceName={}) const
 
template<typename PROD , BranchType B>
ProductID getProductID (ModuleDescription const &moduleDescription, std::string const &instanceName) const
 
bool modifiesEvent () const
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > consumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > consumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< T > mayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< T > mayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Attributes

hit::CCHitFinderAlg fCCHFAlg
 
ClusterCrawlerAlg fCCAlg
 
std::string fCalDataModuleLabel
 label of module producing input wires More...
 

Detailed Description

Definition at line 53 of file ClusterCrawler_module.cc.

Member Typedef Documentation

using art::EDProducer::ModuleType = EDProducer
inherited

Definition at line 34 of file EDProducer.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::EDProducer::Table = ProducerBase::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 43 of file EDProducer.h.

using art::EDProducer::WorkerType = WorkerT<EDProducer>
inherited

Definition at line 35 of file EDProducer.h.

Constructor & Destructor Documentation

cluster::ClusterCrawler::ClusterCrawler ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 72 of file ClusterCrawler_module.cc.

References recob::HitAndAssociationsWriterBase::declare_products(), and reconfigure().

72  :
73  fCCHFAlg (pset.get<fhicl::ParameterSet>("CCHitFinderAlg")),
74  fCCAlg (pset.get<fhicl::ParameterSet>("ClusterCrawlerAlg")),
75  fCalDataModuleLabel(pset.get<std::string>("CalDataModuleLabel"))
76  {
77  mf::LogWarning("ClusterCrawler") <<
78  "\nClusterCrawler module has been deprecated and will be removed."
79  "\nIt is now replaced by HitFinder and LineCluster modules."
80  ;
81 
82  this->reconfigure(pset);
83 
84  // let HitCollectionAssociator declare that we are going to produce
85  // hits and associations with wires and raw digits
86  // (with no particular product label)
88 
89  produces< std::vector<recob::Cluster> >();
90  produces< std::vector<recob::Vertex> >();
91  produces< art::Assns<recob::Cluster, recob::Hit> >();
92  produces< art::Assns<recob::Cluster, recob::Vertex, unsigned short> >();
93  }
hit::CCHitFinderAlg fCCHFAlg
static void declare_products(ModuleType &producer, std::string instance_name="", bool doWireAssns=true, bool doRawDigitAssns=true)
Declares the hit products we are going to fill.
Definition: HitCreator.h:1117
std::string fCalDataModuleLabel
label of module producing input wires
void reconfigure(fhicl::ParameterSet const &pset)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
cluster::ClusterCrawler::~ClusterCrawler ( )
virtual

Definition at line 95 of file ClusterCrawler_module.cc.

96  {
97  }

Member Function Documentation

void cluster::ClusterCrawler::beginJob ( )
overridevirtual

Reimplemented from art::EDProducer.

Definition at line 105 of file ClusterCrawler_module.cc.

105  {
106  }
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 147 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

148 {
149  if (!moduleContext_)
150  return ProductToken<T>::invalid();
151 
152  consumables_[BT].emplace_back(ConsumableType::Product,
153  TypeID{typeid(T)},
154  it.label(),
155  it.instance(),
156  it.process());
157  return ProductToken<T>{it};
158 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 162 of file Consumer.h.

163 {
164  if (!moduleContext_)
165  return;
166 
167  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
168 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 172 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

173 {
174  if (!moduleContext_)
175  return ViewToken<T>::invalid();
176 
177  consumables_[BT].emplace_back(ConsumableType::ViewElement,
178  TypeID{typeid(T)},
179  it.label(),
180  it.instance(),
181  it.process());
182  return ViewToken<T>{it};
183 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited

Definition at line 32 of file EngineCreator.cc.

References art::EngineCreator::rng().

34 {
35  return rng()->createEngine(
36  placeholder_schedule_id(), seed, kind_of_engine_to_make);
37 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited

Definition at line 40 of file EngineCreator.cc.

References art::EngineCreator::rng().

43 {
44  return rng()->createEngine(
45  placeholder_schedule_id(), seed, kind_of_engine_to_make, engine_label);
46 }
long seed
Definition: chem4.cc:68
static art::ServiceHandle< art::RandomNumberGenerator > & rng()
CurrentProcessingContext const * art::EDProducer::currentContext ( ) const
protectedinherited

Definition at line 120 of file EDProducer.cc.

References art::EDProducer::current_context_.

121  {
122  return current_context_.get();
123  }
CPC_exempt_ptr current_context_
Definition: EDProducer.h:116
EngineCreator::seed_t EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited

Definition at line 49 of file EngineCreator.cc.

References fhicl::ParameterSet::get().

Referenced by art::MixFilter< T >::initEngine_().

52 {
53  auto const& explicit_seeds = pset.get<std::vector<int>>(key, {});
54  return explicit_seeds.empty() ? implicit_seed : explicit_seeds.front();
55 }
template<typename PROD , BranchType B>
ProductID art::EDProducer::getProductID ( std::string const &  instanceName = {}) const
inlineinherited

Definition at line 123 of file EDProducer.h.

References art::EDProducer::moduleDescription_.

124  {
125  return ProducerBase::getProductID<PROD, B>(moduleDescription_,
126  instanceName);
127  }
ModuleDescription moduleDescription_
Definition: EDProducer.h:115
template<typename PROD , BranchType B>
ProductID art::ProducerBase::getProductID ( ModuleDescription const &  moduleDescription,
std::string const &  instanceName 
) const
inherited

Definition at line 56 of file ProducerBase.h.

References B, and art::ModuleDescription::moduleLabel().

Referenced by art::ProducerBase::modifiesEvent().

58  {
59  auto const& pd =
60  get_ProductDescription<PROD>(B, md.moduleLabel(), instanceName);
61  return pd.productID();
62  }
Int_t B
Definition: plot.C:25
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 190 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

191 {
192  if (!moduleContext_)
193  return ProductToken<T>::invalid();
194 
195  consumables_[BT].emplace_back(ConsumableType::Product,
196  TypeID{typeid(T)},
197  it.label(),
198  it.instance(),
199  it.process());
200  return ProductToken<T>{it};
201 }
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 205 of file Consumer.h.

206 {
207  if (!moduleContext_)
208  return;
209 
210  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
211 }
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 215 of file Consumer.h.

References art::InputTag::instance(), art::InputTag::label(), and art::InputTag::process().

216 {
217  if (!moduleContext_)
218  return ViewToken<T>::invalid();
219 
220  consumables_[BT].emplace_back(ConsumableType::ViewElement,
221  TypeID{typeid(T)},
222  it.label(),
223  it.instance(),
224  it.process());
225  return ViewToken<T>{it};
226 }
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
bool art::ProducerBase::modifiesEvent ( ) const
inlineinherited

Definition at line 40 of file ProducerBase.h.

References art::ProducerBase::getProductID().

41  {
42  return true;
43  }
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited

Definition at line 89 of file Consumer.cc.

References fhicl::ParameterSet::get_if_present().

Referenced by art::EDProducer::doBeginJob(), art::EDFilter::doBeginJob(), and art::EDAnalyzer::doBeginJob().

90 {
91  if (!moduleContext_)
92  return;
93 
94  pset.get_if_present("errorOnMissingConsumes", requireConsumes_);
95  for (auto& consumablesPerBranch : consumables_) {
96  cet::sort_all(consumablesPerBranch);
97  }
98 }
bool requireConsumes_
Definition: Consumer.h:137
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
void cluster::ClusterCrawler::produce ( art::Event evt)
overridevirtual

Implements art::EDProducer.

Definition at line 108 of file ClusterCrawler_module.cc.

References cluster::ClusterCrawlerAlg::ClusterStore::BeginAng, cluster::ClusterCrawlerAlg::ClusterStore::BeginChg, cluster::ClusterCrawlerAlg::ClusterStore::BeginTim, cluster::ClusterCrawlerAlg::ClusterStore::BeginVtx, cluster::ClusterCrawlerAlg::ClusterStore::BeginWir, cluster::ClusterCrawlerAlg::ClearResults(), util::CreateAssn(), util::CreateAssnD(), cluster::ClusterCrawlerAlg::ClusterStore::CTP, cluster::ClusterCrawlerAlg::DecodeCTP(), DEFINE_ART_MODULE, evd::details::end(), cluster::ClusterCrawlerAlg::ClusterStore::EndAng, cluster::ClusterCrawlerAlg::ClusterStore::EndChg, cluster::ClusterCrawlerAlg::ClusterStore::EndTim, cluster::ClusterCrawlerAlg::ClusterStore::EndVtx, cluster::ClusterCrawlerAlg::ClusterStore::EndWir, fCalDataModuleLabel, fCCAlg, fCCHFAlg, cluster::ClusterCrawlerAlg::GetClusters(), cluster::ClusterCrawlerAlg::GetinClus(), art::DataViewImpl::getValidHandle(), cluster::ClusterCrawlerAlg::GetVertices(), cluster::ClusterCrawlerAlg::ClusterStore::ID, recob::Hit::Integral(), geo::PlaneID::Plane, art::errors::ProductRegistrationFailure, art::Event::put(), recob::HitCollectionAssociator::put_into(), hit::CCHitFinderAlg::RunCCHitFinder(), cluster::ClusterCrawlerAlg::RunCrawler(), recob::Cluster::Sentry, recob::Hit::SummedADC(), cluster::ClusterCrawlerAlg::ClusterStore::tclhits, recob::HitCollectionAssociator::use_hits(), recob::Hit::WireID(), hit::CCHitFinderAlg::YieldHits(), and cluster::ClusterCrawlerAlg::YieldHits().

109  {
110  // fetch the wires needed by CCHitFinder
111 
112  // make this accessible to ClusterCrawler_module
114  = evt.getValidHandle<std::vector<recob::Wire>>(fCalDataModuleLabel);
115 
116  // find hits in all planes
117  fCCHFAlg.RunCCHitFinder(*wireVecHandle);
118 
119  // extract the result of the algorithm (it's moved)
120  std::vector<recob::Hit> FirstHits = fCCHFAlg.YieldHits();
121 
122  // look for clusters in all planes
123  fCCAlg.RunCrawler(FirstHits);
124 
125  std::unique_ptr<std::vector<recob::Hit>> FinalHits
126  (new std::vector<recob::Hit>(std::move(fCCAlg.YieldHits())));
127 
129 
130  // shcol contains the hit collection
131  // and its associations to wires and raw digits;
132  // we get the association to raw digits through wire associations
133  recob::HitCollectionAssociator shcol(*this, evt, fCalDataModuleLabel, true);
134  std::vector<recob::Cluster> sccol;
135  std::vector<recob::Vertex> sv3col;
136 
137  std::unique_ptr<art::Assns<recob::Cluster, recob::Hit> >
139  std::unique_ptr<art::Assns<recob::Cluster, recob::Vertex, unsigned short>>
141 
142 
143  std::vector<ClusterCrawlerAlg::ClusterStore> const& tcl = fCCAlg.GetClusters();
144 
145  std::vector<short> const& inClus = fCCAlg.GetinClus();
146 
147  // Consistency check
148  for(unsigned int icl = 0; icl < tcl.size(); ++icl) {
149  ClusterCrawlerAlg::ClusterStore const& clstr = tcl[icl];
150  if(clstr.ID < 0) continue;
151  geo::PlaneID planeID = ClusterCrawlerAlg::DecodeCTP(clstr.CTP);
152  unsigned short plane = planeID.Plane;
153  for(unsigned short ii = 0; ii < clstr.tclhits.size(); ++ii) {
154  unsigned int iht = clstr.tclhits[ii];
155  recob::Hit const& theHit = FinalHits->at(iht);
156  if(theHit.WireID().Plane != plane) {
157  std::cout<<"CC: cluster-hit plane mis-match "<<theHit.WireID().Plane<<" "<<plane
158  <<" in cluster "<<clstr.ID<<" WT "<<clstr.BeginWir<<":"<<(int)clstr.BeginTim<<"\n";
159  return;
160  }
161  if(inClus[iht] != clstr.ID) {
162  std::cout << "CC: InClus mis-match " << inClus[iht]
163  << " ID " << clstr.ID << " in cluster " << icl << "\n";
164  return;
165  }
166  } // ii
167  } // icl
168 
169  // make 3D vertices
170  std::vector<ClusterCrawlerAlg::Vtx3Store> const& Vertices
171  = fCCAlg.GetVertices();
172 
173  double xyz[3] = {0, 0, 0};
174  unsigned int vtxID = 0, end;
175  for(ClusterCrawlerAlg::Vtx3Store const& vtx3: Vertices) {
176  // ignore incomplete vertices
177  if(vtx3.Ptr2D[0] < 0) continue;
178  if(vtx3.Ptr2D[1] < 0) continue;
179  if(vtx3.Ptr2D[2] < 0) continue;
180  ++vtxID;
181  xyz[0] = vtx3.X;
182  xyz[1] = vtx3.Y;
183  xyz[2] = vtx3.Z;
184  sv3col.emplace_back(xyz, vtxID);
185  } // 3D vertices
186  // convert Vertex vector to unique_ptrs
187  std::unique_ptr<std::vector<recob::Vertex> > v3col(new std::vector<recob::Vertex>(std::move(sv3col)));
188 
189  // make the clusters and associations
190  float sumChg, sumADC;
191  unsigned int clsID = 0, nclhits;
192  for(unsigned int icl = 0; icl < tcl.size(); ++icl) {
193  ClusterCrawlerAlg::ClusterStore const& clstr = tcl[icl];
194  if(clstr.ID < 0) continue;
195  ++clsID;
196  sumChg = 0;
197  sumADC = 0;
198  geo::PlaneID planeID = ClusterCrawlerAlg::DecodeCTP(clstr.CTP);
199  unsigned short plane = planeID.Plane;
200  nclhits = clstr.tclhits.size();
201  std::vector<unsigned int> clsHitIndices;
202  // correct the hit indices to refer to the valid hits that were just added
203  for(unsigned int itt = 0; itt < nclhits; ++itt) {
204  unsigned int iht = clstr.tclhits[itt];
205  recob::Hit const& hit = FinalHits->at(iht);
206  sumChg += hit.Integral();
207  sumADC += hit.SummedADC();
208  } // itt
209  // get the wire, plane from a hit
210  unsigned int iht = clstr.tclhits[0];
211 
212  geo::View_t view = FinalHits->at(iht).View();
213  sccol.emplace_back(
214  (float)clstr.BeginWir, // Start wire
215  0, // sigma start wire
216  clstr.BeginTim, // start tick
217  0, // sigma start tick
218  clstr.BeginChg, // start charge
219  clstr.BeginAng, // start angle
220  0, // start opening angle (0 for line-like clusters)
221  (float)clstr.EndWir, // end wire
222  0, // sigma end wire
223  clstr.EndTim, // end tick
224  0, // sigma end tick
225  clstr.EndChg, // end charge
226  clstr.EndAng, // end angle
227  0, // end opening angle (0 for line-like clusters)
228  sumChg, // integral
229  0, // sigma integral
230  sumADC, // summed ADC
231  0, // sigma summed ADC
232  nclhits, // n hits
233  0, // wires over hits
234  0, // width (0 for line-like clusters)
235  clsID, // ID
236  view, // view
237  planeID, // plane
238  recob::Cluster::Sentry // sentry
239  );
240  // make the cluster - hit association
241  if(!util::CreateAssn(
242  *this, evt, *hc_assn, sccol.size()-1, clstr.tclhits.begin(), clstr.tclhits.end())
243  )
244  {
246  <<"Failed to associate hit "<<iht<<" with cluster "<<icl;
247  } // exception
248  // make the cluster - endpoint associations
249  if(clstr.BeginVtx >= 0) {
250  end = 0;
251  // See if this endpoint is associated with a 3D vertex
252  unsigned short vtxIndex = 0;
253  for(ClusterCrawlerAlg::Vtx3Store const& vtx3: Vertices) {
254  // ignore incomplete vertices
255  if(vtx3.Ptr2D[0] < 0) continue;
256  if(vtx3.Ptr2D[1] < 0) continue;
257  if(vtx3.Ptr2D[2] < 0) continue;
258  if(vtx3.Ptr2D[plane] == clstr.BeginVtx) {
259  if(!util::CreateAssnD(*this, evt, *cv_assn, clsID - 1, vtxIndex, end))
260  {
262  <<"Failed to associate cluster "<<icl<<" with vertex";
263  } // exception
264  break;
265  } // vertex match
266  ++vtxIndex;
267  } // 3D vertices
268  } // clstr.BeginVtx >= 0
269  if(clstr.EndVtx >= 0) {
270  end = 1;
271  // See if this endpoint is associated with a 3D vertex
272  unsigned short vtxIndex = 0;
273  for(ClusterCrawlerAlg::Vtx3Store const& vtx3: Vertices) {
274  // ignore incomplete vertices
275  if(vtx3.Ptr2D[0] < 0) continue;
276  if(vtx3.Ptr2D[1] < 0) continue;
277  if(vtx3.Ptr2D[2] < 0) continue;
278  if(vtx3.Ptr2D[plane] == clstr.EndVtx) {
279  if(!util::CreateAssnD(*this, evt, *cv_assn, clsID - 1, vtxIndex, end))
280  {
282  <<"Failed to associate cluster "<<icl<<" with endpoint";
283  } // exception
284  break;
285  } // vertex match
286  ++vtxIndex;
287  } // 3D vertices
288  } // clstr.BeginVtx >= 0
289  } // icl
290 
291  // convert cluster vector to unique_ptrs
292  std::unique_ptr<std::vector<recob::Cluster> > ccol(new std::vector<recob::Cluster>(std::move(sccol)));
293 
294  shcol.use_hits(std::move(FinalHits));
295 
296  // clean up
298 
299  // move the hit collection and the associations into the event:
300  shcol.put_into(evt);
301  evt.put(std::move(ccol));
302  evt.put(std::move(hc_assn));
303  evt.put(std::move(v3col));
304  evt.put(std::move(cv_assn));
305 
306  } // produce
void RunCCHitFinder(std::vector< recob::Wire > const &Wires)
enum geo::_plane_proj View_t
Enumerate the possible plane projections.
geo::WireID WireID() const
Initial tdc tick for hit.
Definition: Hit.h:234
hit::CCHitFinderAlg fCCHFAlg
The data type to uniquely identify a Plane.
Definition: geo_types.h:250
std::vector< ClusterStore > const & GetClusters() const
Returns a constant reference to the clusters found.
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
Definition: Hit.h:225
static const SentryArgument_t Sentry
An instance of the sentry object.
Definition: Cluster.h:182
static geo::PlaneID DecodeCTP(CTP_t CTP)
ProductID put(std::unique_ptr< PROD > &&product)
Definition: Event.h:102
std::vector< recob::Hit > && YieldHits()
Returns (and loses) the collection of reconstructed hits.
void RunCrawler(std::vector< recob::Hit > const &srchits)
bool CreateAssnD(PRODUCER const &prod, art::Event &evt, art::Assns< T, U, D > &assn, size_t first_index, size_t second_index, typename art::Assns< T, U, D >::data_t &&data)
Creates a single one-to-one association with associated data.
A class handling a collection of hits and its associations.
Definition: HitCreator.h:703
bool CreateAssn(PRODUCER const &prod, art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t indx=UINT_MAX)
Creates a single one-to-one association.
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:258
Detector simulation of raw signals on wires.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string fCalDataModuleLabel
label of module producing input wires
std::vector< Vtx3Store > const & GetVertices() const
Returns a constant reference to the 3D vertices found.
float SummedADC() const
The sum of calibrated ADC counts of the hit (0. by default)
Definition: Hit.h:224
std::vector< evd::details::RawDigitInfo_t >::const_iterator end(RawDigitCacheDataClass const &cache)
std::vector< short > const & GetinClus() const
Returns (and loses) the collection of reconstructed hits.
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:49
std::vector< recob::Hit > && YieldHits()
Returns (and loses) the collection of reconstructed hits.
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
Namespace collecting geometry-related classes utilities.
void cluster::ClusterCrawler::reconfigure ( fhicl::ParameterSet const &  pset)

Definition at line 99 of file ClusterCrawler_module.cc.

References fCCAlg, fCCHFAlg, fhicl::ParameterSet::get(), hit::CCHitFinderAlg::reconfigure(), and cluster::ClusterCrawlerAlg::reconfigure().

Referenced by ClusterCrawler().

100  {
101  fCCAlg.reconfigure(pset.get< fhicl::ParameterSet >("ClusterCrawlerAlg"));
102  fCCHFAlg.reconfigure(pset.get< fhicl::ParameterSet >("CCHitFinderAlg"));
103  }
virtual void reconfigure(fhicl::ParameterSet const &pset)
virtual void reconfigure(fhicl::ParameterSet const &pset)
hit::CCHitFinderAlg fCCHFAlg
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Definition at line 125 of file Consumer.cc.

Referenced by art::EDProducer::doEndJob(), art::EDFilter::doEndJob(), art::EDAnalyzer::doEndJob(), and art::RootOutput::endJob().

126 {
127  if (!moduleContext_)
128  return;
129 
130  // If none of the branches have missing consumes statements, exit early.
131  if (std::all_of(cbegin(missingConsumes_),
132  cend(missingConsumes_),
133  [](auto const& perBranch) { return perBranch.empty(); }))
134  return;
135 
136  constexpr cet::HorizontalRule rule{60};
137  mf::LogPrint log{"MTdiagnostics"};
138  log << '\n'
139  << rule('=') << '\n'
140  << "The following consumes (or mayConsume) statements are missing from\n"
141  << module_context(moduleDescription_) << '\n'
142  << rule('-') << '\n';
143 
144  cet::for_all_with_index(
145  missingConsumes_, [&log](std::size_t const i, auto const& perBranch) {
146  for (auto const& pi : perBranch) {
147  log << " "
148  << assemble_consumes_statement(static_cast<BranchType>(i), pi)
149  << '\n';
150  }
151  });
152  log << rule('=');
153 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139
void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited

Definition at line 101 of file Consumer.cc.

References art::errors::ProductRegistrationFailure.

103 {
104  // Early exits if consumes tracking has been disabled or if the
105  // consumed product is an allowed consumable.
106  if (!moduleContext_)
107  return;
108 
109  if (cet::binary_search_all(consumables_[bt], pi))
110  return;
111 
112  if (requireConsumes_) {
114  "Consumer: an error occurred during validation of a "
115  "retrieved product\n\n")
116  << "The following consumes (or mayConsume) statement is missing from\n"
117  << module_context(moduleDescription_) << ":\n\n"
118  << " " << assemble_consumes_statement(bt, pi) << "\n\n";
119  }
120 
121  missingConsumes_[bt].insert(pi);
122 }
cet::exempt_ptr< ModuleDescription const > moduleDescription_
Definition: Consumer.h:140
bool requireConsumes_
Definition: Consumer.h:137
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
constexpr T pi()
Returns the constant pi (up to 35 decimal digits of precision)
ConsumableProducts consumables_
Definition: Consumer.h:138
bool moduleContext_
Definition: Consumer.h:136
ConsumableProductSets missingConsumes_
Definition: Consumer.h:139

Member Data Documentation

std::string cluster::ClusterCrawler::fCalDataModuleLabel
private

label of module producing input wires

Definition at line 66 of file ClusterCrawler_module.cc.

Referenced by produce().

ClusterCrawlerAlg cluster::ClusterCrawler::fCCAlg
private

Definition at line 65 of file ClusterCrawler_module.cc.

Referenced by produce(), and reconfigure().

hit::CCHitFinderAlg cluster::ClusterCrawler::fCCHFAlg
private

Definition at line 64 of file ClusterCrawler_module.cc.

Referenced by produce(), and reconfigure().


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