LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
lar::example Namespace Reference

LArSoft examples. More...

Namespaces

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

Classes

class  AnalysisExample
 Example analyzer module. More...
 
class  AtomicNumber
 Provides information about the active material in the TPC. More...
 
class  CheatTrack
 Pseudo-track object for TotallyCheatTracks example. More...
 
struct  CoordRange
 Range of coordinates. More...
 
struct  CoordRangeCells
 Range of coordinates. More...
 
class  Disturbance
 A silly module. More...
 
class  Exploder
 A buggy module. More...
 
class  PointIsolationAlg
 Algorithm to detect isolated space points. More...
 
struct  PositionExtractor
 Helper extractor for point coordinates. More...
 
struct  PositionExtractor< recob::SpacePoint >
 Specialization of PositionExtractor for recob::SpacePoint. More...
 
struct  PositionExtractor< std::array< T, 3U > >
 Specialisation of PositionExtractor for C++ array: { x, y, z }. More...
 
struct  PositionExtractor< std::vector< T > >
 
struct  PositionExtractor< T * >
 Specialisation of PositionExtractor for C array: { x, y, z }. More...
 
class  RemoveIsolatedSpacePoints
 art module: removes isolated space points. 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...
 
class  SpacePartition
 A container of points sorted in cells. More...
 
class  SpacePointIsolationAlg
 Algorithm to detect isolated space points. More...
 
class  TotallyCheatTracker
 Module: creates tracks from simulated particles. More...
 
class  TotallyCheatTrackingAlg
 Reconstructs tracks from simulated particles. 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 >
Stream & operator<< (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.

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.

Referenced by lar::example::ShowerCalibrationGaloreFromPID::OpenROOTdirectory().

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()