CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Enumerations | Functions
cond::persistency Namespace Reference

Namespaces

 GLOBAL_TAG
 
 GLOBAL_TAG_MAP
 
 IOV
 
 O2O_RUN
 
 PAYLOAD
 
 RUN_INFO
 
 TAG
 
 TAG_AUTHORIZATION
 
 TAG_LOG
 

Classes

struct  AttributeTypeName
 
struct  AttributeTypeName< boost::posix_time::ptime >
 
struct  AttributeTypeName< cond::Binary >
 
struct  AttributeTypeName< cond::SynchronizationType >
 
struct  AttributeTypeName< cond::TimeType >
 
class  BasePayloadProxy
 
class  BulkDeleter
 
class  BulkInserter
 
class  CondDBTransaction
 
class  CondGetter
 
class  ConditionBuffer
 
class  ConnectionPool
 
class  CoralMsgReporter
 
struct  DefineQueryOutput
 
struct  DefineQueryOutput< boost::posix_time::ptime >
 
struct  DefineQueryOutput< cond::Binary >
 
struct  DefineQueryOutput< cond::SynchronizationType >
 
struct  DefineQueryOutput< cond::TimeType >
 
struct  DefineQueryOutput< std::array< char, n > >
 
class  DeleteBuffer
 
class  EchoedLogStream
 
class  EchoedLogStream< edm::LogDebug_ >
 
class  Exception
 Base exception class for the object to relational access. More...
 
struct  GetFromRow
 
struct  GetFromRow< boost::posix_time::ptime >
 
struct  GetFromRow< cond::Binary >
 
struct  GetFromRow< cond::SynchronizationType >
 
struct  GetFromRow< cond::TimeType >
 
struct  GetFromRow< std::array< char, n > >
 
class  GTEditor
 
class  GTEditorData
 
class  GTProxy
 
class  GTProxyData
 
class  GTSchema
 
class  IDbAuthentication
 
class  IGTMapTable
 
class  IGTSchema
 
class  IGTTable
 
class  IIOVSchema
 
class  IIOVTable
 
class  IOVArray
 
struct  IOVComp
 
class  IOVEditor
 
class  IOVEditorData
 
class  IOVProxy
 
class  IOVProxyData
 
struct  IOVRunComp
 
class  IOVSchema
 
struct  IOVTimeComp
 
class  IPayloadTable
 
class  IRunInfoSchema
 
class  IRunInfoTable
 
class  ITagAccessPermissionTable
 
class  ITagLogTable
 
class  ITagTable
 
class  ITransaction
 
class  KeyList
 
class  Logger
 
class  MsgDispatcher
 
class  PayloadProxy
 
class  PayloadProxy< cond::persistency::KeyList >
 
class  PayloadReader
 
class  Query
 
class  QueryIterator
 
class  RowBuffer
 
class  RunInfoEditor
 
class  RunInfoEditorData
 
class  RunInfoProxy
 
class  RunInfoProxyData
 
class  RunInfoSchema
 
class  Session
 
class  SessionImpl
 
class  TableDescription
 
class  Transaction
 
class  TransactionScope
 
class  UpdateBuffer
 

Typedefs

typedef std::vector< std::tuple< cond::Time_t, cond::Hash > > IOVContainer
 

Enumerations

enum  DbAuthenticationSystem { UndefinedAuthentication = 0, CondDbKey, CoralXMLFile }
 

Functions

std::string convertoToOracleConnection (const std::string &input)
 
bool copyIov (Session &session, const std::string &sourceTag, const std::string &destTag, cond::Time_t souceSince, cond::Time_t destSince, const std::string &description)
 
unsigned int countslash (const std::string &input)
 
template<typename T >
void f_add_attribute (coral::AttributeList &data, const std::string &attributeName, const T &param, bool init=true)
 
template<>
void f_add_attribute (coral::AttributeList &data, const std::string &attributeName, const cond::Binary &param, bool init)
 
template<>
void f_add_attribute (coral::AttributeList &data, const std::string &attributeName, const boost::posix_time::ptime &param, bool init)
 
template<>
void f_add_attribute (coral::AttributeList &data, const std::string &attributeName, const cond::TimeType &param, bool init)
 
template<>
void f_add_attribute (coral::AttributeList &data, const std::string &attributeName, const cond::SynchronizationType &param, bool init)
 
template<typename Column , typename P >
void f_add_column_data (coral::AttributeList &data, const P &param, bool init=true)
 
template<typename T >
void f_add_column_description (coral::TableDescription &table, const std::string &columnName, size_t size=0, bool notNull=true)
 
template<typename C1 , typename C2 >
void f_add_condition (std::string &whereClause, const std::string condition="=")
 
template<typename Column , typename P >
void f_add_condition_data (coral::AttributeList &data, std::string &whereClause, const P &value, const std::string condition="=")
 
std::pair< std::string, std::shared_ptr< void > > fetch (const cond::Hash &payloadId, Session &session)
 
std::pair< std::string, std::shared_ptr< void > > fetchIfExists (const cond::Hash &payloadId, Session &session, bool &exists)
 
std::pair< std::string, std::shared_ptr< void > > fetchOne (const std::string &payloadTypeName, const cond::Binary &data, const cond::Binary &streamerInfo, std::shared_ptr< void > payloadPtr)
 
std::string fullyQualifiedTag (const std::string &tag, const std::string &connectionString)
 
std::string get_timestamp ()
 
std::string get_timestamp_for_filename ()
 
std::pair< std::string, std::string > getConnectionParams (const std::string &connectionString, const std::string &transactionId, const std::string &signature)
 
std::string getConnectionProtocol (const std::string &connectionString)
 
cond::Hash import (Session &source, const cond::Hash &sourcePayloadId, const std::string &inputTypeName, const void *inputPtr, Session &destination)
 
size_t importIovs (const std::string &sourceTag, Session &sourceSession, const std::string &destTag, Session &destSession, cond::Time_t begin, cond::Time_t end, const std::string &description, const std::string &editingNote, bool override, bool serialize, bool forceInsert)
 
cond::Hash importPayload (Session &sourceSession, const cond::Hash &sourcePayloadId, Session &destSession, bool reserialize)
 
bool iovSorter (const std::tuple< cond::Time_t, cond::Hash, boost::posix_time::ptime > &f, const std::tuple< cond::Time_t, cond::Hash, boost::posix_time::ptime > &s)
 
template<typename T , typename Arg1 >
constexpr bool is_same_any ()
 
template<typename T , typename Arg1 , typename Arg2 , typename... Args>
constexpr bool is_same_any ()
 
