CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/Utilities/StorageFactory/src/RemoteFile.cc File Reference

#include "Utilities/StorageFactory/interface/RemoteFile.h"
#include "Utilities/StorageFactory/src/Throw.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <sys/wait.h>
#include <sys/types.h>
#include <cerrno>
#include <cassert>
#include <spawn.h>
#include <unistd.h>
#include <ostream>
#include <cstring>

Go to the source code of this file.

Functions

static std::string join (char **cmd)

Function Documentation

static std::string join ( char **  cmd) [static]

Definition at line 18 of file RemoteFile.cc.

References AlCaHLTBitMon_ParallelJobs::p, query::result, and findQualityFiles::size.

Referenced by CommonHcalNoiseRBXData::CommonHcalNoiseRBXData(), reco::HcalNoiseInfoProducer::fillOtherSummaryVariables(), RemoteFile::get(), and ThePEG::HepMCConverter< HepMCEventT, Traits >::init().

{
  size_t size = 0;
  for (char **p = cmd; p && p[0]; ++p)
    size += 1 + strlen(*p);

  std::string result;
  result.reserve (size);

  for (char **p = cmd; p && p[0]; ++p)
  {
    if (p != cmd)
      result += ' ';
    result += *p;
  }

  return result;
}