14 std::cout <<
" SYNTAX: " << name_ <<
" [options] <files ...>\n";
15 std::cout <<
" Available options:\n";
16 std::cout <<
" --columns | Output file information in tab-delimited columns.\n";
19 int main(
int argc,
char *argv[]){
21 std::cout <<
" Error: Invalid number of arguments to " << argv[0] <<
". Expected 1, received " << argc-1 <<
".\n";
26 bool col_output =
false;
29 std::string dummy, extension;
30 for(
int i = 1; i < argc; i++){
32 if(strcmp(argv[i],
"--columns") == 0){
38 std::cout <<
"File no. " << file_count++ <<
": " << argv[i] << std::endl;
40 std::cout << file_count++ <<
"\t" << argv[i] <<
"\t";
43 if(extension ==
"ldf")
45 else if(extension ==
"pld")
49 std::cout <<
" ERROR! Invalid file extension '" << extension <<
"'.\n\n";
51 std::cout <<
"FAILED\n";
55 std::ifstream file(argv[i], std::ios::binary);
56 if(!file.is_open() || !file.good()){
58 std::cout <<
" ERROR! Failed to open input file! Check that the path is correct.\n\n";
60 std::cout <<
"FAILED\n";
78 std::cout << std::endl;
80 else if(file_format == 1){
86 std::cout << std::endl;
void PrintDelimited(const char &delimiter_='\t')
Print dir buffer information in a delimited list.
A class to handle reading from various UTK/ORNL pixie16 data formats.
void Print()
Print dir buffer information.
void Print()
Print header information.
int main(int argc, char *argv[])
void PrintDelimited(const char &delimiter_='\t')
Print header information in a delimited list.
virtual bool Read(std::ifstream *file_)
Read a DIR buffer from a file. Return false if buffer has the wrong header and return true otherwise...
virtual bool Read(std::ifstream *file_)
Read a HEAD buffer from a file. Return false if buffer has the wrong header and return true otherwise...
A class to handle the unpacking of UTK/ORNL style pixie16 data spills.
Handles poll2 output data files.
std::string get_extension(std::string filename_, std::string &prefix)
Get the file extension from an input filename string.