cond::Hash makeHash (const std::string &objectType, const cond::Binary &data)
 
std::tuple< std::string, std::string, std::string > parseConnectionString (const std::string &connectionString)
 
std::string parseFipConnectionString (const std::string &fipConnect)
 
std::pair< std::string, std::string > parseTag (const std::string &tag)
 
std::string print_timestamp (const boost::posix_time::ptime &t, const char *format_s="%Y-%m-%d %H:%M:%S.%f")
 
template<typename T >
std::vector< T >::const_iterator search (const cond::Time_t &val, const std::vector< T > &container)
 
template<>
cond::Hash Session::storePayload< std::string > (const std::string &payload, const boost::posix_time::ptime &creationTime)
 
void setTillToLastIov (cond::Iov_t &target, cond::Time_t endOfValidity)
 
template<typename T , typename P >
void static_assert_is_same_decayed ()
 
void throwException (const std::string &message, const std::string &methodName)
 

Typedef Documentation

◆ IOVContainer

typedef std::vector<std::tuple<cond::Time_t, cond::Hash> > cond::persistency::IOVContainer

Definition at line 25 of file IOVProxy.h.

Enumeration Type Documentation

◆ DbAuthenticationSystem

Enumerator
UndefinedAuthentication 
CondDbKey 
CoralXMLFile 

Definition at line 32 of file ConnectionPool.h.

Function Documentation

◆ convertoToOracleConnection()

std::string cond::persistency::convertoToOracleConnection ( const std::string &  input)
inline

Definition at line 120 of file Utils.h.

References input, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, oniaPATMuonsWithTrigger_cff::matches, AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

Referenced by CondDBESSource::CondDBESSource().

120  {
121  // leave the connection string unmodified for sqlite
122  if (input.find("sqlite") == 0 || input.find("oracle") == 0)
123  return input;
124 
125  //static const std::regex trivial("oracle://(cms_orcon_adg|cms_orcoff_prep)/([_[:alnum:]]+?)");
126  static const std::regex short_frontier("frontier://([[:alnum:]]+?)/([_[:alnum:]]+?)");
127  static const std::regex long_frontier("frontier://((\\([-[:alnum:]]+?=[^\\)]+?\\))+)/([_[:alnum:]]+?)");
128  static const std::regex long_frontier_serverurl("\\(serverurl=[^\\)]+?/([[:alnum:]]+?)\\)");
129 
130  static const std::map<std::string, std::string> frontierMap = {
131  {"PromptProd", "cms_orcon_adg"},
132  {"FrontierProd", "cms_orcon_adg"},
133  {"FrontierArc", "cms_orcon_adg"},
134  {"FrontierOnProd", "cms_orcon_adg"},
135  {"FrontierPrep", "cms_orcoff_prep"},
136  };
137 
138  std::smatch matches;
139 
140  static const std::string technology("oracle://");
141  std::string service("");
142  std::string account("");
143 
144  bool match = false;
145  if (std::regex_match(input, matches, short_frontier)) {
146  service = matches[1];
147  account = matches[2];
148  match = true;
149  } else if (std::regex_match(input, matches, long_frontier)) {
150  std::string frontier_config(matches[1]);
151  std::smatch matches2;
152  if (not std::regex_search(frontier_config, matches2, long_frontier_serverurl))
153  throwException("No serverurl in matched long frontier", "convertoToOracleConnection");
154  service = matches2[1];
155  account = matches[3];
156  match = true;
157  }
158 
159  if (!match)
160  throwException("Connection string " + input + " can't be converted to oracle connection.",
161  "convertoToOracleConnection");
162 
163  if (service == "FrontierArc") {
164  size_t len = account.size() - 5;
165  account = account.substr(0, len);
166  }
167 
168  auto it = frontierMap.find(service);
169  if (it == frontierMap.end())
170  throwException("Connection string can't be converted.", "convertoToOracleConnection");
171  service = it->second;
172 
173  return technology + service + "/" + account;
174  }
static std::string const input
Definition: EdmProvDump.cc:50
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12

◆ copyIov()

bool cond::persistency::copyIov ( Session session,
const std::string &  sourceTag,
const std::string &  destTag,
cond::Time_t  souceSince,
cond::Time_t  destSince,
const std::string &  description 
)

Definition at line 163 of file CondDBTools.cc.

References gather_cfg::cout, makeListRunsInFiles::description, cond::persistency::IOVEditor::flush(), cond::persistency::IOVEditor::insert(), run_AlCaRecoTriggerBitsUpdateWorkflow::iovs, AlCaHLTBitMon_ParallelJobs::p, cond::persistency::IOVEditor::payloadType(), run_AlCaRecoTriggerBitsUpdateWorkflow::session, cond::persistency::IOVEditor::setDescription(), RawToDigi_cff::sourceTag, cond::persistency::TransactionScope::start(), throwException(), and cond::persistency::IOVEditor::timeType().

168  {
169  persistency::TransactionScope ssc(session.transaction());
170  ssc.start(false);
171  std::cout << " Loading source iov..." << std::endl;
172  persistency::IOVProxy p = session.readIov(sourceTag);
173  auto iovs = p.selectAll();
174  if (iovs.size() == 0) {
175  std::cout << " Tag contains 0 iovs." << std::endl;
176  return false;
177  } else {
178  std::cout << " Iov size:" << iovs.size() << " timeType:" << p.tagInfo().timeType << " payloadObjectType=\""
179  << p.tagInfo().payloadType << "\"" << std::endl;
180  }
181 
182  auto iiov = iovs.find(sourceSince);
183  if (iiov == iovs.end()) {
184  std::cout << "ERROR: No Iov valid found for target time " << sourceSince << std::endl;
185  return false;
186  }
187 
188  persistency::IOVEditor editor;
189  if (session.existsIov(destTag)) {
190  if (!description.empty())
191  std::cout << " INFO. Destination Tag " << destTag
192  << " already exists. Provided description will be ignored." << std::endl;
193  editor = session.editIov(destTag);
194  if (editor.timeType() != p.tagInfo().timeType)
195  throwException("TimeType of the destination tag does not match with the source tag timeType.", "importIovs");
196  if (editor.payloadType() != p.tagInfo().payloadType)
197  throwException("PayloadType of the destination tag does not match with the source tag payloadType.",
198  "importIovs");
199  } else {
200  editor =
201  session.createIov(p.tagInfo().payloadType, destTag, p.tagInfo().timeType, p.tagInfo().synchronizationType);
202  if (description.empty())
203  editor.setDescription("Created copying iovs from tag " + sourceTag);
204  else
205  editor.setDescription(description);
206  }
207 
208  editor.insert(destSince, (*iiov).payloadId);
209 
210  std::cout << " Flushing changes..." << std::endl;
211  editor.flush();
212  ssc.commit();
213  return true;
214  }
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12

