11 #ifndef LARSIM_PHOTONPROPAGATION_LIBRARYMAPPINGTOOLS_OPDETVISIBILITYDATA_H
12 #define LARSIM_PHOTONPROPAGATION_LIBRARYMAPPINGTOOLS_OPDETVISIBILITYDATA_H
20 #include <type_traits>
59 template <
typename Cont,
typename Enable =
void>
73 template <
typename Cont>
119 template <
typename Cont,
typename Mapping>
243 template <
typename Cont>
254 template <
typename Cont,
typename =
void>
257 template <
typename Cont>
260 generic_size(std::declval<Cont>())
269 template <
typename Cont,
typename =
void>
274 template <
typename Cont>
277 std::declval<Cont const>().empty()
281 static bool isValid(Cont
const& cont) {
return !cont.empty(); }
286 template <
typename Cont,
typename =
void>
291 template <
typename Cont>
294 std::declval<Cont const>().is_valid()
298 static bool isValid(Cont
const& cont) {
return cont.is_valid(); }
303 template <
typename Cont,
typename =
void>
308 template <
typename Cont>
311 std::declval<Cont const>().isValid()
315 static bool isValid(Cont
const& cont) {
return cont.isValid(); }
320 template <
typename Cont,
typename =
void>
325 template <
typename Cont>
334 template <
typename T>
338 template <
typename T>
343 template <
typename T>
348 template <
typename T, std::
size_t N>
353 template <
typename Cont,
typename =
void>
358 template <
typename Cont>
367 template <
typename Cont>
380 template <
typename Cont,
typename >
383 <std::remove_reference_t<Cont>>
388 template <
typename Cont>
396 template <
typename Cont,
typename Mapping>
402 template <
typename Cont,
typename Mapping>
407 ? ContainerBase_t::minimal_size(cont, mapping)
418 #endif // LARSIM_PHOTONPROPAGATION_LIBRARYMAPPINGTOOLS_OPDETVISIBILITYDATA_H
Provides MappedContainer class.
double std(const std::vector< short > &wf, const double ped_mean, size_t start, size_t nsample)
auto generic_size(Cont &&cont)
A meta-container providing transparent mapping on top of another.
Mapping Mapping_t
Type of the mapping object.
static bool isValid(T *ptr)
OpDetVisibilityData(DataContainer_t const &cont, Mapping_t const &mapping)
Constructor: acquires data and mapping.
std::size_t size(FixedBins< T, C > const &) noexcept
OpDetVisibilityData(DataContainer_t const &cont, Mapping_t const &mapping, size_type size, value_type defValue)
Constructor: acquires data, mapping and a default value.
static bool isValid(Cont const &cont)
static bool isValid(T(&)[N])
util::MappedContainer< Cont, Mapping > ContainerBase_t
static size_type effectiveSize(DataContainer_t const &cont, size_type allegedSize)
Determines whether the current content should be considered valid.
bool operator!() const
Returns whether the container has no valid data.
typename std::enable_if< B, T >::type enable_if_t
Cont DataContainer_t
Type of the original container.
bool isValidLibraryData(Cont &&cont)
Returns the validity of content of library data in the container.
A container for photon visibility mapping data.
bool isValid() const
Returns whether the contained data is valid or not.
static bool isValid(Cont const &cont)
process_name largeant stream1 can override from command line with o or output physics producers generator N
static bool isValid(Cont const &cont)
bool empty() const
Returns whether the container has no elements.
OpDetVisibilityData()=default
static bool isValid(Cont const &cont)
static bool isValid(Cont const &cont)
Trait for determining the validity of library data in a container.