CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/RecoLuminosity/ROOTSchema/src/ROOTFileTransfer.cc

Go to the documentation of this file.
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   int errorCode;
00021   std::stringstream commandLine;
00022 
00023   if( fileName_ == "" ){
00024     // No File set
00025     errorCode = -1;
00026   }else{
00027 
00028     //Transfer File to Offline DB
00029     commandLine.str(std::string());
00030     commandLine << "lumiTransferScript.sh " << dirName_ << " " << fileName_ << " " << fileType_;
00031     std::system(commandLine.str().c_str()); 
00032     
00033   }
00034   return 0;
00035 }
00036