◆ countslash()

unsigned int cond::persistency::countslash ( const std::string &  input)

Definition at line 13 of file DbConnectionString.cc.

References submitPVResolutionJobs::count, and input.

Referenced by getConnectionParams().

13  {
14  unsigned int count = 0;
15  std::string::size_type slashpos(0);
16  while (slashpos != std::string::npos) {
17  slashpos = input.find('/', slashpos);
18  if (slashpos != std::string::npos) {
19  ++count;
20  // start next search after this word
21  slashpos += 1;
22  }
23  }
24  return count;
25  }
uint16_t size_type
static std::string const input
Definition: EdmProvDump.cc:50

◆ f_add_attribute() [1/5]

template<typename T >
void cond::persistency::f_add_attribute ( coral::AttributeList &  data,
const std::string &  attributeName,
const T param,
bool  init = true 
)
inline

Definition at line 91 of file DbCore.h.

References data.

Referenced by f_add_column_data(), and f_add_condition_data().

94  {
95  if (init)
96  data.extend<T>(attributeName);
97  data[attributeName].data<T>() = param;
98  }
Definition: init.py:1
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
long double T

◆ f_add_attribute() [2/5]

template<>
void cond::persistency::f_add_attribute ( coral::AttributeList &  data,
const std::string &  attributeName,
const cond::Binary param,
bool  init 
)
inline

Definition at line 101 of file DbCore.h.

References data, and cond::Binary::get().

104  {
105  if (init)
106  data.extend<coral::Blob>(attributeName);
107  data[attributeName].bind(param.get());
108  }
Definition: init.py:1
const coral::Blob & get() const
Definition: Binary.cc:30
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ f_add_attribute() [3/5]

template<>
void cond::persistency::f_add_attribute ( coral::AttributeList &  data,
const std::string &  attributeName,
const boost::posix_time::ptime &  param,
bool  init 
)
inline

Definition at line 111 of file DbCore.h.

References data.

114  {
115  if (init)
116  data.extend<coral::TimeStamp>(attributeName);
117  data[attributeName].data<coral::TimeStamp>() = coral::TimeStamp(param);
118  }
Definition: init.py:1
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ f_add_attribute() [4/5]

template<>
void cond::persistency::f_add_attribute ( coral::AttributeList &  data,
const std::string &  attributeName,
const cond::TimeType param,
bool  init 
)
inline

Definition at line 121 of file DbCore.h.

References data, AlCaHLTBitMon_QueryRunRegistry::string, and cond::time::timeTypeName().

124  {
125  if (init)
126  data.extend<std::string>(attributeName);
127  data[attributeName].data<std::string>() = cond::time::timeTypeName(param);
128  }
Definition: init.py:1
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
std::string timeTypeName(TimeType type)
Definition: Time.cc:19

◆ f_add_attribute() [5/5]

template<>
void cond::persistency::f_add_attribute ( coral::AttributeList &  data,
const std::string &  attributeName,
const cond::SynchronizationType param,
bool  init 
)
inline

Definition at line 131 of file DbCore.h.

References data, AlCaHLTBitMon_QueryRunRegistry::string, and cond::synchronizationTypeNames().

134  {
135  if (init)
136  data.extend<std::string>(attributeName);
137  data[attributeName].data<std::string>() = synchronizationTypeNames(param);
138  }
std::string synchronizationTypeNames(SynchronizationType type)
Definition: Types.cc:45
Definition: init.py:1
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ f_add_column_data()

template<typename Column , typename P >
void cond::persistency::f_add_column_data ( coral::AttributeList &  data,
const P param,
bool  init = true 
)
inline

Definition at line 142 of file DbCore.h.

References data, f_add_attribute(), and mergeVDriftHistosByStation::name.

142  {
143  static_assert_is_same_decayed<typename Column::type, P>();
145  }
Definition: init.py:1
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
void f_add_attribute(coral::AttributeList &data, const std::string &attributeName, const cond::SynchronizationType &param, bool init)
Definition: DbCore.h:131

◆ f_add_column_description()

template<typename T >
void cond::persistency::f_add_column_description ( coral::TableDescription &  table,
const std::string &  columnName,
size_t  size = 0,
bool  notNull = true 
)

Definition at line 266 of file DbCore.h.

References TableParser::table.

269  {
270  table.insertColumn(columnName, AttributeTypeName<T>()(), size);
271  if (notNull)
272  table.setNotNullConstraint(columnName);
273  }
size
Write out results.

◆ f_add_condition()

template<typename C1 , typename C2 >
void cond::persistency::f_add_condition ( std::string &  whereClause,
const std::string  condition = "=" 
)
inline

Definition at line 166 of file DbCore.h.

166  {
167  if (!whereClause.empty())
168  whereClause += " AND ";
169  whereClause += C1::fullyQualifiedName() + " " + condition + " " + C2::fullyQualifiedName() + " ";
170  }

◆ f_add_condition_data()

template<typename Column , typename P >
void cond::persistency::f_add_condition_data ( coral::AttributeList &  data,
std::string &  whereClause,
const P value,
const std::string  condition = "=" 
)
inline

Definition at line 149 of file DbCore.h.

References data, f_add_attribute(), EcalPhiSymFlatTableProducers_cfi::id, mergeVDriftHistosByStation::name, and relativeConstraints::value.

152  {
153  static_assert_is_same_decayed<typename Column::type, P>();
154  std::stringstream varId;
155  unsigned int id = data.size();
156  varId << Column::name << "_" << id;
157  if (!whereClause.empty())
158  whereClause += " AND ";
159  whereClause += Column::fullyQualifiedName() + " " + condition + " :" + varId.str() + " ";
160  //bool init = (id == 0);
161  f_add_attribute(data, varId.str(), value);
162  }
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
void f_add_attribute(coral::AttributeList &data, const std::string &attributeName, const cond::SynchronizationType &param, bool init)
Definition: DbCore.h:131

◆ fetch()

std::pair< std::string, std::shared_ptr< void > > cond::persistency::fetch ( const cond::Hash payloadId,
Session session 
)

Definition at line 357 of file CondDBFetch.cc.

References data, fetchOne(), newFWLiteAna::found, run_AlCaRecoTriggerBitsUpdateWorkflow::session, AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

