#include <iostream>
#include <string>
#include <string_view>
#include <unistd.h>
#include "EventStorage/pickDataReader.h"
#include "FileMetaData.h"
#include "CxxUtils/checker_macros.h"
Go to the source code of this file.
◆ ATLAS_NOT_THREAD_SAFE()
| int main ATLAS_NOT_THREAD_SAFE |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 104 of file BSFilePeeker.cxx.
104 {
105
107 bool kvDump=false;
109
110 while ((c = getopt (argc, argv, "vk")) != -1) {
111 switch (c) {
112 case 'v':
114 break;
115 case 'k':
116 kvDump=true;
117 break;
118 default:
119 std::cerr << "Unkown command line option" << std::endl;
120 return -1;
121 }
122 }
123
124
125 const int nfiles=
argc-optind;
126 if (nfiles<=0) {
127 std::cerr << "Expected at least one file name as parameter" << std::endl;
128 return -1;
129 }
130
131
132 std::vector<FileMetaData>
output;
133
134 for (
int iFile=optind;iFile<
argc;++iFile) {
135 const std::string
filename(argv[iFile]);
137
139
140 output.push_back(bsfp.get());
141 }
142
143
144 if (kvDump) {
145 for (const auto& o : output) o.keyValueDump();
146 }
147 else {
148 for (const auto& o : output) o.dump();
149 }
150
151 return 0;
152}