CMS 3D CMS Logo

IOVSchema.cc
Go to the documentation of this file.
3 #include "IOVSchema.h"
4 //
5 #include <openssl/sha.h>
6 
7 namespace cond {
8 
9  namespace persistency {
10 
11  cond::Hash makeHash(const std::string& objectType, const cond::Binary& data) {
12  SHA_CTX ctx;
13  if (!SHA1_Init(&ctx)) {
14  throwException("SHA1 initialization error.", "IOVSchema::makeHash");
15  }
16  if (!SHA1_Update(&ctx, objectType.c_str(), objectType.size())) {
17  throwException("SHA1 processing error (1).", "IOVSchema::makeHash");
18  }
19  if (!SHA1_Update(&ctx, data.data(), data.size())) {
20  throwException("SHA1 processing error (2).", "IOVSchema::makeHash");
21  }
22  unsigned char hash[SHA_DIGEST_LENGTH];
23  if (!SHA1_Final(hash, &ctx)) {
24  throwException("SHA1 finalization error.", "IOVSchema::makeHash");
25  }
26 
27  char tmp[SHA_DIGEST_LENGTH * 2 + 1];
28  // re-write bytes in hex
29  for (unsigned int i = 0; i < 20; i++) {
30  ::sprintf(&tmp[i * 2], "%02x", hash[i]);
31  }
32  tmp[20 * 2] = 0;
33  return tmp;
34  }
35 
36  TAG::Table::Table(coral::ISchema& schema) : m_schema(schema) {
37  if (exists()) {
38  std::set<std::string> columns;
39  int ncols = m_schema.tableHandle(tname).description().numberOfColumns();
40  for (int i = 0; i < ncols; i++)
41  columns.insert(m_schema.tableHandle(tname).description().columnDescription(i).name());
43  }
44  }
45 
46  bool TAG::Table::Table::exists() { return existsTable(m_schema, tname); }
47 
49  if (exists()) {
50  throwException("TAG table already exists in this schema.", "TAG::Table::create");
51  }
53  TIME_TYPE,
62  descr(tname);
63  descr.setPrimaryKey<NAME>();
64  createTable(m_schema, descr.get());
65  m_isProtectable = true;
66  }
67 
69  Query<NAME> q(m_schema);
70  q.addCondition<NAME>(name);
71  for (auto row : q) {
72  }
73 
74  return q.retrievedRows();
75  }
76 
78  cond::TimeType& timeType,
79  std::string& objectType,
80  cond::SynchronizationType& synchronizationType,
81  cond::Time_t& endOfValidity,
82  cond::Time_t& lastValidatedTime,
83  int& protectionCode) {
84  if (isProtectable()) {
86  m_schema);
87  q.addCondition<NAME>(name);
88  for (const auto& row : q)
89  std::tie(timeType, objectType, synchronizationType, endOfValidity, lastValidatedTime, protectionCode) = row;
90  return q.retrievedRows();
91  } else {
93  q.addCondition<NAME>(name);
94  for (const auto& row : q)
95  std::tie(timeType, objectType, synchronizationType, endOfValidity, lastValidatedTime) = row;
96  protectionCode = 0;
97 
98  return q.retrievedRows();
99  }
100  }
101 
104  boost::posix_time::ptime& insertionTime,
105  boost::posix_time::ptime& modificationTime) {
107  q.addCondition<NAME>(name);
108  for (const auto& row : q)
109  std::tie(description, insertionTime, modificationTime) = row;
110  return q.retrievedRows();
111  }
112 
114  cond::TimeType timeType,
115  const std::string& objectType,
116  cond::SynchronizationType synchronizationType,
117  cond::Time_t endOfValidity,
118  const std::string& description,
119  cond::Time_t lastValidatedTime,
120  const boost::posix_time::ptime& insertionTime) {
121  if (isProtectable()) {
122  RowBuffer<NAME,
123  TIME_TYPE,
124  OBJECT_TYPE,
127  DESCRIPTION,
132  dataToInsert(std::tie(name,
133  timeType,
134  objectType,
135  synchronizationType,
136  endOfValidity,
137  description,
138  lastValidatedTime,
139  insertionTime,
140  insertionTime,
142  insertInTable(m_schema, tname, dataToInsert.get());
143  } else {
144  RowBuffer<NAME,
145  TIME_TYPE,
146  OBJECT_TYPE,
149  DESCRIPTION,
153  dataToInsert(std::tie(name,
154  timeType,
155  objectType,
156  synchronizationType,
157  endOfValidity,
158  description,
159  lastValidatedTime,
160  insertionTime,
161  insertionTime));
162  insertInTable(m_schema, tname, dataToInsert.get());
163  }
164  }
165 
167  cond::SynchronizationType synchronizationType,
168  cond::Time_t& endOfValidity,
169  cond::Time_t lastValidatedTime,
170  const boost::posix_time::ptime& updateTime) {
173  std::tie(synchronizationType, endOfValidity, lastValidatedTime, updateTime));
174  buffer.addWhereCondition<NAME>(name);
175  updateTable(m_schema, tname, buffer);
176  }
177 
179  const std::string& description,
180  const boost::posix_time::ptime& updateTime) {
182  buffer.setColumnData<DESCRIPTION, MODIFICATION_TIME>(std::tie(description, updateTime));
183  buffer.addWhereCondition<NAME>(name);
184  updateTable(m_schema, tname, buffer);
185  }
186 
188  cond::Time_t lastValidatedTime,
189  const boost::posix_time::ptime& updateTime) {
191  buffer.setColumnData<LAST_VALIDATED_TIME, MODIFICATION_TIME>(std::tie(lastValidatedTime, updateTime));
192  buffer.addWhereCondition<NAME>(name);
193  updateTable(m_schema, tname, buffer);
194  }
195 
197  if (!isProtectable()) {
198  throwException("Tag in this schema are not protectable.", "TAG::Table::create");
199  }
200  Query<PROTECTION_CODE> q(m_schema);
201  q.addCondition<NAME>(name);
202  int newCode = 0;
203  for (const auto& row : q)
204  std::tie(newCode) = row;
205  newCode |= code;
207  buffer.setColumnData<PROTECTION_CODE>(std::tie(newCode));
208  buffer.addWhereCondition<NAME>(name);
209  updateTable(m_schema, tname, buffer);
210  }
211 
213  if (!isProtectable()) {
214  throwException("Tag in this schema are not protectable.", "TAG::Table::unsetProtectionCode");
215  }
216  Query<PROTECTION_CODE> q(m_schema);
217  q.addCondition<NAME>(name);
218  int presentCode = 0;
219  for (const auto& row : q)
220  std::tie(presentCode) = row;
221  int newCode = presentCode & (~code);
223  buffer.setColumnData<PROTECTION_CODE>(std::tie(newCode));
224  buffer.addWhereCondition<NAME>(name);
225  updateTable(m_schema, tname, buffer);
226  }
227 
228  IOV::Table::Table(coral::ISchema& schema) : m_schema(schema) {}
229 
230  bool IOV::Table::exists() { return existsTable(m_schema, tname); }
231 
233  if (exists()) {
234  throwException("IOV table already exists in this schema.", "IOV::Schema::create");
235  }
236 
239  descr.setForeignKey<TAG_NAME, TAG::NAME>("TAG_NAME_FK");
240  descr.setForeignKey<PAYLOAD_HASH, PAYLOAD::HASH>("PAYLOAD_HASH_FK");
241  createTable(m_schema, descr.get());
242  }
243 
245  const boost::posix_time::ptime& snapshotTime,
246  unsigned long long gSize,
247  std::vector<cond::Time_t>& groups) {
248  Query<SINCE_GROUP> q(m_schema, true);
249  q.addCondition<TAG_NAME>(tag);
250  if (!snapshotTime.is_not_a_date_time()) {
251  q.addCondition<INSERTION_TIME>(snapshotTime, "<=");
252  }
253  q.groupBy(SINCE_GROUP::group(gSize));
254  q.addOrderClause<SINCE_GROUP>();
255  for (auto row : q) {
256  groups.push_back(std::get<0>(row));
257  }
258  return q.retrievedRows();
259  }
260 
262  cond::Time_t lowerSinceGroup,
263  cond::Time_t upperSinceGroup,
264  const boost::posix_time::ptime& snapshotTime,
265  std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs) {
266  Query<SINCE, PAYLOAD_HASH> q(m_schema);
267  q.addCondition<TAG_NAME>(tag);
268  if (lowerSinceGroup > 0)
269  q.addCondition<SINCE>(lowerSinceGroup, ">=");
270  if (upperSinceGroup < cond::time::MAX_VAL)
271  q.addCondition<SINCE>(upperSinceGroup, "<");
272  if (!snapshotTime.is_not_a_date_time()) {
273  q.addCondition<INSERTION_TIME>(snapshotTime, "<=");
274  }
275  q.addOrderClause<SINCE>();
276  q.addOrderClause<INSERTION_TIME>(false);
277  size_t initialSize = iovs.size();
278  for (auto row : q) {
279  // starting from the second iov in the array, skip the rows with older timestamp
280  if (iovs.size() - initialSize && std::get<0>(iovs.back()) == std::get<0>(row))
281  continue;
282  iovs.push_back(row);
283  }
284  return iovs.size() - initialSize;
285  }
286 
288  const boost::posix_time::ptime& snapshotTime,
290  cond::Hash& hash) {
291  Query<SINCE, PAYLOAD_HASH> q(m_schema);
292  q.addCondition<TAG_NAME>(tag);
293  if (!snapshotTime.is_not_a_date_time()) {
294  q.addCondition<INSERTION_TIME>(snapshotTime, "<=");
295  }
296  q.addOrderClause<SINCE>(false);
297  q.addOrderClause<INSERTION_TIME>(false);
298  q.limitReturnedRows(1);
299  for (auto row : q) {
300  since = std::get<0>(row);
301  hash = std::get<1>(row);
302  return true;
303  }
304  return false;
305  }
306 
307  bool IOV::Table::getSize(const std::string& tag, const boost::posix_time::ptime& snapshotTime, size_t& size) {
308  Query<SEQUENCE_SIZE> q(m_schema);
309  q.addCondition<TAG_NAME>(tag);
310  if (!snapshotTime.is_not_a_date_time()) {
311  q.addCondition<INSERTION_TIME>(snapshotTime, "<=");
312  }
313  for (auto row : q) {
314  size = std::get<0>(row);
315  return true;
316  }
317  return false;
318  }
319 
321  cond::Time_t begin,
323  const boost::posix_time::ptime& snapshotTime,
324  std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs) {
325  Query<MAX_SINCE> q0(m_schema);
326  q0.addCondition<TAG_NAME>(tag);
327  q0.addCondition<SINCE>(begin, "<=");
328  if (!snapshotTime.is_not_a_date_time()) {
329  q0.addCondition<INSERTION_TIME>(snapshotTime, "<=");
330  }
331  cond::Time_t lower_since = 0;
332  for (auto row : q0) {
333  lower_since = std::get<0>(row);
334  }
335  if (!lower_since)
336  return false;
337  Query<SINCE, PAYLOAD_HASH> q1(m_schema);
338  q1.addCondition<TAG_NAME>(tag);
339  q1.addCondition<SINCE>(lower_since, ">=");
340  if (!snapshotTime.is_not_a_date_time()) {
341  q1.addCondition<INSERTION_TIME>(snapshotTime, "<=");
342  }
343  q1.addCondition<SINCE>(end, "<=");
344  q1.addOrderClause<SINCE>();
345  q1.addOrderClause<INSERTION_TIME>(false);
346  size_t initialSize = iovs.size();
347  for (auto row : q1) {
348  // starting from the second iov in the array, skip the rows with older timestamp
349  if (iovs.size() - initialSize && std::get<0>(iovs.back()) == std::get<0>(row))
350  continue;
351  iovs.push_back(row);
352  }
353  return iovs.size() - initialSize;
354  }
355 
358  cond::Hash payloadHash,
359  const boost::posix_time::ptime& insertTimeStamp) {
361  std::tie(tag, since, payloadHash, insertTimeStamp));
362  insertInTable(m_schema, tname, dataToInsert.get());
363  }
364 
366  const std::string& tag,
367  const std::vector<std::tuple<cond::Time_t, cond::Hash, boost::posix_time::ptime> >& iovs) {
369  for (auto row : iovs)
370  inserter.insert(std::tuple_cat(std::tie(tag), row));
371  inserter.flush();
372  }
373 
376  buffer.addWhereCondition<TAG_NAME>(tag);
377  buffer.addWhereCondition<SINCE>(since);
378  buffer.addWhereCondition<PAYLOAD_HASH>(payloadId);
379  deleteFromTable(m_schema, tname, buffer);
380  }
381 
382  void IOV::Table::eraseMany(const std::string& tag, const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs) {
384  for (auto iov : iovs)
385  deleter.erase(std::tuple_cat(std::tie(tag), iov));
386  deleter.flush();
387  }
388 
391  buffer.addWhereCondition<TAG_NAME>(tag);
392  deleteFromTable(m_schema, tname, buffer);
393  }
394 
395  TAG_LOG::Table::Table(coral::ISchema& schema) : m_schema(schema) {}
396 
397  bool TAG_LOG::Table::exists() { return existsTable(m_schema, tname); }
398 
400  if (exists()) {
401  throwException("TAG_LOG table already exists in this schema.", "TAG_LOG::create");
402  }
405  descr.setForeignKey<TAG_NAME, TAG::NAME>("TAG_NAME_FK");
406  createTable(m_schema, descr.get());
407  }
408 
410  const boost::posix_time::ptime& eventTime,
411  const std::string& userName,
412  const std::string& hostName,
413  const std::string& command,
414  const std::string& action,
415  const std::string& userText) {
417  std::tie(tag, eventTime, userName, hostName, command, action, userText));
418  insertInTable(m_schema, tname, dataToInsert.get());
419  }
420 
421  TAG_AUTHORIZATION::Table::Table(coral::ISchema& schema) : m_schema(schema) {}
422 
423  bool TAG_AUTHORIZATION::Table::exists() { return existsTable(m_schema, tname); }
424 
426  if (exists()) {
427  throwException("TAG_AUTHORIZATION table already exists in this schema.", "TAG_AUTHORIZATION::create");
428  }
431  descr.setForeignKey<TAG_NAME, TAG::NAME>("TAG_NAME_FK");
432  createTable(m_schema, descr.get());
433  }
434 
436  const std::string& credential,
437  int credentialType,
438  int accessType) {
439  Query<ACCESS_TYPE> q(m_schema);
440  q.addCondition<TAG_NAME>(tagName);
441  q.addCondition<CREDENTIAL>(credential);
442  q.addCondition<CREDENTIAL_TYPE>(credentialType);
443  int allowedAccess = 0;
444  for (auto row : q) {
445  allowedAccess = std::get<0>(row);
446  }
447  return allowedAccess & accessType;
448  }
449 
451  const std::string& credential,
452  int credentialType,
453  int accessType) {
455  std::tie(tagName, accessType, credential, credentialType));
456  insertInTable(m_schema, tname, dataToInsert.get());
457  }
458 
460  const std::string& credential,
461  int credentialType) {
463  buffer.addWhereCondition<TAG_NAME>(tagName);
464  buffer.addWhereCondition<CREDENTIAL>(credential);
465  buffer.addWhereCondition<CREDENTIAL_TYPE>(credentialType);
466  deleteFromTable(m_schema, tname, buffer);
467  }
468 
469  void TAG_AUTHORIZATION::Table::removeEntriesForCredential(const std::string& credential, int credentialType) {
471  buffer.addWhereCondition<CREDENTIAL>(credential);
472  buffer.addWhereCondition<CREDENTIAL_TYPE>(credentialType);
473  deleteFromTable(m_schema, tname, buffer);
474  }
475 
476  PAYLOAD::Table::Table(coral::ISchema& schema) : m_schema(schema) {}
477 
478  bool PAYLOAD::Table::exists() { return existsTable(m_schema, tname); }
479 
481  if (exists()) {
482  throwException("Payload table already exists in this schema.", "PAYLOAD::Schema::create");
483  }
484 
486  descr.setPrimaryKey<HASH>();
487  createTable(m_schema, descr.get());
488  }
489 
490  bool PAYLOAD::Table::select(const cond::Hash& payloadHash) {
491  Query<HASH> q(m_schema);
492  q.addCondition<HASH>(payloadHash);
493  for (auto row : q) {
494  }
495 
496  return q.retrievedRows();
497  }
498 
499  bool PAYLOAD::Table::getType(const cond::Hash& payloadHash, std::string& objectType) {
500  Query<OBJECT_TYPE> q(m_schema);
501  q.addCondition<HASH>(payloadHash);
502  for (auto row : q) {
503  objectType = std::get<0>(row);
504  }
505 
506  return q.retrievedRows();
507  }
508 
509  bool PAYLOAD::Table::select(const cond::Hash& payloadHash,
510  std::string& objectType,
511  cond::Binary& payloadData,
512  cond::Binary& streamerInfoData) {
514  q.addCondition<HASH>(payloadHash);
515  for (const auto& row : q) {
516  std::tie(payloadData, streamerInfoData, objectType) = row;
517  }
518  return q.retrievedRows();
519  }
520 
521  bool PAYLOAD::Table::insert(const cond::Hash& payloadHash,
522  const std::string& objectType,
523  const cond::Binary& payloadData,
524  const cond::Binary& streamerInfoData,
525  const boost::posix_time::ptime& insertionTime) {
526  std::string version("dummy");
527  cond::Binary sinfoData(streamerInfoData);
528  if (!sinfoData.size())
529  sinfoData.copy(std::string("0"));
531  std::tie(payloadHash, objectType, payloadData, sinfoData, version, insertionTime));
532  bool failOnDuplicate = false;
533  return insertInTable(m_schema, tname, dataToInsert.get(), failOnDuplicate);
534  }
535 
537  const cond::Binary& payloadData,
538  const cond::Binary& streamerInfoData,
539  const boost::posix_time::ptime& insertionTime) {
540  cond::Hash payloadHash = makeHash(payloadObjectType, payloadData);
541  // the check on the hash existance is only required to avoid the error message printing in SQLite! once this is removed, this check is useless...
542  if (!select(payloadHash)) {
543  insert(payloadHash, payloadObjectType, payloadData, streamerInfoData, insertionTime);
544  }
545  return payloadHash;
546  }
547 
548  IOVSchema::IOVSchema(coral::ISchema& schema)
549  : m_tagTable(schema),
550  m_iovTable(schema),
551  m_tagLogTable(schema),
552  m_tagAccessPermissionTable(schema),
553  m_payloadTable(schema) {}
554 
556  if (!m_tagTable.exists())
557  return false;
558  if (!m_payloadTable.exists())
559  return false;
560  if (!m_iovTable.exists())
561  return false;
562  return true;
563  }
564 
566  bool created = false;
567  if (!exists()) {
568  m_tagTable.create();
570  m_iovTable.create();
573  created = true;
574  }
575  return created;
576  }
577 
579 
581 
583 
585  if (!m_tagTable.isProtectable()) {
586  throwException("Tag in this schema are not protectable.", "IOVSchema::tagAccessPermissionTable");
587  }
589  }
590 
592 
593  } // namespace persistency
594 } // namespace cond
cond::persistency::IOV::Table::Table
Table(coral::ISchema &schema)
Definition: IOVSchema.cc:228
cond::persistency::IOVSchema::exists
bool exists() override
Definition: IOVSchema.cc:555
cond::persistency::IOVSchema::m_tagTable
TAG::Table m_tagTable
Definition: IOVSchema.h:260
cond::persistency::TAG_AUTHORIZATION::TAG_NAME
Definition: IOVSchema.h:190
hgcalPlots.ncols
ncols
Definition: hgcalPlots.py:105
cond::persistency::PAYLOAD::Table::insert
bool insert(const cond::Hash &payloadHash, const std::string &objectType, const cond::Binary &payloadData, const cond::Binary &streamerInfoData, const boost::posix_time::ptime &insertionTime)
Definition: IOVSchema.cc:521
cond::persistency::TAG::Table::updateMetadata
void updateMetadata(const std::string &name, const std::string &description, const boost::posix_time::ptime &updateTime) override
Definition: IOVSchema.cc:178
mps_fire.i
i
Definition: mps_fire.py:428
cond::persistency::IOV::Table::eraseMany
void eraseMany(const std::string &tag, const std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs) override
Definition: IOVSchema.cc:382
cond::TimeType
TimeType
Definition: Time.h:19
cond::persistency::IOV::SINCE
Definition: IOVSchema.h:112
cond::persistency::IOV::Table::erase
void erase(const std::string &tag) override
Definition: IOVSchema.cc:389
cond::persistency::IOV::Table::eraseOne
void eraseOne(const std::string &tag, cond::Time_t since, cond::Hash payloadId) override
Definition: IOVSchema.cc:374
Exception.h
cond::Hash
std::string Hash
Definition: Types.h:43
IOVSchema.h
cond::persistency::TAG_AUTHORIZATION::CREDENTIAL_TYPE
Definition: IOVSchema.h:193
cond::Binary
Definition: Binary.h:15
cond::persistency::TAG::PROTECTION_CODE::name
static constexpr char const * name
Definition: IOVSchema.h:23
cond::persistency::IOV::SINCE_GROUP
Definition: IOVSchema.h:116
cond::hash
Definition: Time.h:19
cond::persistency::IOV::Table::exists
bool exists() override
Definition: IOVSchema.cc:230
deleter
Definition: QcdLowPtDQM.cc:34
edmLumisInFiles.description
description
Definition: edmLumisInFiles.py:11
cond::persistency::ITagAccessPermissionTable
Definition: IDbSchema.h:108
cond::persistency::TAG_LOG::Table::Table
Table(coral::ISchema &schema)
Definition: IOVSchema.cc:395
singleTopDQM_cfi.select
select
Definition: singleTopDQM_cfi.py:50
cond::persistency::TAG_LOG::Table::create
void create() override
Definition: IOVSchema.cc:399
cond::persistency::TAG_AUTHORIZATION::Table::setAccessPermission
void setAccessPermission(const std::string &tagName, const std::string &credential, int credentialType, int accessType) override
Definition: IOVSchema.cc:450
cond::persistency::TAG::Table::update
void update(const std::string &name, cond::SynchronizationType synchronizationType, cond::Time_t &endOfValidity, cond::Time_t lastValidatedTime, const boost::posix_time::ptime &updateTime) override
Definition: IOVSchema.cc:166
cond::persistency::IOVSchema::m_payloadTable
PAYLOAD::Table m_payloadTable
Definition: IOVSchema.h:264
cond::persistency::TAG_LOG::Table::insert
void insert(const std::string &tag, const boost::posix_time::ptime &eventTime, const std::string &userName, const std::string &hostName, const std::string &command, const std::string &action, const std::string &userText) override
Definition: IOVSchema.cc:409
loadRecoTauTagMVAsFromPrepDB_cfi.snapshotTime
snapshotTime
Definition: loadRecoTauTagMVAsFromPrepDB_cfi.py:10
cond::persistency::TAG::Table::insert
void insert(const std::string &name, cond::TimeType timeType, const std::string &objectType, cond::SynchronizationType synchronizationType, cond::Time_t endOfValidity, const std::string &description, cond::Time_t lastValidatedTime, const boost::posix_time::ptime &insertionTime) override
Definition: IOVSchema.cc:113
cond::persistency::BulkInserter::flush
void flush()
Definition: DbCore.h:694
cond::persistency::TAG_LOG::TAG_NAME
Definition: IOVSchema.h:220
cond::persistency::TAG_LOG::EVENT_TIME
Definition: IOVSchema.h:221
cond::persistency::IOVSchema::m_tagLogTable
TAG_LOG::Table m_tagLogTable
Definition: IOVSchema.h:262
cond::persistency::TAG::MODIFICATION_TIME
Definition: IOVSchema.h:22
cond::persistency::IOVSchema::tagLogTable
ITagLogTable & tagLogTable() override
Definition: IOVSchema.cc:582
mps_check.command
list command
Definition: mps_check.py:25
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
cond::persistency::makeHash
cond::Hash makeHash(const std::string &objectType, const cond::Binary &data)
Definition: IOVSchema.cc:11
cond::Binary::copy
void copy(const std::string &source)
Definition: Binary.cc:32
EcalCondDBWriter_cfi.userName
userName
Definition: EcalCondDBWriter_cfi.py:61
cond::Binary::size
size_t size() const
Definition: Binary.cc:48
cond::persistency::IOVSchema::tagAccessPermissionTable
ITagAccessPermissionTable & tagAccessPermissionTable() override
Definition: IOVSchema.cc:584
edmScanValgrind.buffer
buffer
Definition: edmScanValgrind.py:171
cond::persistency::TAG::END_OF_VALIDITY
Definition: IOVSchema.h:18
cond::persistency::TAG::LAST_VALIDATED_TIME
Definition: IOVSchema.h:20
cond::persistency::TAG_AUTHORIZATION::CREDENTIAL
Definition: IOVSchema.h:192
cond::persistency::TAG_AUTHORIZATION::tname
static constexpr char const * tname
Definition: IOVSchema.h:189
cond::persistency::IOV::Table::select
size_t select(const std::string &tag, cond::Time_t lowerGroup, cond::Time_t upperGroup, const boost::posix_time::ptime &snapshotTime, std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs) override
Definition: IOVSchema.cc:261
cond::persistency::IOV::INSERTION_TIME
Definition: IOVSchema.h:114
cond::persistency::IOV::PAYLOAD_HASH
Definition: IOVSchema.h:113
cond::persistency::IPayloadTable
Definition: IDbSchema.h:55
cond::persistency::PAYLOAD::Table::Table
Table(coral::ISchema &schema)
Definition: IOVSchema.cc:476
cond::persistency::IOVSchema::create
bool create() override
Definition: IOVSchema.cc:565
cond::persistency::TableDescription::get
const coral::TableDescription & get()
Definition: DbCore.h:338
cond::SynchronizationType
SynchronizationType
Definition: Types.h:27
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
cond::persistency::TAG::Table::updateValidity
void updateValidity(const std::string &name, cond::Time_t lastValidatedTime, const boost::posix_time::ptime &updateTime) override
Definition: IOVSchema.cc:187
cond::persistency::TAG::tname
static constexpr char const * tname
Definition: IOVSchema.h:13
cond::persistency::TAG::Table::setProtectionCode
void setProtectionCode(const std::string &name, int code) override
Definition: IOVSchema.cc:196
cond::persistency::IOVSchema::payloadTable
IPayloadTable & payloadTable() override
Definition: IOVSchema.cc:591
cond::persistency::TAG::Table::select
bool select(const std::string &name) override
Definition: IOVSchema.cc:68
mps_fire.end
end
Definition: mps_fire.py:242
writeEcalDQMStatus.since
since
Definition: writeEcalDQMStatus.py:53
cond::persistency::TAG::DESCRIPTION
Definition: IOVSchema.h:19
cond::persistency::TAG_LOG::tname
static constexpr char const * tname
Definition: IOVSchema.h:219
cond::persistency::IOV::SINCE_GROUP::group
static std::string group(unsigned long long groupSize)
Definition: IOVSchema.h:121
cond::persistency::PAYLOAD::Table::create
void create() override
Definition: IOVSchema.cc:480
cond::persistency::TAG::PROTECTION_CODE
Definition: IOVSchema.h:23
cond::persistency::PAYLOAD::Table::exists
bool exists() override
Definition: IOVSchema.cc:478
cond::persistency::IOV::Table::insertMany
void insertMany(const std::string &tag, const std::vector< std::tuple< cond::Time_t, cond::Hash, boost::posix_time::ptime > > &iovs) override
Definition: IOVSchema.cc:365
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond::persistency::TAG::Table::exists
bool exists() override
cond::persistency::PAYLOAD::HASH
Definition: IOVSchema.h:76
cond
Definition: plugin.cc:23
cond::persistency::UpdateBuffer
Definition: DbCore.h:602
cond::persistency::IOV::Table::getLastIov
bool getLastIov(const std::string &tag, const boost::posix_time::ptime &snapshotTime, cond::Time_t &since, cond::Hash &hash) override
Definition: IOVSchema.cc:287
cond::persistency::IOV::Table::insertOne
void insertOne(const std::string &tag, cond::Time_t since, cond::Hash payloadHash, const boost::posix_time::ptime &insertTime) override
Definition: IOVSchema.cc:356
cond::persistency::IOV::tname
static constexpr char const * tname
Definition: IOVSchema.h:110
q1
double q1[4]
Definition: TauolaWrapper.h:87
cond::persistency::BulkInserter::insert
void insert(const P &params)
Definition: DbCore.h:687
EcalCondDBWriter_cfi.hostName
hostName
Definition: EcalCondDBWriter_cfi.py:59
cond::persistency::TAG::Table::getMetadata
bool getMetadata(const std::string &name, std::string &description, boost::posix_time::ptime &insertionTime, boost::posix_time::ptime &modificationTime) override
Definition: IOVSchema.cc:102
cond::persistency::TableDescription::setPrimaryKey
void setPrimaryKey()
Definition: DbCore.h:315
cond::persistency::PAYLOAD::Table::insertIfNew
cond::Hash insertIfNew(const std::string &objectType, const cond::Binary &payloadData, const cond::Binary &streamerInfoData, const boost::posix_time::ptime &insertionTime) override
Definition: IOVSchema.cc:536
cond::persistency::IOV::Table::getSize
bool getSize(const std::string &tag, const boost::posix_time::ptime &snapshotTime, size_t &size) override
Definition: IOVSchema.cc:307
cond::persistency::TAG::Table::m_schema
coral::ISchema & m_schema
Definition: IOVSchema.h:68
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
cond::persistency::TAG_AUTHORIZATION::Table::Table
Table(coral::ISchema &schema)
Definition: IOVSchema.cc:421
cond::time::MAX_VAL
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
writedatasetfile.action
action
Definition: writedatasetfile.py:8
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
cond::persistency::IOV::TAG_NAME
Definition: IOVSchema.h:111
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
cond::persistency::IOV::Table::getGroups
size_t getGroups(const std::string &tag, const boost::posix_time::ptime &snapshotTime, unsigned long long groupSize, std::vector< cond::Time_t > &groups) override
Definition: IOVSchema.cc:244
cond::persistency::ITagTable
Definition: IDbSchema.h:15
cond::persistency::DeleteBuffer
Definition: DbCore.h:653
cond::persistency::BulkDeleter
Definition: DbCore.h:709
cond::persistency::TAG_LOG::ACTION
Definition: IOVSchema.h:225
cond::persistency::RowBuffer
Definition: DbCore.h:175
cond::persistency::TAG::OBJECT_TYPE
Definition: IOVSchema.h:16
cond::persistency::TAG_AUTHORIZATION::Table::getAccessPermission
bool getAccessPermission(const std::string &tagName, const std::string &credential, int credentialType, int accessType) override
Definition: IOVSchema.cc:435
cond::persistency::IOVSchema::IOVSchema
IOVSchema(coral::ISchema &schema)
Definition: IOVSchema.cc:548
cond::persistency::ITagLogTable
Definition: IDbSchema.h:127
cond::persistency::PAYLOAD::Table::select
bool select(const cond::Hash &payloadHash)
Definition: IOVSchema.cc:490
cond::persistency::TAG::Table::isProtectable
bool isProtectable()
Definition: IOVSchema.h:65
cond::persistency::RowBuffer::get
const coral::AttributeList & get() const
Definition: DbCore.h:201
cond::persistency::TableDescription
Definition: DbCore.h:286
cond::persistency::IOV::INSERTION_TIME::size
static constexpr size_t size
Definition: IOVSchema.h:114
cond::persistency::IOVSchema::iovTable
IIOVTable & iovTable() override
Definition: IOVSchema.cc:580
cond::persistency::TAG_AUTHORIZATION::Table::removeEntriesForCredential
void removeEntriesForCredential(const std::string &credential, int credentialType) override
Definition: IOVSchema.cc:469
mps_check.columns
columns
Definition: mps_check.py:244
cond::persistency::TAG_LOG::Table::exists
bool exists() override
Definition: IOVSchema.cc:397
cond::persistency::TAG::Table::create
void create() override
Definition: IOVSchema.cc:48
cond::persistency::IIOVTable
Definition: IDbSchema.h:71
cond::persistency::TAG::Table::unsetProtectionCode
void unsetProtectionCode(const std::string &name, int code) override
Definition: IOVSchema.cc:212
edm::eventsetup::heterocontainer::insert
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
cond::persistency::IOV::Table::getRange
bool getRange(const std::string &tag, cond::Time_t begin, cond::Time_t end, const boost::posix_time::ptime &snapshotTime, std::vector< std::tuple< cond::Time_t, cond::Hash > > &iovs) override
Definition: IOVSchema.cc:320
cond::persistency::TAG_AUTHORIZATION::Table::removeAccessPermission
void removeAccessPermission(const std::string &tagName, const std::string &credential, int credentialType) override
Definition: IOVSchema.cc:459
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
cond::persistency::Query
Definition: DbCore.h:404
cond::persistency::BulkInserter
Definition: DbCore.h:677
cond::persistency::throwException
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
cond::persistency::IOVSchema::tagTable
ITagTable & tagTable() override
Definition: IOVSchema.cc:578
cond::persistency::TAG_AUTHORIZATION::Table::exists
bool exists() override
Definition: IOVSchema.cc:423
Auth.h
cond::persistency::TAG::INSERTION_TIME
Definition: IOVSchema.h:21
cond::persistency::IOVSchema::m_iovTable
IOV::Table m_iovTable
Definition: IOVSchema.h:261
cond::persistency::TAG::SYNCHRONIZATION
Definition: IOVSchema.h:17
cond::persistency::TAG::Table::m_isProtectable
bool m_isProtectable
Definition: IOVSchema.h:69
cond::persistency::PAYLOAD::tname
static constexpr char const * tname
Definition: IOVSchema.h:73
cond::persistency::IOVSchema::m_tagAccessPermissionTable
TAG_AUTHORIZATION::Table m_tagAccessPermissionTable
Definition: IOVSchema.h:263
cond::persistency::TableDescription::setForeignKey
void setForeignKey(const std::string &name)
Definition: DbCore.h:333
cond::persistency::PAYLOAD::Table::getType
bool getType(const cond::Hash &payloadHash, std::string &objectType) override
Definition: IOVSchema.cc:499
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
cond::persistency::TAG::TIME_TYPE
Definition: IOVSchema.h:15
JetPartonCorrections_cff.tagName
tagName
Definition: JetPartonCorrections_cff.py:12
cond::persistency::TAG_AUTHORIZATION::Table::create
void create() override
Definition: IOVSchema.cc:425
cond::persistency::TAG::NAME
Definition: IOVSchema.h:14
cond::persistency::IOV::Table::create
void create() override
Definition: IOVSchema.cc:232
cond::auth::COND_DBTAG_NO_PROTECTION_CODE
static constexpr int COND_DBTAG_NO_PROTECTION_CODE
Definition: Auth.h:41
cond::persistency::TAG::Table::Table
Table(coral::ISchema &schema)
Definition: IOVSchema.cc:36
SiStripMonitorCluster_cfi.q0
q0
Definition: SiStripMonitorCluster_cfi.py:241
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443