ATLAS Offline Software
Loading...
Searching...
No Matches
pool_extractFileIdentifier.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <memory>
6
9
10using namespace pool;
11
12
14public:
15 ExtractFileIdentifierApplication( int argc, char* argv[] );
16
17 bool parseArguments();
18 void execute();
19 void printSyntax();
20};
21
22
26
27
28bool
30{
31 unsigned int excludedArgument = 0;
32 for ( unsigned int iArg = 0; iArg < args.size(); ++iArg ) {
33 if ( iArg > 0 && iArg == excludedArgument )
34 continue;
35 const std::string& arg = args[iArg];
36 if ( arg == "-t" ) {
37 unsigned int nextArgumentIndex = iArg + 1;
38 if ( nextArgumentIndex < args.size() ) {
39 excludedArgument = nextArgumentIndex;
40 technologyName = args[nextArgumentIndex];
41 }
42 }
43 else {
44 fileNames.push_back( arg );
45 }
46 }
48}
49
50
51
52void
54{
55 startSession();
57 for( std::vector< std::pair< std::string, std::string > >::const_iterator iFile = fidAndPfn.begin();
58 iFile != fidAndPfn.end(); ++iFile ) {
59 std::cout << iFile->first << " (" << iFile->second << ")" << std::endl;
60 }
61}
62
63
64void
66{
67 std::cerr << "Syntax : " << executableName << " [-t technologyType] files" << std::endl;
68}
69
70
71
72
73int main ATLAS_NOT_THREAD_SAFE ( int argc, char* argv[] )
74{
75 ExtractFileIdentifierApplication app( argc, argv );
76 return app.run();
77}
int main(int, char **)
Main class for all the CppUnit test classes.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
ExtractFileIdentifierApplication(int argc, char *argv[])
std::vector< std::string > fileNames
virtual void startSession ATLAS_NOT_THREAD_SAFE()
std::vector< std::string > args
virtual void readFileGUIDs()
SimpleUtilityBase(int argc=0, char *argv[]=0)
constructor taking commandline parmeters
virtual bool parseArguments()
std::vector< std::pair< std::string, std::string > > fidAndPfn
Framework include files.
Definition libname.h:15