8#include "RelationalAccess/ISchema.h"
12std::unique_ptr< coral::IQuery >
16 std::unique_ptr< coral::IQuery >
query( session->nominalSchema().newQuery() );
20 query->addToTableList( table.first, table.second );
25 const std::string & fieldName = bindVar.specification().name();
27 throw std::runtime_error(
"Column " + fieldName +
" has been bound, but not set to a value" );
36 for(
const coral::Attribute & attr :
m_attList ) {
37 query->addToOutputList(attr.specification().name());
46 m_tables.emplace_back(table, table_short);
59 boost::iostreams::stream<boost::iostreams::array_source> stream(
static_cast<const char*
> ( blob.startingAddress()),
61 boost::property_tree::read_json(stream, pt);
66 boost::iostreams::array_source source(json_string.data(), json_string.size());
67 boost::iostreams::stream<boost::iostreams::array_source> stream(source);
68 boost::property_tree::read_json(stream, pt);
75 std::ofstream outFile(outFileName, std::ofstream::binary);
79 outFile.write(
static_cast<const char*
> (
data.startingAddress()),
data.size() );
84 }
catch (
const std::exception& e) {
85 throw FileWritingException(std::format(
"Exception while writing file {} : {}", outFileName, e.what()));
93 std::ofstream outFile(outFileName, std::ofstream::binary);
97 outFile.write(
data.data(),
data.size());
102 }
catch (
const std::exception& e) {
103 throw FileWritingException(std::format(
"Exception while writing file {} : {}", outFileName, e.what()));
char data[hepevt_bytes_allocation_ATLAS]
std::vector< std::pair< std::string, std::string > > m_tables
std::unique_ptr< coral::IQuery > createQuery(coral::ISessionProxy *session)
coral::AttributeList m_bindList
void extendCondition(const std::string &condext)
std::set< std::string > m_bound
void addToTableList(const std::string &table, const std::string &table_short="")
coral::AttributeList m_attList
void stringToPtree(const std::string &json_string, boost::property_tree::ptree &pt)
void writeRawFile(const coral::Blob &data, const std::string &outFileName)
write coral data blob to file
void blobToPtree(const coral::Blob &blob, boost::property_tree::ptree &pt)