All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Functions
lar::example Namespace Reference

LArSoft examples. More...

Namespaces

 details
 Implementation detail namespace (content is not documented)
 
 tests
 Tests for LArSoft examples.
 

Classes

class  PointIsolationAlg
 Algorithm to detect isolated space points. More...
 
class  RemoveIsolatedSpacePoints
 art module: removes isolated space points. More...
 
struct  PositionExtractor
 Helper extractor for point coordinates. More...
 
struct  CoordRange
 Range of coordinates. More...
 
struct  CoordRangeCells
 Range of coordinates. More...
 
class  SpacePartition
 A container of points sorted in cells. More...
 
struct  PositionExtractor< T * >
 Specialisation of PositionExtractor for C array: { x, y, z }. More...
 
struct  PositionExtractor< std::array< T, 3U > >
 Specialisation of PositionExtractor for C++ array: { x, y, z }. More...
 
struct  PositionExtractor< std::vector< T > >
 
class  SpacePointIsolationAlg
 Algorithm to detect isolated space points. More...
 
struct  PositionExtractor< recob::SpacePoint >
 Specialization of PositionExtractor for recob::SpacePoint. More...
 
class  CheatTrack
 Pseudo-track object for TotallyCheatTracks example. More...
 
class  TotallyCheatTracker
 Module: creates tracks from simulated particles. More...
 
class  TotallyCheatTrackingAlg
 Reconstructs tracks from simulated particles. More...
 
class  AnalysisExample
 Example analyzer module. More...
 
class  Disturbance
 A silly module. More...
 
class  Exploder
 A buggy module. More...
 
class  AtomicNumber
 Provides information about the active material in the TPC. More...
 
class  ShowerCalibrationGalore
 Interface for a shower calibration service provider. More...
 
class  ShowerCalibrationGaloreFromPID
 Shower calibration service provider correcting according to PID. More...
 
class  ShowerCalibrationGaloreScale
 A shower calibration service provider applying a uniform scale. More...
 
class  ShowerCalibrationGaloreScaleService
 A shower calibration art service returning a single factor. More...
 

Typedefs

using AtomicNumberService = lar::SimpleServiceProviderWrapper< AtomicNumber >
 Service giving access to AtomicNumber service provider. More...
 
using ShowerCalibrationGaloreFromPIDService = lar::ServiceProviderImplementationWrapper< ShowerCalibrationGaloreFromPID, ShowerCalibrationGaloreService >
 Service for shower energy calibration according to particle type. More...
 
using ShowerCalibrationGaloreService = lar::ServiceProviderInterfaceWrapper< ShowerCalibrationGalore >
 Interface for a shower calibration art service. More...
 

Functions

template<typename Stream >
Streamoperator<< (Stream &&out, ShowerCalibrationGalore::Correction_t const &corr)
 Output operator for the correction type. More...
 
std::pair< std::string,
std::string > 
splitROOTpath (std::string path)
 Splits path into ROOT file name and directory path. More...
 

Detailed Description

LArSoft examples.

Typedef Documentation

Service giving access to AtomicNumber service provider.

See Also
AtomicNumber, AtomicNumber example overview

Access the provider with the standard LArSoft access pattern:

auto const* atomicNumber
  = lar::providerFrom<lar::example::AtomicNumberService>();

Definition at line 38 of file AtomicNumberService.h.

Service for shower energy calibration according to particle type.

See Also
ShowerCalibrationGalore example overview

See the ShowerCalibrationGaloreFromPID provider documentation for configuration instructions and implementation details.

See the ShowerCalibrationGalore provider class documentation for an explanation of the interface.

Use this service and its provider by its interface only:

lar::example::ShowerCalibrationGalore const* calib
  = lar::providerFrom<lar::example::ShowerCalibrationGaloreService>();

The code does not need to mention, nor to include, nor to link to ShowerCalibrationGaloreFromPIDService service.

Configuration parameters

In addition to the service provider:

  • service_provider must be set to "ShowerCalibrationGaloreFromPIDService" in order to tell art to load this implementation.

Definition at line 53 of file ShowerCalibrationGaloreFromPIDService_service.cc.

Interface for a shower calibration art service.

See Also
ShowerCalibrationGalore example overview

Services derived from this interface just return a provider implementing the ShowerCalibrationGalore service provider interface.

Implementations of this service must override ShowerCalibrationGaloreService::do_provider().

Definition at line 38 of file ShowerCalibrationGaloreService.h.

Function Documentation

template<typename Stream >
Stream& lar::example::operator<< ( Stream &&  out,
ShowerCalibrationGalore::Correction_t const &  corr 
)

Output operator for the correction type.

Definition at line 130 of file ShowerCalibrationGalore.h.

131  {
132  out << corr.factor << " +/- " << corr.error;
133  return out;
134  } // operator<< (Correction_t)
std::pair< std::string, std::string > lar::example::splitROOTpath ( std::string  path)

Splits path into ROOT file name and directory path.

Definition at line 335 of file ShowerCalibrationGaloreFromPID.cxx.

335  {
336  const std::string suffix = ".root";
337 
338  // find the ROOT file name
339  std::string::size_type iSuffix = std::string::npos;
340  do {
341  iSuffix = path.rfind(suffix, iSuffix);
342  if (iSuffix == std::string::npos) return {}; // failure: no suffix
343 
344  // if it's not "suffix:" or "suffix/" or at end of string, it's not it
345  auto iAfter = iSuffix + suffix.length();
346  if ((iAfter < path.length())
347  && (path[iAfter] != '/')
348  && (path[iAfter] != ':')
349  )
350  {
351  // oops... this suffix is invalid; keep searching
352  if (iSuffix == 0) return {}; // failure: no suffix
353  --iSuffix;
354  continue;
355  }
356 
357  // we found a proper suffix
358  std::pair<std::string, std::string> result;
359 
360  result.first = path.substr(0U, iAfter); // file path
361  if (iAfter < path.length())
362  result.second = path.substr(iAfter + 1, path.length()); // ROOT dir
363  return result;
364 
365  } while (true);
366 } // lar::example::splitROOTpath()
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 caloskimCalorimetryCryoE physics caloskimCalorimetryCryoW physics path