Skip to content
Snippets Groups Projects
Commit 1e810bf8 authored by Scott Snyder's avatar Scott Snyder Committed by scott snyder
Browse files

FileStager: Fix placement of using directives.

Using directives should not appear in the global namespace in headers.
parent fcb041d0
No related branches found
No related tags found
1 merge request!20779WIP: Migrate DataQualityTools to ToolHandles
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <string> #include <string>
#include <map> #include <map>
using namespace std ;
class TStageFileInfo : public TObject class TStageFileInfo : public TObject
{ {
...@@ -33,14 +32,14 @@ class TStageFileInfo : public TObject ...@@ -33,14 +32,14 @@ class TStageFileInfo : public TObject
virtual ~TStageFileInfo() {}; virtual ~TStageFileInfo() {};
int pid; int pid;
string inFile; std::string inFile;
string outFile; std::string outFile;
Status status; Status status;
#ifndef __CINT__ #ifndef __CINT__
struct stat64 statFile; struct stat64 statFile;
#endif #endif
string stout; std::string stout;
string sterr; std::string sterr;
private: private:
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <map> #include <map>
#include <algorithm> #include <algorithm>
using namespace std ;
class TStagerInfo; class TStagerInfo;
...@@ -49,7 +48,7 @@ class TStageManager : public TObject ...@@ -49,7 +48,7 @@ class TStageManager : public TObject
void releaseFile(const char* fname); void releaseFile(const char* fname);
void releaseAll(); void releaseAll();
const char* getFile(const char* fname); const char* getFile(const char* fname);
const string getTmpFilename(const char* filename); const std::string getTmpFilename(const char* filename);
TStageFileInfo::Status getStatusOf(const char* filename, bool update=true); TStageFileInfo::Status getStatusOf(const char* filename, bool update=true);
void setBaseTmpdir(const char* baseTmpdir); void setBaseTmpdir(const char* baseTmpdir);
...@@ -93,18 +92,18 @@ class TStageManager : public TObject ...@@ -93,18 +92,18 @@ class TStageManager : public TObject
void stageNext(bool forceStage=false); void stageNext(bool forceStage=false);
void updateStatus(); void updateStatus();
void trim(string& input); void trim(std::string& input);
void removePrefixOf(string& filename); void removePrefixOf(std::string& filename);
void removeFile(string filename); void removeFile(std::string filename);
void fixRootInPrefix(string& tmpname); void fixRootInPrefix(std::string& tmpname);
void submitStageMonitor(); void submitStageMonitor();
bool _submittedStageMonitor; bool _submittedStageMonitor;
bool fileExists(const char* fileName); bool fileExists(const char* fileName);
list< string > _toBeStagedList; std::list< std::string > _toBeStagedList;
map<string,TStageFileInfo> _stageMap; std::map<std::string,TStageFileInfo> _stageMap;
static TStagerInfo _stagerInfo; static TStagerInfo _stagerInfo;
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <vector> #include <vector>
#include <map> #include <map>
using namespace std ;
typedef char* pchar; typedef char* pchar;
...@@ -41,15 +40,15 @@ class TStagerInfo : public TObject ...@@ -41,15 +40,15 @@ class TStagerInfo : public TObject
int pipeLength; int pipeLength;
int pid; int pid;
string infilePrefix; std::string infilePrefix;
string outfilePrefix; std::string outfilePrefix;
string logfileDir; std::string logfileDir;
string baseTmpdir; std::string baseTmpdir;
string tmpdir; std::string tmpdir;
string cpcommand; std::string cpcommand;
string stagemonitorcmd; std::string stagemonitorcmd;
vector<string> cparg; std::vector<std::string> cparg;
map<string,string> inPrefixMap; std::map<std::string,std::string> inPrefixMap;
private: private:
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
//#include "TROOT.h" //#include "TROOT.h"
//#include "TEnv.h" //#include "TEnv.h"
using std::string;
ClassImp(TCopyFile) ClassImp(TCopyFile)
bool TCopyFile::_originalTFile=true; bool TCopyFile::_originalTFile=true;
......
...@@ -8,6 +8,14 @@ ...@@ -8,6 +8,14 @@
#include <assert.h> #include <assert.h>
using std::string;
using std::cout;
using std::cerr;
using std::endl;
using std::list;
using std::map;
ClassImp(TStageManager) ClassImp(TStageManager)
......
...@@ -8,6 +8,11 @@ ...@@ -8,6 +8,11 @@
ClassImp(TStagerInfo) ClassImp(TStagerInfo)
using std::string;
using std::cerr;
using std::endl;
TStagerInfo::TStagerInfo() TStagerInfo::TStagerInfo()
: pipeLength(1) : pipeLength(1)
, pid(getpid()) , pid(getpid())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment