#include <iostream>#include <iomanip>#include <sstream>#include <string>#include <vector>#include <map>Go to the source code of this file.
Classes | |
| class | Planner |
| class | ToDo |
Macros | |
| #define | BOTHFINITE(a, b) (isfinite(a) && isfinite(b)) |
| #define | BOTHFINITE_OREQ(a, b) (BOTHNAN(a,b) || BOTHINFINITY(a,b) || BOTHFINITE(a,b)) |
| #define | BOTHINFINITY(a, b) (isinf(a) == isinf(b) && isinf(a)) |
| #define | BOTHNAN(a, b) (std::isnan(a) && std::isnan(b)) |
| #define | SAMENONFINITE(a, b) (BOTHNAN(a,b) || BOTHINFINITY(a,b)) |
Functions | |
| void | diag (const std::string &msg) |
| void | diag (const std::ostringstream &msg) |
| void | fail (const std::string &name) |
| bool | fexists (const std::string &filename) |
| int | GetFieldWidth () |
| int | GetPrecision () |
| unsigned int & | GetTestNo () |
| bool | is (const double a, const double b) |
| bool | is (const double a, const double b, const std::string &name) |
| bool | is (const float a, const float b) |
| bool | is (const float a, const float b, const std::string &name) |
| template<class T > | |
| bool | is (const T &a, const T &b) |
| template<class T > | |
| bool | is (const T &a, const T &b, const std::string &name) |
| template<class T > | |
| bool | is (const std::vector< T > &a, const std::vector< T > &b, const std::string &name) |
| bool | is (const std::vector< double > &a, const std::vector< double > &b, const std::string &name) |
| bool | isDiag (const double a, const double b, const std::string &name) |
| bool | isDiag (const double a, const double b) |
| template<class T > | |
| bool | isDiag (const T &a, const T &b) |
| template<class T > | |
| bool | isDiag (const T &a, const T &b, const std::string &name) |
| template<class T > | |
| bool | isDiag (const std::vector< T > &a, const std::vector< T > &b, const std::string &name) |
| bool | isDiag (const std::vector< double > &a, const std::vector< double > &b, const std::string &name) |
| bool | isEps (const double a, const double b, const double thisEps, const std::string &name) |
| bool | isEpsDiag (const TVector3 &a, const TVector3 &b, const double thisEps, const std::string &name) |
| bool | isEpsDiag (const double a, const double b, const double thisEps, const std::string &name) |
| bool | isEpsDiag (const std::vector< double > &a, const std::vector< double > &b, const double thisEps, const std::string &name) |
| bool | isnot (const double a, const double b) |
| bool | isnot (const double a, const double b, const std::string &name) |
| bool | isnot (const float a, const float b) |
| bool | isnot (const float a, const float b, const std::string &name) |
| template<class T > | |
| bool | isnot (const T &a, const T &b) |
| template<class T > | |
| bool | isnot (const T &a, const T &b, const std::string name) |
| template<class T > | |
| bool | isnotDiag (const T &a, const T &b) |
| template<class T > | |
| bool | isnotDiag (const T &a, const T &b, const std::string &name) |
| bool | isRelEpsDiag (const double a, const double b, const double thisEps, const std::string &name) |
| bool | isRelEpsDiag (const std::vector< double > &a, const std::vector< double > &b, const double thisEps, const std::string &name) |
| void | noplan () |
| bool | ok (bool okay) |
| bool | ok (bool okay, const std::string &name) |
| void | pass (const std::string &name) |
| void | plan (int n) |
| std::string | todoMsg (const std::string &name) |
| std::string | todoMsg () |
Variables | |
| double | eps |
| unsigned int | iTest |
| #define BOTHFINITE_OREQ | ( | a, | |
| b | |||
| ) | (BOTHNAN(a,b) || BOTHINFINITY(a,b) || BOTHFINITE(a,b)) |
| #define BOTHINFINITY | ( | a, | |
| b | |||
| ) | (isinf(a) == isinf(b) && isinf(a)) |
| #define BOTHNAN | ( | a, | |
| b | |||
| ) | (std::isnan(a) && std::isnan(b)) |
| #define SAMENONFINITE | ( | a, | |
| b | |||
| ) | (BOTHNAN(a,b) || BOTHINFINITY(a,b)) |
Definition at line 55 of file testlib.h.
Referenced by is(), isEps(), isEpsDiag(), and isRelEpsDiag().
| void diag | ( | const std::string & | msg | ) |
Definition at line 59 of file testlib.cc.
References utl::s.
Referenced by cmpDetector(), cmpDetectorGeometry(), cmpEvent(), cmpFDEvent(), cmpRecEventFile(), diag(), oBLAS::lowerTriangularMatrix::GetInverse(), oBLAS::upperTriangularMatrix::GetInverse(), FdEnergyDepositFinderKG::LowerTriangularMatrix::GetInverse(), is(), isDiag(), isEps(), isEpsDiag(), isnot(), isnotDiag(), and isRelEpsDiag().
| void diag | ( | const std::ostringstream & | msg | ) |
Definition at line 71 of file testlib.cc.
References diag().
| void fail | ( | const std::string & | name | ) |
Definition at line 83 of file testlib.cc.
References iTest, and todoMsg().
Referenced by io::SELFASFile::from_string(), and readDetectorGeometry().
| bool fexists | ( | const std::string & | filename | ) |
Definition at line 393 of file testlib.cc.
| int GetFieldWidth | ( | ) |
Definition at line 29 of file testlib.cc.
References gPrecision.
Referenced by is(), isDiag(), isEps(), isEpsDiag(), isnot(), isnotDiag(), and isRelEpsDiag().
| int GetPrecision | ( | ) |
Definition at line 28 of file testlib.cc.
References gPrecision.
Referenced by is(), isDiag(), isEps(), isEpsDiag(), isnot(), isnotDiag(), and isRelEpsDiag().
| unsigned int& GetTestNo | ( | ) |
Definition at line 408 of file testlib.cc.
References iTest.
Referenced by is(), isDiag(), isEpsDiag(), isnot(), isnotDiag(), and isRelEpsDiag().
| bool is | ( | const double | a, |
| const double | b | ||
| ) |
Definition at line 113 of file testlib.cc.
References is().
Referenced by fwk::CentralConfig::CheckFingerprints(), cmpDetectorGeometry(), cmpFDEvent(), cmpFDRecGeometry(), TopDownSelectorNS::TopDownSelector::CorrectTimeAltitude(), SdTopDownSignalSelectorUGR::SdTopDownSignalSelectorUGR::CorrectTimeAltitude(), TopDownSelectorNS::TopDownSelector::CorrectTimeAltitudeCurv(), SdTopDownSignalSelectorUGR::SdTopDownSignalSelectorUGR::CorrectTimeAltitudeCurv(), TopDownSelectorNS::TopDownSelector::EstimateCore(), SdTopDownSignalSelectorUGR::SdTopDownSignalSelectorUGR::EstimateCore(), det::XXMLManager< Info >::FindMatchingBranch(), mdet::Module::GetArea(), fdet::FTelescopeListXMLManager::GetFullEyeTelescopeList(), mdet::Module::GetNumberOfScintillators(), FdProfileReconstructorKG::FdProfileReconstructor::Init(), is(), TopDownSelectorNS::TopDownSelector::IsAligned(), SdTopDownSignalSelectorUGR::SdTopDownSignalSelectorUGR::IsAligned(), TopDownSelectorNS::TopDownSelector::IsGoodTimeConfig(), SdTopDownSignalSelectorUGR::SdTopDownSignalSelectorUGR::IsGoodTimeConfig(), sdet::Station::IsInAcquisition(), utl::make_split(), det::XXMLManager< Info >::IdMatcher::operator()(), utl::operator>>(), tst::Validatrix::operator>>(), Validatrix::operator>>(), MdOptoElectronicSimulatorAG::MdOptoElectronicSimulator::OptoElectronics(), io::EventFileChain::Parse(), utl::UTCDateTime::Parse(), utl::UTCDate::Parse(), TopDownSelectorNS::TopDownSelector::PatternRecovering(), SdTopDownSignalSelectorUGR::SdTopDownSignalSelectorUGR::PatternRecovering(), EdepSimulatorAG::EdepSimulator::Run(), MuonCounterViewerAG::MuonCounterViewer::Run(), MdCounterSimulatorAG::MdCounterSimulator::RunFromMEvent(), MdCounterSimulatorAG::MdCounterSimulator::RunFromMEventScintillatorSimulated(), sevt::PMTRecData::SetIsUsedInGlobalMPD(), sevt::PMTRecData::SetIsVEMChargeFromHistogram(), sevt::PMTRecData::SetIsVEMPeakFromHistogram(), utl::ReadStream::SetStream(), fevt::EyeTriggerData::SetT3Accepted(), fevt::TelescopeTriggerData::SetTLTAccepted(), tst::Validatrix::Unpack::Tag(), testMd5Sum::testMd5OnFile(), testReadStream::TestVectorData(), testReadStream::TestVectorString(), testReadStream::TestVectorStringNoStripping(), TopDownSelectorNS::TopDownSelector::TryRemovingStations(), SdTopDownSignalSelectorUGR::SdTopDownSignalSelectorUGR::TryRemovingStations(), rdet::RDetector::Update(), sdet::SDetector::Update(), and rdet::RDetector::~RDetector().
| bool is | ( | const double | a, |
| const double | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 119 of file testlib.cc.
References RdGeoCeLDFFitter::b, diag(), eps, GetFieldWidth(), GetPrecision(), iTest, utl::s, SAMENONFINITE, and todoMsg().
| bool is | ( | const float | a, |
| const float | b | ||
| ) |
Definition at line 172 of file testlib.cc.
References is().
| bool is | ( | const float | a, |
| const float | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 176 of file testlib.cc.
References is().
| bool is | ( | const T & | a, |
| const T & | b | ||
| ) |
| bool is | ( | const T & | a, |
| const T & | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 66 of file testlib.h.
References GetTestNo(), and todoMsg().
| bool is | ( | const std::vector< T > & | a, |
| const std::vector< T > & | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 110 of file testlib.h.
References GetTestNo(), is(), and todoMsg().
| bool is | ( | const std::vector< double > & | a, |
| const std::vector< double > & | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 334 of file testlib.cc.
References eps, GetTestNo(), is(), SAMENONFINITE, and todoMsg().
| bool isDiag | ( | const double | a, |
| const double | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 232 of file testlib.cc.
References eps, and isEpsDiag().
Referenced by cmpDetector(), cmpDetectorGeometry(), cmpEvent(), cmpEventGlobalInfo(), cmpFDEvent(), cmpFDRecAPLight(), cmpFDRecGeometry(), cmpFDRecShower(), cmpFileInfo(), cmpGenShower(), cmpRecEventFile(), cmpSDEvent(), isDiag(), isEpsDiag(), and isRelEpsDiag().
| bool isDiag | ( | const double | a, |
| const double | b | ||
| ) |
Definition at line 236 of file testlib.cc.
References eps, and isEpsDiag().
| bool isDiag | ( | const T & | a, |
| const T & | b | ||
| ) |
| bool isDiag | ( | const T & | a, |
| const T & | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 85 of file testlib.h.
References RdGeoCeLDFFitter::b, diag(), GetFieldWidth(), GetPrecision(), GetTestNo(), utl::s, and todoMsg().
| bool isDiag | ( | const std::vector< T > & | a, |
| const std::vector< T > & | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 137 of file testlib.h.
References diag(), GetFieldWidth(), GetPrecision(), GetTestNo(), isDiag(), utl::s, and todoMsg().
| bool isDiag | ( | const std::vector< double > & | a, |
| const std::vector< double > & | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 246 of file testlib.cc.
References eps, and isEpsDiag().
| bool isEps | ( | const double | a, |
| const double | b, | ||
| const double | thisEps, | ||
| const std::string & | name | ||
| ) |
Definition at line 188 of file testlib.cc.
References RdGeoCeLDFFitter::b, diag(), GetFieldWidth(), GetPrecision(), iTest, utl::s, SAMENONFINITE, and todoMsg().
| bool isEpsDiag | ( | const TVector3 & | a, |
| const TVector3 & | b, | ||
| const double | thisEps, | ||
| const std::string & | name | ||
| ) |
Definition at line 414 of file testlib.cc.
References diag(), GetTestNo(), utl::s, and todoMsg().
| bool isEpsDiag | ( | const double | a, |
| const double | b, | ||
| const double | thisEps, | ||
| const std::string & | name | ||
| ) |
Definition at line 210 of file testlib.cc.
References RdGeoCeLDFFitter::b, diag(), GetFieldWidth(), GetPrecision(), iTest, utl::s, SAMENONFINITE, and todoMsg().
Referenced by cmpDetector(), cmpDetectorGeometry(), cmpFDRecAPLight(), cmpFDRecGeometry(), cmpFDRecShower(), isDiag(), and isRelEpsDiag().
| bool isEpsDiag | ( | const std::vector< double > & | a, |
| const std::vector< double > & | b, | ||
| const double | thisEps, | ||
| const std::string & | name | ||
| ) |
Definition at line 252 of file testlib.cc.
References diag(), GetFieldWidth(), GetPrecision(), GetTestNo(), isDiag(), utl::s, SAMENONFINITE, and todoMsg().
| bool isnot | ( | const double | a, |
| const double | b | ||
| ) |
| bool isnot | ( | const double | a, |
| const double | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 148 of file testlib.cc.
References RdGeoCeLDFFitter::b, BOTHINFINITY, BOTHNAN, diag(), eps, GetFieldWidth(), GetPrecision(), iTest, utl::s, and todoMsg().
| bool isnot | ( | const float | a, |
| const float | b | ||
| ) |
Definition at line 180 of file testlib.cc.
References isnot().
| bool isnot | ( | const float | a, |
| const float | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 184 of file testlib.cc.
References isnot().
| bool isnot | ( | const T & | a, |
| const T & | b | ||
| ) |
| bool isnot | ( | const T & | a, |
| const T & | b, | ||
| const std::string | name | ||
| ) |
Definition at line 191 of file testlib.h.
References GetTestNo(), and todoMsg().
| bool isnotDiag | ( | const T & | a, |
| const T & | b | ||
| ) |
| bool isnotDiag | ( | const T & | a, |
| const T & | b, | ||
| const std::string & | name | ||
| ) |
Definition at line 211 of file testlib.h.
References diag(), GetFieldWidth(), GetPrecision(), GetTestNo(), utl::s, and todoMsg().
| bool isRelEpsDiag | ( | const double | a, |
| const double | b, | ||
| const double | thisEps, | ||
| const std::string & | name | ||
| ) |
Definition at line 240 of file testlib.cc.
References isEpsDiag().
Referenced by cmpFDRecGeometry(), cmpFDRecShower(), and cmpSDEvent().
| bool isRelEpsDiag | ( | const std::vector< double > & | a, |
| const std::vector< double > & | b, | ||
| const double | thisEps, | ||
| const std::string & | name | ||
| ) |
Definition at line 292 of file testlib.cc.
References diag(), GetFieldWidth(), GetPrecision(), GetTestNo(), isDiag(), utl::s, SAMENONFINITE, and todoMsg().
| void noplan | ( | ) |
Definition at line 53 of file testlib.cc.
References gPlanner, and Planner::SetDoPrint().
| bool ok | ( | bool | okay | ) |
Definition at line 89 of file testlib.cc.
References iTest, and todoMsg().
Referenced by cmpDetectorGeometry(), cmpEvent(), cmpFDEvent(), cmpFDRecPixel(), cmpFileInfo(), cmpRecEventFile(), tst::Validatrix::Compare(), TabulatedTankSimulatorNS::DetectorResponse::DetectorResponse(), RdStationSignalInterpolator::RdStationSignalInterpolator::FindIndexOfSurroundingNN(), EventGeneratorOG::EventGenerator::GetCoreShiftForRadioSimulation(), UnivRecNS::UnivRec::GetErrors(), UnivParamTimeNS::UnivParamTime::GetFraction(), UnivParamTimeNS::UnivParamTime::GetTime(), sdet::SStationListXMLManager::Init(), rdet::RStationListXMLManager::Init(), cdet::CStationListXMLManager::Init(), rdet::RSimulationStationListManager::Init(), main(), readDetectorGeometry(), readFileInfo(), fwk::RandomEngineRegistry::RegisterOne(), utl::ReferenceEllipsoid::RegisterOneEllipsoid(), RdStationAssociator::RdStationAssociator::Run(), RdStationInterpolator::RdStationInterpolator::Run(), RdStationInterpolatorStarShape::RdStationInterpolatorStarShape::Run(), UnivRecNS::UnivRec::SetFitStage(), sevt::PMTQuality::SetHasAnode(), sevt::PMTCalibData::SetIsLowGainOk(), sevt::PMTQuality::SetIsRaining(), sevt::SmallPMTData::SetIsTubeOk(), sevt::PMTQuality::SetIsTubeOk(), sevt::SmallPMTCalibData::SetIsTubeOk(), sevt::PMTCalibData::SetIsTubeOk(), testEVAFile::testRead(), testZHAireSFile::testRead(), testREASFile::testRead(), UnivParamTimeNS::UnivParamTime::tQuantilePDF(), UnivParamTimeNS::UnivParamTime::UnivParamTime(), and rdet::RStationListSQLManager::Update().
| bool ok | ( | bool | okay, |
| const std::string & | name | ||
| ) |
Definition at line 101 of file testlib.cc.
| void pass | ( | const std::string & | name | ) |
Definition at line 77 of file testlib.cc.
| void plan | ( | int | n | ) |
Definition at line 41 of file testlib.cc.
References gPlanner, nTests, and Planner::SetDoPrint().
Referenced by fftwpp::Planner().
| std::string todoMsg | ( | const std::string & | name | ) |
Definition at line 362 of file testlib.cc.
References gToDoMarkers.
Referenced by fail(), fexists(), is(), isDiag(), isEps(), isEpsDiag(), isnot(), isnotDiag(), isRelEpsDiag(), ok(), pass(), and todoMsg().
| std::string todoMsg | ( | ) |
Definition at line 374 of file testlib.cc.
References todoMsg().
| double eps |
Referenced by CachedShowerRegeneratorOG::StationInfo::AbsShift(), utl::BetaCF(), SdCalibPlotterOG::FADCTraceView::Draw(), SdCalibPlotterOG::PMTVEMTraceView::Draw(), SdCalibPlotterOG::StationVEMTraceView::Draw(), utl::LambertWDetail::FritschStep(), utl::VectorIntegrator< utl::MuonArrivalTime::SuperArg, 4 >::GetIntegral(), cic::ConstIntCut::GetMinLnAttenuation(), utl::Integrator< utl::MuonArrivalTime::TimePDFArg >::GetRombergIntegral(), LDFFinderKG::EnergyConversion::GetS38(), utl::IncompleteGammaPCF(), utl::IncompleteGammaPSeries(), utl::InverseMoyal(), utl::LambertWDetail::Iterate(), CachedShowerRegeneratorOG::StationInfo::RelShift(), RdChannelUpsampler::RdChannelUpsampler::Run(), RdLDFChargeExcessCorrector::RdLDFChargeExcessCorrector::Run(), RdBeamFormer::RdBeamFormer::shiftTraces(), TestODEIntegrator::TestAdaptiveRK5(), HistogramTest::testEqualBinning(), MathTest::TestLambertW(), TestODEIntegrator::TestRK4(), TestODEIntegrator::TestRK4SVector(), TestODEIntegrator::TestRK5(), TestODEIntegrator::TestRK5SVector(), IntegratorTest::testSpeed(), TestSMatrixSVector::TestSVectorAngle(), TestRandomSamplerFromCDF::TestTabulatedFunction(), HistogramTest::testVariableBinning(), TelescopeSimulatorKG2::Camera::TraceMerc(), and RdBeamFormer::RdBeamFormer::WriteASCII().
| unsigned int iTest |