LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
testing::details::FirstAbsoluteOrLookupWithDotPolicy Class Reference

#include "unit_test_base.h"

Inheritance diagram for testing::details::FirstAbsoluteOrLookupWithDotPolicy:

Public Member Functions

 FirstAbsoluteOrLookupWithDotPolicy (std::string const &paths)
 
virtual std::string operator() (std::string const &filename)
 
void reset ()
 

Private Attributes

bool first
 whether we are waiting for the first query More...
 
cet::search_path after_paths
 path for the other queries More...
 

Detailed Description

Definition at line 1009 of file unit_test_base.h.

Constructor & Destructor Documentation

testing::details::FirstAbsoluteOrLookupWithDotPolicy::FirstAbsoluteOrLookupWithDotPolicy ( std::string const &  paths)
inline

Definition at line 1011 of file unit_test_base.h.

1011  : first(true), after_paths(paths)
1012  {}
bool first
whether we are waiting for the first query
cet::search_path after_paths
path for the other queries

Member Function Documentation

std::string testing::details::FirstAbsoluteOrLookupWithDotPolicy::operator() ( std::string const &  filename)
inlinevirtual

Definition at line 1024 of file unit_test_base.h.

1025  {
1026  if (first) {
1027  first = false;
1028  if (cet::is_absolute_filepath(filename)) return filename;
1029  return cet::search_path("./:" + after_paths.to_string()).find_file(filename);
1030  }
1031  else {
1032  return after_paths.find_file(filename);
1033  }
1034  } // FirstAbsoluteOrLookupWithDotPolicy::operator()
bool first
whether we are waiting for the first query
cet::search_path after_paths
path for the other queries
void testing::details::FirstAbsoluteOrLookupWithDotPolicy::reset ( )
inline

Definition at line 1016 of file unit_test_base.h.

1016 { first = true; }
bool first
whether we are waiting for the first query

Member Data Documentation

cet::search_path testing::details::FirstAbsoluteOrLookupWithDotPolicy::after_paths
private

path for the other queries

Definition at line 1020 of file unit_test_base.h.

bool testing::details::FirstAbsoluteOrLookupWithDotPolicy::first
private

whether we are waiting for the first query

Definition at line 1019 of file unit_test_base.h.


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