1 ////////////////////////////////////////////////////////////////////////////////////// 2 // This file is distributed under the University of Illinois/NCSA Open Source License. 3 // See LICENSE file in top directory for details. 4 // 5 // Copyright (c) 2020 QMCPACK developers. 6 // 7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory 8 // 9 // File created by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory 10 ////////////////////////////////////////////////////////////////////////////////////// 11 12 13 #ifndef QMCPLUSPLUS_ESTIMATORMANAGERBASETEST_HPP 14 #define QMCPLUSPLUS_ESTIMATORMANAGERBASETEST_HPP 15 16 #include "Estimators/EstimatorManagerBase.h" 17 #include "Estimators/tests/FakeEstimator.h" 18 19 class Communicate; 20 21 namespace qmcplusplus 22 { 23 namespace testing 24 { 25 26 /** Testing class breaking EstimatorManagerBase encapsultation 27 * 28 * Wraps EstimatorManagerBase 29 */ 30 class EstimatorManagerBaseTest 31 { 32 public: 33 EstimatorManagerBaseTest(Communicate* comm, int ranks); 34 /** Quickly add scalar samples using FakeEstimator mock estimator. */ 35 void fakeSomeScalarSamples(); 36 /** call private EMB method and colelct EMBTs estimators_ */ 37 void collectScalarEstimators(); 38 /** for mpi test (it's trivial for 1 rank) 39 * 40 * only used by test_manager_mpi.cpp so implemented there. 41 */ 42 bool testMakeBlockAverages(); 43 EstimatorManagerBase em; 44 private: 45 Communicate* comm_; 46 std::vector<FakeEstimator> estimators_; 47 48 }; 49 50 } 51 } 52 53 #endif /* QMCPLUSPLUS_ESTIMATORMANAGERBASETEST_HPP */ 54