00001 #include "RecoLuminosity/ROOTSchema/interface/ROOTFileTransfer.h" 00002 #include <sstream> 00003 #include <cstdlib> 00004 00005 HCAL_HLX::ROOTFileTransfer::ROOTFileTransfer():fileName_(""), 00006 dirName_(""), 00007 fileType_("RAW") 00008 {} 00009 00010 HCAL_HLX::ROOTFileTransfer::~ROOTFileTransfer(){} 00011 00012 00013 void HCAL_HLX::ROOTFileTransfer::SetFileType( const std::string &fileType ){ 00014 00015 fileType_ = fileType; 00016 } 00017 00018 int HCAL_HLX::ROOTFileTransfer::TransferFile(){ 00019 00020 std::stringstream commandLine; 00021 00022 if( fileName_ != "" ){ 00023 00024 //Transfer File to Offline DB 00025 commandLine.str(std::string()); 00026 commandLine << "lumiTransferScript.sh " << dirName_ << " " << fileName_ << " " << fileType_; 00027 std::system(commandLine.str().c_str()); 00028 00029 } 00030 return 0; 00031 } 00032