Referenced by LMFDat::fetch(), l1tpf_calo::SimpleCaloLinkerBase::fetch(), and importPayload().

357  {
358  std::shared_ptr<void> payloadPtr;
360  cond::Binary streamerInfo;
361  std::string payloadTypeName;
362  bool found = session.fetchPayloadData(payloadId, payloadTypeName, data, streamerInfo);
363  if (!found)
364  throwException("Payload with id " + payloadId + " has not been found in the database.", "fetch");
365  return fetchOne(payloadTypeName, data, streamerInfo, payloadPtr);
366  }
std::pair< std::string, std::shared_ptr< void > > fetchOne(const std::string &payloadTypeName, const cond::Binary &data, const cond::Binary &streamerInfo, std::shared_ptr< void > payloadPtr)
Definition: CondDBFetch.cc:23
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12

◆ fetchIfExists()

std::pair<std::string, std::shared_ptr<void> > cond::persistency::fetchIfExists ( const cond::Hash payloadId,
Session session,
bool &  exists 
)

Definition at line 25 of file CondDBImport.cc.

References data, fetchOne(), run_AlCaRecoTriggerBitsUpdateWorkflow::session, and AlCaHLTBitMon_QueryRunRegistry::string.

27  {
28  std::shared_ptr<void> payloadPtr;
30  cond::Binary streamerInfo;
31  std::string payloadTypeName;
32  exists = session.fetchPayloadData(payloadId, payloadTypeName, data, streamerInfo);
33  if (exists) {
34  return fetchOne(payloadTypeName, data, streamerInfo, payloadPtr);
35  } else
36  return std::make_pair(std::string(""), std::shared_ptr<void>());
37  }
std::pair< std::string, std::shared_ptr< void > > fetchOne(const std::string &payloadTypeName, const cond::Binary &data, const cond::Binary &streamerInfo, std::shared_ptr< void > payloadPtr)
Definition: CondDBFetch.cc:23
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ fetchOne()

std::pair< std::string, std::shared_ptr< void > > cond::persistency::fetchOne ( const std::string &  payloadTypeName,
const cond::Binary data,
const cond::Binary streamerInfo,
std::shared_ptr< void >  payloadPtr 
)

Definition at line 23 of file CondDBFetch.cc.

References data, FETCH_PAYLOAD_CASE, AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

Referenced by fetch(), and fetchIfExists().

