ATLAS Offline Software
Loading...
Searching...
No Matches
pool_extractFileIdentifier.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include <memory>
6
9
10
12public:
13 ExtractFileIdentifierApplication( int argc, char* argv[] );
14
15 bool parseArguments();
16 void execute();
17 void printSyntax();
18};
19
20
24
25
26bool
28{
29 unsigned int excludedArgument = 0;
30 for ( unsigned int iArg = 0; iArg < m_args.size(); ++iArg ) {
31 if ( iArg > 0 && iArg == excludedArgument )
32 continue;
33 const std::string& arg = m_args[iArg];
34 if ( arg == "-t" ) {
35 unsigned int nextArgumentIndex = iArg + 1;
36 if ( nextArgumentIndex < m_args.size() ) {
37 excludedArgument = nextArgumentIndex;
38 m_technologyName = m_args[nextArgumentIndex];
39 }
40 }
41 else {
42 m_fileNames.push_back( arg );
43 }
44 }
46}
47
48
49
50void
52{
53 startSession();
55 for( std::vector< std::pair< std::string, std::string > >::const_iterator iFile = m_fidAndPfn.begin();
56 iFile != m_fidAndPfn.end(); ++iFile ) {
57 std::cout << iFile->first << " (" << iFile->second << ")" << std::endl;
58 }
59}
60
61
62void
64{
65 std::cerr << "Syntax : " << m_executableName << " [-t technologyType] files" << std::endl;
66}
67
68
69
70
71int main ATLAS_NOT_THREAD_SAFE ( int argc, char* argv[] )
72{
73 ExtractFileIdentifierApplication app( argc, argv );
74 return app.run();
75}
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[])
virtual void execute()
virtual int run()
std::string m_executableName
SimpleUtilityBase(int argc=0, char *argv[]=0)
constructor taking commandline parmeters
virtual void printSyntax()
std::vector< std::string > m_args
virtual void startSession ATLAS_NOT_THREAD_SAFE()
std::vector< std::string > m_fileNames
virtual bool parseArguments()
std::vector< std::pair< std::string, std::string > > m_fidAndPfn
std::string m_technologyName
virtual void readFileGUIDs()