LArSoft  v07_13_02
Liquid Argon Software toolkit - http://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 1017 of file unit_test_base.h.

Constructor & Destructor Documentation

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

Definition at line 1019 of file unit_test_base.h.

1019  :
1020  first(true), after_paths(paths)
1021  {}
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 1035 of file unit_test_base.h.

1036  {
1037  if (first) {
1038  first = false;
1039  if (cet::is_absolute_filepath(filename)) return filename;
1040  return cet::search_path("./:" + after_paths.to_string())
1041  .find_file(filename);
1042  } else {
1043  return after_paths.find_file(filename);
1044  }
1045  } // 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 1025 of file unit_test_base.h.

1025 { 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 1029 of file unit_test_base.h.

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

whether we are waiting for the first query

Definition at line 1028 of file unit_test_base.h.


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