26  {
27  bool match = false;
29  FETCH_PAYLOAD_CASE(std::vector<unsigned long long>)
262  //FETCH_PAYLOAD_CASE( PerformancePayload )
335 
336  //
337  if (payloadTypeName == "PhysicsTools::Calibration::Histogram3D<double,double,double,double>") {
338  payloadPtr = deserialize<PhysicsTools::Calibration::Histogram3D<double, double, double, double> >(
339  payloadTypeName, data, streamerInfo);
340  match = true;
341  }
342  if (payloadTypeName == "PhysicsTools::Calibration::Histogram2D<double,double,double>") {
343  payloadPtr = deserialize<PhysicsTools::Calibration::Histogram2D<double, double, double> >(
344  payloadTypeName, data, streamerInfo);
345  match = true;
346  }
347  if (payloadTypeName == "std::vector<unsignedlonglong,std::allocator<unsignedlonglong>>") {
348  payloadPtr = deserialize<std::vector<unsigned long long> >(payloadTypeName, data, streamerInfo);
349  match = true;
350  }
351 
352  if (!match)
353  throwException("Payload type \"" + payloadTypeName + "\" is unknown.", "fetch");
354  return std::make_pair(payloadTypeName, payloadPtr);
355  }
Channel-mask mapping.
Definition: ESGain.h:7
#define FETCH_PAYLOAD_CASE(TYPENAME)
Definition: CondDBFetch.cc:3
Definition: DTT0.h:48
QGLikelihoodObject containing valid range and entries with category and histogram (mean is not used a...
The mapping between FramePosition and VFATInfo.
Channel-mask mapping.
Category structure: ranges associated with QGLikelihood histograms.
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
QGLikelihoodSystematicsObject containing the parameters for the systematic smearing.
Collection of optical functions for two crossing angle values and various scoring planes...
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
The mapping between FramePosition and ROCInfo.

◆ fullyQualifiedTag()

std::string cond::persistency::fullyQualifiedTag ( const std::string &  tag,
const std::string &  connectionString 
)

Definition at line 8 of file GTProxy.cc.

References autoCondModifiers::connectionString, and makeGlobalPositionRcd_cfg::tag.

Referenced by CondDBESSource::CondDBESSource().

8  {
9  if (connectionString.empty())
10  return tag;
11  return tag + "@[" + connectionString + "]";
12  }

◆ get_timestamp()

std::string cond::persistency::get_timestamp ( )

Definition at line 100 of file Logger.cc.

References submitPVValidationJobs::now, and print_timestamp().

Referenced by cond::persistency::Logger::log().

100  {
101  auto now = boost::posix_time::microsec_clock::universal_time();
102  return print_timestamp(now);
103  }
std::string print_timestamp(const boost::posix_time::ptime &t, const char *format_s="%Y-%m-%d %H:%M:%S.%f")
Definition: Logger.cc:91

◆ get_timestamp_for_filename()

std::string cond::persistency::get_timestamp_for_filename ( )

Definition at line 104 of file Logger.cc.

References submitPVValidationJobs::now, and print_timestamp().

Referenced by cond::persistency::Logger::saveOnFile().

104  {
105  auto now = boost::posix_time::microsec_clock::universal_time();
106  return print_timestamp(now, "%Y-%m-%d_%H-%M-%S");
107  }
std::string print_timestamp(const boost::posix_time::ptime &t, const char *format_s="%Y-%m-%d %H:%M:%S.%f")
Definition: Logger.cc:91

◆ getConnectionParams()

std::pair< std::string, std::string > cond::persistency::getConnectionParams ( const std::string &  connectionString,
const std::string &  transactionId,
const std::string &  signature 
)

Definition at line 39 of file DbConnectionString.cc.

References autoCondModifiers::connectionString, countslash(), getConnectionProtocol(), edm::Service< T >::isAvailable(), MainPageGenerator::l, edm::SiteLocalConfig::lookupCalibConnect(), parseFipConnectionString(), findAndChange::protocol, alignCSCRings::s, signature, AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().

Referenced by cond::persistency::ConnectionPool::createCoralSession().

41  {
42  if (connectionString.empty())
43  cond::throwException("The connection string is empty.", "getConnectionParams");
45  std::string finalConn = connectionString;
46  std::string refreshConn("");
47  if (protocol == "frontier") {
48  std::string protocol("frontier://");
50  unsigned int nslash = countslash(connectionString.substr(protocol.size(), connectionString.size() - fpos));
51  if (nslash == 1) {
52  edm::Service<edm::SiteLocalConfig> localconfservice;
53  if (!localconfservice.isAvailable()) {
54  cond::throwException("edm::SiteLocalConfigService is not available", "getConnectionParams");
55  }
56  finalConn = localconfservice->lookupCalibConnect(connectionString);
57  }
58  if (!transactionId.empty()) {
59  size_t l = finalConn.rfind('/');
60  finalConn.insert(l, "(freshkey=" + transactionId + ')');
61  }
62 
63  //When the signature parameter is set to sig, FroNTier requests that the server sends digital signatures on every response.
64  //We test here that the signature string, if defined, is actually set to sig, otherwise we throw an exception
65  std::string signatureParameter("sig");
66  if (!signature.empty()) {
67  if (signature == signatureParameter) {
68  std::string::size_type s = finalConn.rfind('/');
69  finalConn.insert(s, "(security=" + signature + ')');
70  } else {
71  cond::throwException("The FroNTier security option is invalid.", "getConnectionParams");
72  }
73  }
74 
75  std::string::size_type startRefresh = finalConn.find("://");
76  if (startRefresh != std::string::npos) {
77  startRefresh += 3;
78  }
79  std::string::size_type endRefresh = finalConn.rfind('/', std::string::npos);
80  if (endRefresh == std::string::npos) {
81  refreshConn = finalConn;
82  } else {
83  refreshConn = finalConn.substr(startRefresh, endRefresh - startRefresh);
84  if (refreshConn.substr(0, 1) != "(") {
85  //if the connect string is not a complicated parenthesized string,
86  // an http:// needs to be at the beginning of it
87  refreshConn.insert(0, "http://");
88  }
89  }
90  } else if (protocol == "sqlite_fip") {
92  }
93  return std::make_pair(finalConn, refreshConn);
94  }
std::string getConnectionProtocol(const std::string &connectionString)
Definition: Utils.h:86
std::string parseFipConnectionString(const std::string &fipConnect)
virtual std::string const lookupCalibConnect(std::string const &input) const =0
uint16_t size_type
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
bool isAvailable() const
Definition: Service.h:40
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined signature
Definition: Activities.doc:4
unsigned int countslash(const std::string &input)

◆ getConnectionProtocol()

std::string cond::persistency::getConnectionProtocol ( const std::string &  connectionString)
inline

Definition at line 86 of file Utils.h.

References autoCondModifiers::connectionString, AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

Referenced by getConnectionParams(), and parseConnectionString().

86  {
87  size_t techEnd = connectionString.find(':');
88  if (techEnd == std::string::npos)
89  throwException("Could not resolve the connection protocol on " + connectionString + ".",
90  "getConnectionProtocol");
91  std::string technology = connectionString.substr(0, techEnd);
92  return technology;
93  }
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12

◆ import()

cond::Hash cond::persistency::import ( Session source,
const cond::Hash sourcePayloadId,
const std::string &  inputTypeName,
const void *  inputPtr,
Session destination 
)

Definition at line 39 of file CondDBImport.cc.

References HLTMuonOfflineAnalyzer_cff::destination, IMPORT_PAYLOAD_CASE, getGTfromDQMFile::obj, AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

Referenced by edm::python::initializePyBind11Module(), PyBind11ProcessDesc::prepareToRead(), and edm::cmspybind11::readPSetsFrom().

43  {
44  cond::Hash payloadId("");
45  bool newInsert = false;
46  bool match = false;
47  if (inputPtr) {
49  IMPORT_PAYLOAD_CASE(std::vector<unsigned long long>)
266  if (inputTypeName == "L1TriggerKeyList") {
267  match = true;
268  throwException("Import of \"L1TriggerKeyList\" type payloads is not supported.", "import");
269  }
270  //IMPORT_PAYLOAD_CASE( L1TriggerKeyList )
285  //IMPORT_PAYLOAD_CASE( PerformancePayload )
360  if (inputTypeName == "PhysicsTools::Calibration::Histogram3D<double,double,double,double>") {
361  match = true;
364  payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time());
365  }
366  if (inputTypeName == "PhysicsTools::Calibration::Histogram2D<double,double,double>") {
367  match = true;
370  payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time());
371  }
372  if (inputTypeName == "std::vector<unsignedlonglong,std::allocator<unsignedlonglong>>") {
373  match = true;
374  const std::vector<unsigned long long>& obj = *static_cast<const std::vector<unsigned long long>*>(inputPtr);
375  payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time());
376  }
377 
378  if (!match)
379  throwException("Payload type \"" + inputTypeName + "\" is unknown.", "import");
380  }
381  return payloadId;
382  }
Channel-mask mapping.
Definition: ESGain.h:7
Definition: DTT0.h:48
QGLikelihoodObject containing valid range and entries with category and histogram (mean is not used a...
The mapping between FramePosition and VFATInfo.
#define IMPORT_PAYLOAD_CASE(TYPENAME)
Definition: CondDBImport.cc:4
Channel-mask mapping.
std::string Hash
Definition: Types.h:43
Category structure: ranges associated with QGLikelihood histograms.
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
QGLikelihoodSystematicsObject containing the parameters for the systematic smearing.
Collection of optical functions for two crossing angle values and various scoring planes...
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
The mapping between FramePosition and ROCInfo.

◆ importIovs()

size_t cond::persistency::importIovs ( const std::string &  sourceTag,
Session sourceSession,
const std::string &  destTag,
Session destSession,
cond::Time_t  begin,
cond::Time_t  end,
const std::string &  description,
const std::string &  editingNote,
bool  override,
bool  serialize,
bool  forceInsert 
)

Definition at line 39 of file CondDBTools.cc.

References cond::persistency::Session::connectionString(), gather_cfg::cout, cond::persistency::Session::createDatabase(), cond::persistency::Session::createIov(), makeListRunsInFiles::description, Calorimetry_cff::dp, cond::persistency::Session::editIov(), cond::persistency::Session::existsDatabase(), cond::persistency::Session::existsIov(), cond::persistency::IOVEditor::flush(), importPayload(), cond::persistency::IOVEditor::insert(), run_AlCaRecoTriggerBitsUpdateWorkflow::iovs, AlCaHLTBitMon_ParallelJobs::p, cond::persistency::IOVEditor::payloadType(), cond::persistency::Session::readIov(), cond::persistency::IOVEditor::setDescription(), SiStripO2O_cfg_template::since, EcalCondDB::sinces, optionsL1T::skip, RawToDigi_cff::sourceTag, cond::persistency::TransactionScope::start(), throwException(), cond::persistency::IOVEditor::timeType(), and cond::persistency::Session::transaction().

49  {
50  persistency::TransactionScope ssc(sourceSession.transaction());
51  ssc.start();
52  std::cout << " Loading source iov..." << std::endl;
53  persistency::IOVProxy p = sourceSession.readIov(sourceTag);
54  auto iovs = p.selectAll();
55  if (iovs.size() == 0) {
56  std::cout << " Tag contains 0 iovs." << std::endl;
57  return 0;
58  } else {
59  std::cout << " Iov size:" << iovs.size() << " timeType:" << p.tagInfo().timeType << " payloadObjectType=\""
60  << p.tagInfo().payloadType << "\"" << std::endl;
61  }
62  if ((*iovs.begin()).since > begin)
63  begin = (*iovs.begin()).since;
64  if (end < begin) {
65  std::cout << " No Iov in the selected range." << std::endl;
66  return 0;
67  }
68  persistency::IOVEditor editor;
69  persistency::TransactionScope dsc(destSession.transaction());
70  dsc.start(false);
71  bool exists = false;
72  if (!destSession.existsDatabase()) {
73  destSession.createDatabase();
74  } else {
75  exists = destSession.existsIov(destTag);
76  }
77  persistency::IOVProxy dp;
78  if (exists) {
79  dp = destSession.readIov(destTag);
80  editor = destSession.editIov(destTag);
81  if (!description.empty())
82  std::cout << " INFO. Destination Tag " << destTag
83  << " already exists. Provided description will be ignored." << std::endl;
84  if (editor.timeType() != p.tagInfo().timeType)
85  throwException("TimeType of the destination tag does not match with the source tag timeType.", "importIovs");
86  if (editor.payloadType() != p.tagInfo().payloadType)
87  throwException("PayloadType of the destination tag does not match with the source tag payloadType.",
88  "importIovs");
89  } else {
90  editor = destSession.createIov(
91  p.tagInfo().payloadType, destTag, p.tagInfo().timeType, p.tagInfo().synchronizationType);
92  if (description.empty())
93  editor.setDescription("Created copying tag " + sourceTag + " from " + sourceSession.connectionString());
94  else
95  editor.setDescription(description);
96  }
97  size_t niovs = 0;
98  std::set<cond::Hash> pids;
99  std::set<cond::Time_t> sinces;
100  auto iiov = iovs.find(begin);
101  cond::Time_t newSince = begin;
102  while (iiov != iovs.end()) {
103  // skip duplicated sinces
104  if (sinces.find(newSince) != sinces.end()) {
105  std::cout << " WARNING. Skipping duplicated since=" << newSince << std::endl;
106  continue;
107  }
108  // make sure that we import the payload _IN_USE_
109  auto usedIov = p.getInterval(newSince);
110  cond::Hash ph = importPayload(sourceSession, usedIov.payloadId, destSession, reserialize);
111  pids.insert(ph);
112  bool skip = false;
113  if (exists) {
114  // don't insert if the same entry is already there...
115  auto diovs = dp.selectAll();
116  auto ie = diovs.find(newSince);
117  if (ie != diovs.end()) {
118  if (((*ie).since == newSince) && ((*ie).payloadId == usedIov.payloadId)) {
119  skip = true;
120  }
121  }
122  }
123  if (!skip) {
124  editor.insert(newSince, ph);
125  sinces.insert(newSince);
126  niovs++;
127  if (niovs && (niovs % 1000 == 0))
128  std::cout << " Total of iov inserted: " << niovs << " payloads: " << pids.size() << std::endl;
129  }
130  iiov++;
131  if (iiov == iovs.end() || (*iiov).since > end) {
132  break;
133  } else {
134  newSince = (*iiov).since;
135  }
136  }
137  if (exists && override) {
138  std::cout << " Adding overlying iovs..." << std::endl;
139  persistency::IOVProxy dp = destSession.readIov(destTag);
140  auto diovs = dp.selectRange(begin, end);
141  std::set<cond::Time_t> extraSinces;
142  for (const auto& iov : diovs) {
143  auto siov = p.getInterval(iov.since);
144  if (siov.since != iov.since) {
145  if (extraSinces.find(iov.since) == extraSinces.end()) {
146  editor.insert(iov.since, siov.payloadId);
147  extraSinces.insert(iov.since);
148  niovs++;
149  if (niovs && (niovs % 1000 == 0))
150  std::cout << " Total of iov inserted: " << niovs << " payloads: " << pids.size() << std::endl;
151  }
152  }
153  }
154  }
155  std::cout << " Total of iov inserted: " << niovs << " payloads: " << pids.size() << std::endl;
156  std::cout << " Flushing changes..." << std::endl;
157  editor.flush(editingNote, forceInsert);
158  dsc.commit();
159  ssc.commit();
160  return niovs;
161  }
list sinces
Definition: EcalCondDB.py:82
unsigned long long Time_t
Definition: Time.h:14
std::string Hash
Definition: Types.h:43
cond::Hash importPayload(Session &sourceSession, const cond::Hash &sourcePayloadId, Session &destSession, bool reserialize)
Definition: CondDBTools.cc:12
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12

◆ importPayload()

cond::Hash cond::persistency::importPayload ( Session sourceSession,
const cond::Hash sourcePayloadId,
Session destSession,
bool  reserialize 
)

Definition at line 12 of file CondDBTools.cc.

References fetch(), cond::persistency::Session::fetchPayloadData(), submitPVValidationJobs::now, HLT_2024v14_cff::payloadType, cond::persistency::Session::storePayloadData(), AlCaHLTBitMon_QueryRunRegistry::string, and cond::throwException().

Referenced by importIovs().

15  {
16  if (reserialize) {
17  std::pair<std::string, std::shared_ptr<void> > readBackPayload = fetch(sourcePayloadId, sourceSession);
18  return import(sourceSession, sourcePayloadId, readBackPayload.first, readBackPayload.second.get(), destSession);
19  } else {
21  cond::Binary payloadData;
22  cond::Binary streamerInfoData;
23  if (!sourceSession.fetchPayloadData(sourcePayloadId, payloadType, payloadData, streamerInfoData)) {
24  cond::throwException("Payload with hash" + sourcePayloadId + " has not been found in the source database.",
25  "importPayload");
26  }
27  boost::posix_time::ptime now = boost::posix_time::microsec_clock::universal_time();
28  return destSession.storePayloadData(payloadType, std::make_pair(payloadData, streamerInfoData), now);
29  }
30  }
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
std::pair< std::string, std::shared_ptr< void > > fetch(const cond::Hash &payloadId, Session &session)
Definition: CondDBFetch.cc:357

◆ iovSorter()

bool cond::persistency::iovSorter ( const std::tuple< cond::Time_t, cond::Hash, boost::posix_time::ptime > &  f,
const std::tuple< cond::Time_t, cond::Hash, boost::posix_time::ptime > &  s 
)

Definition at line 180 of file IOVEditor.cc.

References f, and alignCSCRings::s.

Referenced by cond::persistency::IOVEditor::flush().

181  {
182  return std::get<0>(f) < std::get<0>(s);
183  }
double f[11][100]

◆ is_same_any() [1/2]

template<typename T , typename Arg1 >
constexpr bool cond::persistency::is_same_any ( )

Definition at line 276 of file DbCore.h.

References relativeConstraints::value.

◆ is_same_any() [2/2]

template<typename T , typename Arg1 , typename Arg2 , typename... Args>
constexpr bool cond::persistency::is_same_any ( )

Definition at line 281 of file DbCore.h.

281  {
282  return is_same_any<T, Arg1>() || is_same_any<T, Arg2, Args...>();
283  };

◆ makeHash()

cond::Hash cond::persistency::makeHash ( const std::string &  objectType,
const cond::Binary data 
)

Definition at line 10 of file IOVSchema.cc.

References data, EVP_MD_CTX_free, EVP_MD_CTX_new, cond::hash, mps_fire::i, cms::openssl_init(), throwException(), and createJobs::tmp.

Referenced by cond::persistency::PAYLOAD::Table::insertIfNew().

10  {
12  EVP_MD_CTX* mdctx = EVP_MD_CTX_new();
13  const EVP_MD* md = EVP_get_digestbyname("SHA1");
14  if (!EVP_DigestInit_ex(mdctx, md, nullptr)) {
15  throwException("SHA1 initialization error.", "IOVSchema::makeHash");
16  }
17  if (!EVP_DigestUpdate(mdctx, objectType.c_str(), objectType.size())) {
18  throwException("SHA1 processing error (1).", "IOVSchema::makeHash");
19  }
20  if (!EVP_DigestUpdate(mdctx, data.data(), data.size())) {
21  throwException("SHA1 processing error (2).", "IOVSchema::makeHash");
22  }
23  unsigned char hash[EVP_MAX_MD_SIZE];
24  unsigned int md_len = 0;
25  if (!EVP_DigestFinal_ex(mdctx, hash, &md_len)) {
26  throwException("SHA1 finalization error.", "IOVSchema::makeHash");
27  }
28  EVP_MD_CTX_free(mdctx);
29  char tmp[EVP_MAX_MD_SIZE * 2 + 1];
30  // re-write bytes in hex
31  if (md_len > 20) {
32  md_len = 20;
33  }
34  for (unsigned int i = 0; i < md_len; i++) {
35  ::sprintf(&tmp[i * 2], "%02x", hash[i]);
36  }
37  tmp[md_len * 2] = 0;
38  return tmp;
39  }
void openssl_init()
Definition: openssl_init.cc:5
#define EVP_MD_CTX_free
Definition: openssl_init.h:7
#define EVP_MD_CTX_new
Definition: openssl_init.h:6
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
tmp
align.sh
Definition: createJobs.py:716
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12

◆ parseConnectionString()

std::tuple<std::string, std::string, std::string> cond::persistency::parseConnectionString ( const std::string &  connectionString)
inline

Definition at line 95 of file Utils.h.

References autoCondModifiers::connectionString, getConnectionProtocol(), findAndChange::protocol, serviceName, AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

Referenced by CondDBESSource::CondDBESSource(), and CondDBESSource::fillTagCollectionFromGT().

95  {
98  std::string databaseName("");
99  if (protocol == "sqlite" || protocol == "sqlite_file" || protocol == "sqlite_fip") {
100  databaseName = connectionString.substr(protocol.size() + 1);
101  } else if (protocol == "oracle" || protocol == "frontier") {
102  size_t ptr = protocol.size() + 1;
103  if (connectionString.substr(ptr, 2) != "//")
105  "Connection string " + connectionString + " is invalid format for technology \"" + protocol + "\".",
106  "parseConnectionString");
107  ptr += 2;
108  size_t serviceEnd = connectionString.find('/', ptr);
109  if (serviceEnd == std::string::npos)
110  throwException("Connection string " + connectionString + " is invalid.", "parseConnectionString");
111  serviceName = connectionString.substr(ptr, serviceEnd - ptr);
112  ptr = serviceEnd + 1;
113  databaseName = connectionString.substr(ptr);
114  } else
115  throwException("Technology " + protocol + " is not known.", "parseConnectionString");
116 
117  return std::make_tuple(protocol, serviceName, databaseName);
118  }
std::string getConnectionProtocol(const std::string &connectionString)
Definition: Utils.h:86
static const std::string serviceName
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12

