2 #include <sevt/SEvent.h>
3 #include <sevt/SortCriteria.h>
4 #include <sevt/PMTSimData.h>
6 #include <utl/ErrorLogger.h>
7 #include <utl/Branch.h>
8 #include <utl/Particle.h>
9 #include <tst/Validatrix.h>
11 #include <fwk/CentralConfig.h>
13 #include <boost/lexical_cast.hpp>
24 using namespace tst::Validatrix;
27 namespace DenseValidationNS {
32 auto topB = CentralConfig::GetInstance()->GetTopBranch(
"DenseValidation");
33 topB.GetChild(
"RefFilename").GetData(fRefFileName);
35 fOutputName = fRefFileName +
".new";
37 fOutput =
new ofstream(fOutputName);
47 ERROR(
"Event should have SEvent.");
51 *fOutput << BeLabel(boost::lexical_cast<string>(
event.GetHeader().GetId()));
54 const auto& sEvent =
event.GetSEvent();
56 for (
const auto& station : sEvent.StationsRange()) {
57 if (station.HasRecData()) {
58 *fOutput <<
BeLabel(
"Station_" + boost::lexical_cast<string>(station.GetId()));
68 DenseValidation::Finish()
74 ifstream oldFile(fRefFileName);
75 ifstream newFile(fOutputName);
std::string BeCloseRel(const T &value, const double tolerance=kDefaultTolerance)
void Init()
Initialise the registry.
bool Compare(const string &oldFilename, const string &newFilename, const bool failOnFirst)
std::string BeLabel(const string &tag)
ResultFlag
Flag returned by module methods to the RunController.
#define ERROR(message)
Macro for logging error messages.