ATLAS Offline Software
Classes | Functions
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 330 of file PoolFilePeeker.cxx.

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