◆ parseFipConnectionString()

std::string cond::persistency::parseFipConnectionString ( const std::string &  fipConnect)

Definition at line 27 of file DbConnectionString.cc.

References GlobalPosition_Frontier_DevDB_cff::connect, edm::FileInPath::fullPath(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by getConnectionParams().

27  {
28  std::string connect("sqlite_file:");
29  std::string::size_type pos = fipConnect.find(':');
30  std::string fipLocation = fipConnect.substr(pos + 1);
31  edm::FileInPath fip(fipLocation);
32  connect.append(fip.fullPath());
33  return connect;
34  }
uint16_t size_type

◆ parseTag()

std::pair< std::string, std::string > cond::persistency::parseTag ( const std::string &  tag)

Definition at line 14 of file GTProxy.cc.

References AlCaHLTBitMon_QueryRunRegistry::string, submitPVValidationJobs::t, and makeGlobalPositionRcd_cfg::tag.

Referenced by CondDBESSource::CondDBESSource(), and CondDBESSource::setIntervalFor().

14  {
15  std::string pfn("");
16  std::string t(tag);
17  size_t pos = tag.rfind('[');
18  if (pos != std::string::npos && tag.size() >= pos + 2) {
19  if (tag[pos - 1] == '@' && tag[tag.size() - 1] == ']') {
20  pfn = tag.substr(pos + 1, tag.size() - pos - 2);
21  t = tag.substr(0, pos - 1);
22  }
23  }
24  return std::make_pair(t, pfn);
25  }

◆ print_timestamp()

std::string cond::persistency::print_timestamp ( const boost::posix_time::ptime &  t,
const char *  format_s = "%Y-%m-%d %H:%M:%S.%f" 
)

Definition at line 91 of file Logger.cc.

References submitPVValidationJobs::t, and cond::timestamp.

Referenced by get_timestamp(), and get_timestamp_for_filename().

91  :%M:%S.%f") {
92  boost::posix_time::time_facet* facet = new boost::posix_time::time_facet();
93  facet->format(format_s);
94  std::stringstream timestamp;
95  timestamp.imbue(std::locale(std::locale::classic(), facet));
96  timestamp << t;
97  return timestamp.str();
98  }
double f[11][100]

