3 #include "application.hh" 11 LOGGER(
mlog,
"Monarch2Info" );
13 int main(
const int argc,
const char** argv )
15 scarab::main_app theMain(
false );
18 std::string tFilename;
20 theMain.add_flag(
"-H,--header-only", tHeaderOnly,
"Only look at header information; does not check number of records" );
21 theMain.add_option(
"Filename", tFilename,
"Input egg file" )->required();
23 CLI11_PARSE( theMain, argc, argv );
26 tReadTest->ReadHeader();
28 const M2Header* tReadHeader = tReadTest->GetHeader();
29 LINFO(
mlog, *tReadHeader );
34 return RETURN_SUCCESS;
37 unsigned int tRecordCount = 0;
38 unsigned int tAcquisiontCount = 0;
42 tReadRecord = tReadTest->GetRecordSeparateOne();
46 tReadRecord = tReadTest->GetRecordSeparateOne();
50 tReadRecord = tReadTest->GetRecordInterleaved();
59 while( tReadTest->ReadRecord() != false )
61 tRecordCount = tRecordCount + 1;
64 tAcquisiontCount = tAcquisiontCount + 1;
71 LWARN(
mlog,
"Something went wrong during the reading of records!" <<
"\n\t" << e.
what() );
74 LINFO(
mlog,
"record count <" << tRecordCount <<
">" );
75 LINFO(
mlog,
"acquisition count <" << tAcquisiontCount <<
">" );
79 return RETURN_SUCCESS;
virtual const char * what() const
static scarab::logger mlog("Monarch2Info")
static const FormatModeType sFormatMultiSeparate
AcquisitionIdType fAcquisitionId
int main(const int argc, const char **argv)
static const FormatModeType sFormatMultiInterleaved
static const Monarch2 * OpenForReading(const std::string &filename)