ATLAS Offline Software
Loading...
Searching...
No Matches
CoraCoolFolder.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// CoraCoolFolder.cxx
6// implementation for CoraCoolFolder
7// Richard Hawkings, started 10/2006
8
9#include "RelationalAccess/ISessionProxy.h"
10#include "RelationalAccess/ITransaction.h"
11#include "RelationalAccess/ISchema.h"
12#include "RelationalAccess/ITable.h"
13#include "RelationalAccess/ITableDescription.h"
14#include "RelationalAccess/ITableDataEditor.h"
15#include "RelationalAccess/IBulkOperation.h"
16#include "RelationalAccess/IColumn.h"
17#include "RelationalAccess/IQuery.h"
18#include "RelationalAccess/ICursor.h"
19#include "RelationalAccess/SchemaException.h"
20#include "CoralBase/Attribute.h"
21#include "CoralBase/Exception.h"
22#include "CoolKernel/ValidityKey.h"
23#include "CoolKernel/IDatabase.h"
24#include "CoolKernel/IFolder.h"
25#include "CoolKernel/IObject.h"
26#include "CoolKernel/Record.h"
27#include "CoolKernel/StorageType.h"
30#include "CoraCoolSequence.h"
33
36
37// size of attributelist buffer for write operations
38#define WB_SIZE 256
39
40CoraCoolFolder::CoraCoolFolder(const std::string& coolfolder,
41 coral::ISessionProxy* proxy, cool::IDatabasePtr cooldb,
42 CoraCoolDatabase* coradb, coral::MessageStream& log)
43 :
44 m_foldername(coolfolder),
45 m_proxy(proxy),m_cooldb(std::move(cooldb)),m_coradb(coradb),
46 m_log(log),
49{
50 m_dbname=m_coradb->dbname();
51
52 // get information from COOL
53 m_log << coral::Debug << "Initialize CoraCoolFolder " << coolfolder <<
54 " in database instance " << m_dbname << coral::MessageStream::endmsg;
55
56 std::string folderdesc;
57 try {
59 folderdesc=m_coolfolder->description();
60 }
61 catch (cool::Exception& e) {
62 throw CoraCoolException(e.what(),"CoraCoolFolder::CoraCoolFolder");
63 }
64 m_log << coral::Debug << "COOL Folder description is: " << folderdesc
65 << coral::MessageStream::endmsg;
66
67 // set up linking information between COOL and CORAL folders
68 if (m_coradb->parseFolderDescription(folderdesc,m_tablename,m_keycolcool,
70 m_pkey=(m_keycolcoral!=m_pkeycolcoral);
71 } else {
72 throw CoraCoolException("incorrect <coracool> description string ",
73 "CoraCoolFolder::CoraCoolFolder");
74 }
75
76 // obtain information about CORAL folder
77 try {
78 m_proxy->transaction().start(true);
79 coral::ISchema& schema=m_proxy->nominalSchema();
80 m_table=&schema.tableHandle(m_tablename);
81 m_tabledesc=&(m_table->description());
82 // find type of foreign key
83 // lookup attribute specification for query outputs
84 if (!decodeAttrSpec()) throw CoraCoolException(
85 "Problem extracting attribute specification",
86 "CoraCoolFolder::CoraCoolFolder");
87 m_proxy->transaction().commit();
88 }
89 catch (coral::SessionException& e) {
90 throw CoraCoolException("Problem accessing CORAL table "+m_tablename,
91 "CoraCoolFolder::CoraCoolFolder");
92 }
93}
94
96 delete m_payloadbuf;
97
98 if (m_seqpk) delete m_seqpk;
99 if (m_seqfk) delete m_seqfk;
100}
101
102const cool::IRecordSpecification& CoraCoolFolder::fkSpecification()
103 const
104{ return m_coolfolder->payloadSpecification(); }
105
106const cool::RecordSpecification
108 // have to assemble a RecordSpecification and return the specification
109 // as ITableDescription does not allow to get this directly
110 cool::RecordSpecification atrspec;
111 for (AttrItr itr=m_attrvec.begin();itr!=m_attrvec.end();++itr)
112 atrspec.extend(itr->first,nameToCoolType(itr->second));
113 return atrspec;
114}
115
116coral::AttributeList CoraCoolFolder::emptyAttrList() const {
117 // assemble and return an attributelist for use in constructing payloads
118 coral::AttributeList atrlist;
119 for (AttrItr itr=m_attrvec.begin();itr!=m_attrvec.end();++itr)
120 atrlist.extend(itr->first,
121 cool::StorageType::storageType(nameToCoolType(itr->second)).cppType());
122 return atrlist;
123}
124
125int CoraCoolFolder::storeObject (const cool::ValidityKey& since,
126 const cool::ValidityKey until,
127 const_iterator begin,
128 const_iterator end,
129 const cool::ChannelId& channelId,
130 const std::string& tagName,
131 const bool userTagOnly) {
132 // store objects into CORAL table, and reference in COOL table
133 // generate new FK and PK for CORAL data as needed
134
135 int fkey=0;
136 if (m_bulkactive) {
137 fkey=m_nextfk++;
138 ++m_usedfk;
139 bulkInsert(begin,end,fkey,true);
140 } else {
141 // non-bulk insert
142 // first count number of CORAL rows to be inserted
143 unsigned int nrow=0;
144 for (const_iterator payitr=begin;payitr!=end;++payitr) ++nrow;
145 m_log << coral::Debug << "Storing " << nrow << " rows in CoraCool folder "
146 << m_foldername << " channel " << channelId <<
147 coral::MessageStream::endmsg;
148
149 // generate keys - start transaction here
150 int pkey;
151 try {
152 m_proxy->transaction().start(false);
153 CoraCoolSequence seqfk(m_dbname,m_tablename+"_FK",m_proxy,false);
154 fkey=seqfk.fetch();
155 if (m_pkey) {
156 CoraCoolSequence seqfk(m_dbname,m_tablename+"_PK",m_proxy,false);
157 pkey=seqfk.fetch(nrow);
158 } else {
159 pkey=0; // set to 0 to satisfy compiler
160 }
161 // commit key transaction, releasing lock on keytable
162 m_proxy->transaction().commit();
163 }
164 catch (coral::Exception& e) {
165 throw CoraCoolException(e.what(),"CoraCoolFolder::storeObject(key)");
166 }
167
168 // insert rows into CORAL, using bulk operation
169 try {
170 m_proxy->transaction().start(false);
171 coral::ISchema& schema=m_proxy->nominalSchema();
172 m_table=&schema.tableHandle(m_tablename);
173 coral::ITableDataEditor& editor=m_table->dataEditor();
174 coral::AttributeList data=*begin;
175 coral::IBulkOperation* bulki=editor.bulkInsert(data,WB_SIZE);
176
177 for (const_iterator payitr=begin;payitr!=end;++payitr) {
178 // copy data from iterator
179 data.fastCopyData(*payitr);
180 // update the keys
182 if (m_pkey) setAttrKey(data[m_pkeycolcoral],pkey++);
183 // store data into CORAL table
184 bulki->processNextIteration();
185 }
186 bulki->flush();
187 m_proxy->transaction().commit();
188 }
189 catch (coral::Exception& e) {
190 throw CoraCoolException(e.what(),"CoraCoolFolder::storeObject(payload)");
191 }
192
193 // now store data in COOL, with correct foreign key (bulk/non bulk)
194 // in bulk case, the COOL operation is already going via storage buffer
195 }
196 cool::Record coolfk(m_coolfolder->payloadSpecification());
197 setFieldKey(coolfk[m_keycolcool],fkey);
198 try {
199 m_coolfolder->storeObject(since,until,coolfk,channelId,tagName,
200 userTagOnly);
201 }
202 catch (cool::Exception &e) {
203 throw CoraCoolException(e.what(),"CoraCoolFolder::storeObject");
204 }
205 // return FK value, in case user wants to use it in a reference object call
206 return fkey;
207}
208
209// Actually ok, but marked as not thread-safe due to the copy
210// of the (non-shared) AttributeList.
212 // flush any existing data first to get clean state
214 if (m_payloadbuf==0) {
215 // actions done if this is the first time setupStorageBuffer done for
216 // this folder
217 // create AttributeList as bulk buffer
218 m_payloadbuf=new coral::AttributeList(emptyAttrList());
219 // setup bulk storage for the COOL folder
220 m_coolfolder->setupStorageBuffer();
221 }
222 // setup bulk operation buffer - transaction begins here
223 m_proxy->transaction().start(false);
224 coral::ISchema& schema=m_proxy->nominalSchema();
225 m_table=&schema.tableHandle(m_tablename);
226 coral::ITableDataEditor& editor=m_table->dataEditor();
227 m_bulki=editor.bulkInsert(*m_payloadbuf,WB_SIZE);
228 // prepare the key sequences
229 if (m_pkey) {
230 if (m_seqpk==0)
232 m_seqpk->querySeq(m_nextpk,true,true);
233 m_usedpk=0;
234 }
235 if (m_seqfk==0)
237 m_seqfk->querySeq(m_nextfk,true,true);
238 m_usedfk=0;
239 m_bulkactive=true;
240 return true;
241}
242
244 if (!m_bulkactive) return;
245 // execute bulk store
246 try {
247 m_bulki->flush();
248 // update the keys
249 if (m_usedpk>0) m_seqpk->fetch(m_usedpk);
250 if (m_usedfk>0) m_seqfk->fetch(m_usedfk);
251 // commit transaction for payload table and keys
252 m_proxy->transaction().commit();
253 }
254 catch (coral::Exception& e) {
255 throw CoraCoolException(e.what(),"CoraCoolFolder::flushStorageBuffer");
256 }
257 m_coolfolder->flushStorageBuffer();
258 m_bulkactive=false;
259}
260
261void CoraCoolFolder::referenceObject(const cool::ValidityKey& since,
262 const cool::ValidityKey& until,
263 const coral::Attribute& fkey,
264 const cool::ChannelId& channelId,
265 const std::string& tagName,
266 const bool userTagOnly) {
267 // add reference to existing payload object
268 // call COOL API, just checking fkey has correct name
269 if (fkey.specification().name()==m_keycolcool) {
270 cool::Record fkeylist(m_coolfolder->payloadSpecification());
271 setFieldAttr(fkeylist[m_keycolcool],fkey);
272 m_coolfolder->storeObject(since,until,fkeylist,channelId,tagName,
273 userTagOnly);
274 } else {
275 throw CoraCoolException("Foreign key name should be "+m_keycolcool,
276 "CoraCool::Folder::referenceObject");
277 }
278}
279
280void CoraCoolFolder::referenceObject(const cool::ValidityKey& since,
281 const cool::ValidityKey& until,
282 const int ifkey,
283 const cool::ChannelId& channelId,
284 const std::string& tagName,
285 const bool userTagOnly) {
286 // add reference to existing payload object, supplying key as int
287 cool::Record fkeylist(m_coolfolder->payloadSpecification());
288 setFieldKey(fkeylist[m_keycolcool],ifkey);
289 m_coolfolder->storeObject(since,until,fkeylist,channelId,tagName,
290 userTagOnly);
291}
292
293void CoraCoolFolder::addPayload(const_iterator begin, const_iterator end) { // Copies AttributeList, giving shared specification.
294 // add payload to the CORAL table, using existing FKs in data
295 // but regenerating primary keys
296
297 // only makes sense to use this method for folders with separate pkeys
298 if (!m_pkey) throw CoraCoolException("Folder has no primary key",
299 "CoralCoolFolder::addPayload");
300 if (m_bulkactive) {
301 // via bulk operation buffer
302 bulkInsert(begin,end,0,false);
303 } else {
304 // first count number of CORAL rows to be inserted
305 unsigned int nrow=0;
306 for (const_iterator payitr=begin;payitr!=end;++payitr) ++nrow;
307 m_log << coral::Debug << "Adding " << nrow << " into CoraCool folder "
308 << m_foldername << coral::MessageStream::endmsg;
309 // generate keys - start transaction here
310 int pkey;
311 try {
312 m_proxy->transaction().start(false);
313 CoraCoolSequence seqfk(m_dbname,m_tablename+"_PK",m_proxy,false);
314 pkey=seqfk.fetch(nrow);
315 // commit key transaction, releasing lock on keytable
316 m_proxy->transaction().commit();
317 }
318 catch (coral::Exception& e) {
319 throw CoraCoolException(e.what(),"CoraCoolFolder::addPayload(key)");
320 }
321 // insert rows into CORAL
322 try {
323 m_proxy->transaction().start(false);
324 coral::ISchema& schema=m_proxy->nominalSchema();
325 m_table=&schema.tableHandle(m_tablename);
326 coral::ITableDataEditor& editor=m_table->dataEditor();
327
328 for (const_iterator payitr=begin;payitr!=end;++payitr) {
329 // store data, updating pkey
330 coral::AttributeList data=*payitr;
332 editor.insertRow(data);
333 }
334 m_proxy->transaction().commit();
335 }
336 catch (coral::Exception& e) {
337 throw CoraCoolException(e.what(),"CoraCoolFolder::addPayload(payload)");
338 }
339 }
340}
341
342bool CoraCoolFolder::setAttrKey(coral::Attribute& attr,
343 const int keyval) {
344 // set the value of the key in the attribute, regardless of type
345 const std::string typen=attr.specification().typeName();
346 if (typen=="int") {
347 attr.data<int>()=keyval;
348 } else if (typen=="unsigned int") {
349 attr.data<unsigned int>()=keyval;
350 } else if (typen=="long long") {
351 attr.data<long long>()=keyval;
352 } else if (typen=="unsigned long long") {
353 attr.data<unsigned long long>()=keyval;
354 } else {
355 // throw exception here?
356 m_log << coral::Error << "Unrecognised key type " << typen <<
357 " in CoraCoolFolder::setAttrKey" << coral::MessageStream::endmsg;
358 return false;
359 }
360 return true;
361}
362
363bool CoraCoolFolder::setFieldKey(cool::IField& attr,
364 const int keyval) {
365 // set the value of the key in the Record, regardless of type
366 const cool::StorageType& typen=attr.specification().storageType();
367 if (typen==cool::StorageType::Int32) {
368 attr.setValue<int>(keyval);
369 } else if (typen==cool::StorageType::UInt32) {
370 attr.setValue<unsigned int>(keyval);
371 } else if (typen==cool::StorageType::Int64) {
372 attr.setValue<long long>(keyval);
373 } else if (typen==cool::StorageType::UInt63) {
374 attr.setValue<unsigned long long>(keyval);
375 } else {
376 // throw exception here?
377 m_log << coral::Error << "Unrecognised key type " << typen.name() <<
378 " in CoraCoolFolder::setFieldKey" << coral::MessageStream::endmsg;
379 return false;
380 }
381 return true;
382}
383
384bool CoraCoolFolder::setFieldAttr(cool::IField& attr,
385 const coral::Attribute& keyval) {
386 // set the value of the key in the Record, from input Attribute
387 const cool::StorageType& typen=attr.specification().storageType();
388 if (typen==cool::StorageType::Int32) {
389 attr.setValue<int>(keyval.data<int>());
390 } else if (typen==cool::StorageType::UInt32) {
391 attr.setValue<unsigned int>(keyval.data<unsigned int>());
392 } else if (typen==cool::StorageType::Int64) {
393 attr.setValue<long long>(keyval.data<long long>());
394 } else if (typen==cool::StorageType::UInt63) {
395 attr.setValue<unsigned long long>(keyval.data<unsigned long long>());
396 } else {
397 // throw exception here?
398 m_log << coral::Error << "Unrecognised key type " << typen.name() <<
399 " in CoraCoolFolder::setFieldAttr" << coral::MessageStream::endmsg;
400 return false;
401 }
402 return true;
403}
404
405
406int CoraCoolFolder::getAttrKey(const coral::Attribute& attr) {
407 const std::string typen=attr.specification().typeName();
408 if (typen=="int") {
409 return attr.data<int>();
410 } else if (typen=="unsigned int") {
411 return static_cast<int>(attr.data<unsigned int>());
412 } else if (typen=="long long") {
413 return static_cast<int>(attr.data<long long>());
414 } else if (typen=="unsigned long long") {
415 return static_cast<int>(attr.data<unsigned long long>());
416 } else {
417 m_log << coral::Error << "Unrecognised key type " << typen <<
418 " in CoraCoolFolder::getAttrKey" << coral::MessageStream::endmsg;
419 return 0;
420 }
421}
422
424 // read information from the CORACOOLATTR table
425 bool bres=false;
426 coral::IQuery* query=0;
427 try {
428 coral::ITable& table=m_proxy->nominalSchema().tableHandle(
429 m_dbname+"_CORACOOLATTR");
430 query=table.newQuery();
431 coral::AttributeList bindvar;
432 bindvar.extend<std::string>("SNAME");
433 bindvar[0].data<std::string>()=m_tablename;
434 query->setCondition("NAME=:SNAME",bindvar);
435 query->setRowCacheSize(1);
436 query->defineOutputType("NAME","string");
437 coral::ICursor& cursor=query->execute();
438 if (cursor.next()) {
439 const coral::AttributeList& res=cursor.currentRow();
440 std::string spec=res["ATTRSPEC"].data<std::string>();
441 // decode specification
442 std::string::size_type iofs1,iofs2,iofs3;
443 iofs1=0;
444 bool last=false;
445 while (!last) {
446 iofs2=spec.find(':',iofs1);
447 iofs3=spec.find(',',iofs2);
448 if (iofs3==std::string::npos) {
449 iofs3=spec.size();
450 last=true;
451 }
452 m_attrvec.emplace_back(spec.substr(iofs1,iofs2-iofs1),spec.substr(iofs2+1,iofs3-iofs2-1));
453 if (!last) iofs1=iofs3+1;
454 }
455 bres=true;
456 } else {
457 m_log << coral::Error << "No data obtained for CORACOOLATTR" <<
458 coral::MessageStream::endmsg;
459 }
460 }
461 catch (coral::Exception &e) {
462 m_log << coral::Error << "Exception reading CORACOOLATTR table: "
463 << e.what() << coral::MessageStream::endmsg;
464 }
465 delete query;
466 return bres;
467}
468
469cool::StorageType::TypeId CoraCoolFolder::nameToCoolType(
470 const std::string& coolName) const {
471 if (coolName=="Int16") return cool::StorageType::Int16;
472 if (coolName=="UInt16") return cool::StorageType::UInt16;
473 if (coolName=="Int32") return cool::StorageType::Int32;
474 if (coolName=="UInt32") return cool::StorageType::UInt32;
475 if (coolName=="UInt63") return cool::StorageType::UInt63;
476 if (coolName=="Int64") return cool::StorageType::Int64;
477 if (coolName=="Float") return cool::StorageType::Float;
478 if (coolName=="Double") return cool::StorageType::Double;
479 if (coolName=="String255") return cool::StorageType::String255;
480 if (coolName=="String4k") return cool::StorageType::String4k;
481 if (coolName=="String64k") return cool::StorageType::String64k;
482 if (coolName=="String16M") return cool::StorageType::String16M;
483 if (coolName=="Blob64k") return cool::StorageType::Blob64k;
484
485 throw CoraCoolException("Undefined type: "+coolName,
486 "CoraCoolFolder::nameToCoolType");
487}
488
490 for (AttrItr itr=m_attrvec.begin();itr!=m_attrvec.end();++itr)
491 query->defineOutputType(itr->first,
492 coral::AttributeSpecification::typeNameForId(
493 cool::StorageType::storageType(nameToCoolType(itr->second)).cppType()));
494}
495
497 const int fkey,bool updatefk) {
498 // do bulk insertion into CORAL table buffer
499 // if updateFK=true, update rows with given FK value
500 try {
501 for (const_iterator payitr=begin;payitr!=end;++payitr) {
502 // copy data into buffer bound to bulk insert
503 m_payloadbuf->fastCopyData(*payitr);
504 // update the keys
505 if (updatefk) setAttrKey((*m_payloadbuf)[m_keycolcoral],fkey);
506 if (m_pkey) {
508 ++m_usedpk;
509 }
510 // add to bulk operation
511 m_bulki->processNextIteration();
512 }
513 }
514 catch (coral::Exception& e) {
515 throw CoraCoolException(e.what(),"CoraCoolFolder::bulkInsert");
516 }
517}
518
520 const cool::ValidityKey& pointInTime, const cool::ChannelId& channelId,
521 const std::string& tagName) {
522 // first query cool to get foreign key
523 m_log << coral::Debug << "CoraCoolFolder query time " << pointInTime <<
524 " channel " << channelId << " tag " << tagName << coral::MessageStream::endmsg;
525 cool::IObjectPtr obj=m_coolfolder->findObject(pointInTime,channelId,tagName);
526 // create result object with IOV from COOL
527 CoraCoolObjectPtr result(new CoraCoolObject(obj->since(),obj->until(),
528 obj->channelId()));
529 // now query CORAL for payload
530 try {
531 m_proxy->transaction().start(true);
532 coral::IQuery* query=m_table->newQuery();
533 std::string where=m_keycolcoral+"=:"+m_keycolcool;
534 const coral::AttributeList& fkeybind=obj->payload().attributeList();
535 query->setCondition(where,fkeybind);
536 coral::ICursor& cursor=query->execute();
537 while (cursor.next()) {
538 const coral::AttributeList& res=cursor.currentRow();
539 result->add(res);
540 }
541 delete query;
542 m_proxy->transaction().commit();
543 }
544 catch (coral::Exception& e) {
545 throw CoraCoolException(e.what(),"CoraCoolFolder::findObject");
546 }
547 return result;
548}
549
551 const cool::ValidityKey& pointInTime,
552 const cool::ChannelSelection& channels,
553 const std::string& tagName) {
554 return browseObjects(pointInTime,pointInTime,channels,tagName);
555}
556
558 const cool::ValidityKey& since,
559 const cool::ValidityKey& until,
560 const cool::ChannelSelection& channels,
561 const std::string& tagName)
562{
563 // first initialise COOL query
564 cool::IObjectIteratorPtr coolitr=m_coolfolder->browseObjects(since,until,
565 channels,tagName);
566 CoraCoolObjectIterPtr itr(new CoraCoolObjectIter(this,std::move(coolitr)));
567 return itr;
568}
569
570void CoraCoolFolder::setPrefetchAll(bool prefetchAll) {
571 // pass setting onto COOL - no special actions for CoraCool yet
572 m_coolfolder->setPrefetchAll(prefetchAll);
573}
574
575coral::ITable* CoraCoolFolder::table() {
576 return &(m_proxy->nominalSchema().tableHandle(m_tablename));
577}
#define WB_SIZE
boost::shared_ptr< CoraCoolObject > CoraCoolObjectPtr
boost::shared_ptr< CoraCoolObjectIter > CoraCoolObjectIterPtr
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
std::pair< std::vector< unsigned int >, bool > res
Define macros for attributes used to control the static checker.
std::string m_tablename
const cool::RecordSpecification payloadSpecification() const
coral::ITable * table()
cool::StorageType::TypeId nameToCoolType(const std::string &coolName) const
CoraCoolFolder(const std::string &coolfolder, coral::ISessionProxy *proxy, cool::IDatabasePtr cooldb, CoraCoolDatabase *coradb, coral::MessageStream &log)
cool::IFolderPtr m_coolfolder
std::string m_foldername
void addPayload(const_iterator begin, const_iterator end)
int storeObject(const cool::ValidityKey &since, const cool::ValidityKey until, const_iterator begin, const_iterator end, const cool::ChannelId &channelId=0, const std::string &tagName="", const bool userTagOnly=false)
coral::IBulkOperation * m_bulki
std::string m_keycolcool
void referenceObject(const cool::ValidityKey &since, const cool::ValidityKey &until, const coral::Attribute &fkey, const cool::ChannelId &channelId=0, const std::string &tagName="", const bool userTagOnly=false)
coral::ISessionProxy * proxy()
AttrVec::const_iterator AttrItr
std::string m_dbname
std::string m_keycolcoral
coral::ITable * m_table
coral::MessageStream & m_log
CoraCoolSequence * m_seqfk
std::vector< coral::AttributeList >::const_iterator const_iterator
coral::AttributeList emptyAttrList() const
CoraCoolSequence * m_seqpk
coral::ISessionProxy * m_proxy
void setOutputSpec(coral::IQuery *query)
coral::AttributeList * m_payloadbuf
cool::IDatabasePtr m_cooldb
friend class CoraCoolObjectIter
bool setFieldKey(cool::IField &attr, const int keyval)
int getAttrKey(const coral::Attribute &attr)
CoraCoolObjectPtr findObject(const cool::ValidityKey &pointInTime, const cool::ChannelId &channelId=0, const std::string &tagName="")
const cool::IRecordSpecification & fkSpecification() const
CoraCoolDatabase * m_coradb
bool setAttrKey(coral::Attribute &attr, const int keyval)
std::string m_pkeycolcoral
CoraCoolObjectIterPtr browseObjects(const cool::ValidityKey &pointInTime, const cool::ChannelSelection &channels, const std::string &tagName="")
void setPrefetchAll(const bool prefetchAll)
bool setFieldAttr(cool::IField &attr, const coral::Attribute &keyval)
void bulkInsert(const_iterator begin, const_iterator end, const int fkey, bool updatefk)
int fetch(const int inc=1)
Definition query.py:1
STL namespace.