◆ search()

template<typename T >
std::vector<T>::const_iterator cond::persistency::search ( const cond::Time_t val,
const std::vector< T > &  container 
)

◆ Session::storePayload< std::string >()

template<>
cond::Hash cond::persistency::Session::storePayload< std::string > ( const std::string &  payload,
const boost::posix_time::ptime &  creationTime 
)
inline

Definition at line 199 of file Session.h.

References beamSpotPI::creationTime, MillePedeFileConverter_cfg::e, jetsAK4_Puppi_cff::payload, runTheMatrix::ret, cond::serialize(), AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

200  {
201  std::string payloadObjectType("std::string");
202  cond::Hash ret;
203  try {
204  ret = storePayloadData(payloadObjectType, serialize(payload), creationTime);
205  } catch (const cond::persistency::Exception& e) {
206  std::string em(e.what());
207  throwException("Payload of type " + payloadObjectType + " could not be stored. " + em, "Session::storePayload");
208  }
209  return ret;
210  }
Base exception class for the object to relational access.
Definition: Exception.h:11
std::pair< Binary, Binary > serialize(const T &payload)
Definition: Serialization.h:66
ret
prodAgent to be discontinued
std::string Hash
Definition: Types.h:43
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12

◆ setTillToLastIov()

void cond::persistency::setTillToLastIov ( cond::Iov_t target,
cond::Time_t  endOfValidity 
)

