ATLAS Offline Software
SimpleUtilityBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef POOL_SIMPLEUTILITYBASE
6 #define POOL_SIMPLEUTILITYBASE
7 
8 #include <iostream>
9 #include <stdexcept>
10 
11 #include "StorageSvc/IStorageSvc.h"
13 #include "StorageSvc/DbType.h"
14 #include "StorageSvc/DbOption.h"
16 
18 
19 namespace pool {
20 
23  {
24  public:
26  SimpleUtilityBase( int argc = 0, char* argv[] = 0 );
27  virtual ~SimpleUtilityBase();
28 
29  virtual int run();
30 
31  virtual bool parseArguments();
32  virtual void startSession ATLAS_NOT_THREAD_SAFE ();
33  virtual void readFileGUIDs();
34  virtual std::string readFileGUID( const std::string& pfn );
35 
36  virtual void execute() {}
37  virtual void printSyntax() {}
38 
39  protected:
40  std::string executableName;
41  std::string technologyName;
42 
43  pool::Session* session = nullptr;
46 
47  std::vector< std::string > args;
48  std::vector< std::string > fileNames;
49  std::vector< std::pair< std::string, std::string > > fidAndPfn;
50  };
51 
52 
54  /* this is a class and not a namespace so it can be autoloaded by ROOT */
55  class Utils {
56  public:
57  static std::string readFileGUID ATLAS_NOT_THREAD_SAFE ( const std::string& pfn );
58  };
59 
60 
61 } // pool namespace
62 #endif
DbOption.h
pool::SimpleUtilityBase::readFileGUID
virtual std::string readFileGUID(const std::string &pfn)
pool::SimpleUtilityBase::technologyName
std::string technologyName
Definition: SimpleUtilityBase.h:41
pool::SimpleUtilityBase::fileNames
std::vector< std::string > fileNames
Definition: SimpleUtilityBase.h:48
pool
pool namespace
Definition: libname.h:15
pool::SimpleUtilityBase::readFileGUIDs
virtual void readFileGUIDs()
pool::IStorageExplorer
Definition: IStorageExplorer.h:53
pool::SimpleUtilityBase::storageSvc
pool::IStorageSvc * storageSvc
Definition: SimpleUtilityBase.h:44
DbType.h
python.oracle.Session
Session
Definition: oracle.py:78
pool::SimpleUtilityBase::fidAndPfn
std::vector< std::pair< std::string, std::string > > fidAndPfn
Definition: SimpleUtilityBase.h:49
pool::SimpleUtilityBase::args
std::vector< std::string > args
Definition: SimpleUtilityBase.h:47
FileDescriptor.h
pool::SimpleUtilityBase::~SimpleUtilityBase
virtual ~SimpleUtilityBase()
pool::SimpleUtilityBase::SimpleUtilityBase
SimpleUtilityBase(int argc=0, char *argv[]=0)
constructor taking commandline parmeters
LArCellNtuple.argv
argv
Definition: LArCellNtuple.py:152
pool::SimpleUtilityBase::storageExplorer
pool::IStorageExplorer * storageExplorer
Definition: SimpleUtilityBase.h:45
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
pool::IStorageSvc
Definition: IStorageSvc.h:56
pool::Utils::ATLAS_NOT_THREAD_SAFE
static std::string readFileGUID ATLAS_NOT_THREAD_SAFE(const std::string &pfn)
pool::SimpleUtilityBase::printSyntax
virtual void printSyntax()
Definition: SimpleUtilityBase.h:37
pool::SimpleUtilityBase
Common base class for POOL utilities.
Definition: SimpleUtilityBase.h:23
IStorageSvc.h
pool::SimpleUtilityBase::executableName
std::string executableName
Definition: SimpleUtilityBase.h:40
IStorageExplorer.h
pool::SimpleUtilityBase::run
virtual int run()
Utils
Definition: CaloCellSelectorUtils.cxx:10
checker_macros.h
Define macros for attributes used to control the static checker.
pool::SimpleUtilityBase::parseArguments
virtual bool parseArguments()
pool::SimpleUtilityBase::ATLAS_NOT_THREAD_SAFE
virtual void startSession ATLAS_NOT_THREAD_SAFE()
pool::SimpleUtilityBase::session
pool::Session * session
Definition: SimpleUtilityBase.h:43
pool::SimpleUtilityBase::execute
virtual void execute()
Definition: SimpleUtilityBase.h:36