you need to use GetBlob, then copy data to it or share point to other buffer.
    // load network
    CAFFE_ENFORCE(workSpace.RunNetOnce(initNet));
    CAFFE_ENFORCE(workSpace.CreateNet(predictNet));

    // load image from file, then convert it to float array.
    float imgArray[3 * 32 * 32];
    loadImage(FLAGS_file, imgArray);

    // define a Tensor which is used to stone input data
    TensorCPU input;
    input.Resize(std::vector<TIndex>({1, 3, 32, 32}));
    input.ShareExternalPointer(imgArray);

    // get "data" blob
#ifdef USE_GPU
    auto data = workSpace.GetBlob("data")->GetMutable<TensorCUDA>();
#else
    auto data = workSpace.GetBlob("data")->GetMutable<TensorCPU>();
#endif

    // copy from input data
    data->CopyFrom(input);

see 03_cpp_forward/main.cpp 20 and Caffe2_Demo 15 for details.