Definition at line 249 of file IOVProxy.cc.

References cond::time::MAX_VAL(), and filterCSVwithJSON::target.

Referenced by cond::persistency::IOVProxy::getLast(), and cond::persistency::IOVProxy::iovSequenceInfo().

249  {
250  if (endOfValidity < cond::time::MAX_VAL) {
251  if (target.since >= endOfValidity) {
252  target.clear();
253  } else {
254  target.till = endOfValidity;
255  }
256  } else {
258  }
259  }
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())

◆ static_assert_is_same_decayed()

template<typename T , typename P >
void cond::persistency::static_assert_is_same_decayed ( )
inline

Definition at line 84 of file DbCore.h.

84  {
85  static_assert(std::is_same<typename std::decay<T>::type, typename std::decay<P>::type>::value,
86  "Parameter types don't match with the RowBuffer types");
87  };
Definition: value.py:1

◆ throwException()

void cond::persistency::throwException ( const std::string &  message,
const std::string &  methodName 
)

Definition at line 12 of file Exception.cc.

Referenced by L1CondDBIOVWriterExt::analyze(), L1CondDBPayloadWriterExt::analyze(), L1CondDBIOVWriter::analyze(), L1CondDBPayloadWriter::analyze(), MillePedeAlignmentAlgorithm::beginRun(), cond::persistency::RunInfoEditor::checkTransaction(), cond::persistency::GTEditor::checkTransaction(), cond::persistency::IOVEditor::checkTransaction(), cond::persistency::RunInfoProxy::checkTransaction(), cond::persistency::GTProxy::checkTransaction(), cond::persistency::IOVProxy::checkTransaction(), convertoToOracleConnection(), copyIov(), cond::persistency::Session::coralSession(), cond::persistency::GLOBAL_TAG::Table::create(), cond::persistency::TAG::Table::create(), cond::persistency::RUN_INFO::Table::create(), cond::persistency::GLOBAL_TAG_MAP::Table::create(), cond::persistency::PAYLOAD::Table::create(), cond::persistency::IOV::Table::create(), cond::persistency::TAG_AUTHORIZATION::Table::create(), cond::persistency::TAG_LOG::Table::create(), cond::persistency::Session::createGlobalTag(), cond::persistency::Session::createIov(), cond::persistency::Session::createIovForPayload(), cond::persistency::Query< Types... >::currentRow(), fetch(), fetchOne(), cond::persistency::Session::fetchPayload(), cond::persistency::RunInfoEditor::flush(), cond::persistency::GTEditor::flush(), cond::persistency::IOVEditor::flush(), cond::persistency::RunInfoProxy::get(), getConnectionProtocol(), cond::persistency::IOVProxy::getInterval(), cond::persistency::Session::getLastRun(), cond::persistency::IOVProxy::getMetadata(), cond::persistency::Session::getRunInfo(), cond::persistency::KeyList::getUsingIndex(), import(), importIovs(), MillePedeAlignmentAlgorithm::initialize(), cond::persistency::IOVProxy::iovSequenceInfo(), cond::persistency::GTEditor::load(), cond::persistency::RunInfoProxy::load(), cond::persistency::GTProxy::load(), cond::persistency::IOVProxy::load(), cond::persistency::KeyList::loadFromDB(), cond::persistency::PayloadProxy< std::vector< cond::Time_t > >::loadPayload(), makeHash(), cond::persistency::Query< Types... >::next(), cond::persistency::SessionImpl::openDb(), cond::persistency::SessionImpl::openGTDb(), cond::persistency::SessionImpl::openIovDb(), cond::persistency::SessionImpl::openRunInfoDb(), cond::persistency::PayloadProxy< std::vector< cond::Time_t > >::operator()(), cond::persistency::GetFromRow< std::array< char, n > >::operator()(), parseConnectionString(), cond::persistency::Logger::saveOnDb(), cond::persistency::IOVProxy::selectAll(), cond::persistency::IOVProxy::selectRange(), Session::storePayload< std::string >(), cond::setPermissionData(), cond::persistency::TAG::Table::setProtectionCode(), cond::CredentialStore::startSession(), cond::persistency::SessionImpl::startTransaction(), cond::persistency::Session::storePayload(), cond::persistency::IOVSchema::tagAccessPermissionTable(), cond::persistency::TAG::Table::unsetProtectionCode(), cond::updateConnectionData(), and cond::updatePrincipalData().

12  {
13  throw Exception(message, methodName);
14  }