ATLAS Offline Software
Loading...
Searching...
No Matches
PoolFilePeeker.cxx File Reference
#include "TFile.h"
#include "TTree.h"
#include <iostream>
#include <vector>
#include <string>
#include <chrono>
#include <set>
#include <algorithm>
#include <unistd.h>
#include "EventTPCnv/EventStreamInfo_p3.h"
#include "EventTPCnv/EventStreamInfo_p2.h"
#include "IOVDbTPCnv/IOVMetaDataContainer_p1.h"
#include "ByteStreamEventTPCnv/ByteStreamMetadata_p1.h"
#include "FileMetaData.h"
#include "CxxUtils/checker_macros.h"

Go to the source code of this file.

Classes

class  PoolFilePeeker

Functions

int main ATLAS_NOT_THREAD_SAFE (int argc, char **argv)

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

int main ATLAS_NOT_THREAD_SAFE ( int argc,
char ** argv )

Definition at line 329 of file PoolFilePeeker.cxx.

329 {
330
331 bool verbose=false;
332 bool kvDump=false;
333 int c;
334
335 while ((c = getopt (argc, argv, "vk")) != -1) {
336 switch (c) {
337 case 'v':
338 verbose=true;
339 break;
340 case 'k':
341 kvDump=true;
342 break;
343 default:
344 std::cerr << "Unkown command line option" << std::endl;
345 return -1;
346 }
347 }
348
349 const int nfiles=argc-optind;
350 if (nfiles<=0) {
351 std::cerr << "Expected at least one file name as parameter" << std::endl;
352 return -1;
353 }
354
355
356 std::vector<FileMetaData> output;
357
358 for (int iFile=optind;iFile<argc;++iFile) {
359 const char* filename=argv[iFile];
360 if (verbose) std::cout << "Checking file " << filename << std::endl;
361
362 PoolFilePeeker pfp(filename,verbose);
363
364 output.push_back(pfp.get());
365 }//end loop over input file names
366
367
368
369 if (kvDump) {
370 for (const auto& o : output) o.keyValueDump();
371 }
372 else {
373 for (const auto& o : output) o.dump();
374 }
375
376 return 0;
377}
bool verbose
Definition hcg.cxx:75
output
Definition merge.py:16