CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

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

Definition at line 25 of file IOVProxy.h.

Enumeration Type Documentation

Enumerator
UndefinedAuthentication 
CondDbKey 
CoralXMLFile 

Definition at line 32 of file ConnectionPool.h.

Function Documentation

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

Definition at line 120 of file Utils.h.

References match(), 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:47
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
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, cond::persistency::Session::createIov(), cond::persistency::Session::editIov(), cond::persistency::Session::existsIov(), cond::persistency::IOVEditor::flush(), cond::persistency::IOVEditor::insert(), run_AlCaRecoTriggerBitsUpdateWorkflow::iovs, AlCaHLTBitMon_ParallelJobs::p, cond::persistency::IOVEditor::payloadType(), cond::Tag_t::payloadType, cond::persistency::Session::readIov(), cond::persistency::IOVProxy::selectAll(), cond::persistency::IOVEditor::setDescription(), cond::persistency::TransactionScope::start(), cond::Tag_t::synchronizationType, cond::persistency::IOVProxy::tagInfo(), throwException(), cond::persistency::IOVEditor::timeType(), cond::Tag_t::timeType, and cond::persistency::Session::transaction().

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  }
tuple cout
Definition: gather_cfg.py:144
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
unsigned int cond::persistency::countslash ( const std::string &  input)

Definition at line 13 of file DbConnectionString.cc.

References submitPVResolutionJobs::count.

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:47
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 init.

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  }
int init
Definition: HydjetWrapper.h:64
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
long double T
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 cond::Binary::get().

104  {
105  if (init)
106  data.extend<coral::Blob>(attributeName);
107  data[attributeName].bind(param.get());
108  }
int init
Definition: HydjetWrapper.h:64
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
const coral::Blob & get() const
Definition: Binary.cc:30
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.

114  {
115  if (init)
116  data.extend<coral::TimeStamp>(attributeName);
117  data[attributeName].data<coral::TimeStamp>() = coral::TimeStamp(param);
118  }
int init
Definition: HydjetWrapper.h:64
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
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 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  }
int init
Definition: HydjetWrapper.h:64
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::string timeTypeName(TimeType type)
Definition: Time.cc:19
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 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
int init
Definition: HydjetWrapper.h:64
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
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 f_add_attribute(), init, and mergeVDriftHistosByStation::name.

142  {
143  static_assert_is_same_decayed<typename Column::type, P>();
145  }
int init
Definition: HydjetWrapper.h:64
void f_add_attribute(coral::AttributeList &data, const std::string &attributeName, const T &param, bool init=true)
Definition: DbCore.h:91
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
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 findQualityFiles::size.

269  {
270  table.insertColumn(columnName, AttributeTypeName<T>()(), size);
271  if (notNull)
272  table.setNotNullConstraint(columnName);
273  }
tuple size
Write out results.
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  }
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 f_add_attribute(), gpuClustering::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  }
uint16_t *__restrict__ id
void f_add_attribute(coral::AttributeList &data, const std::string &attributeName, const T &param, bool init=true)
Definition: DbCore.h:91
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::pair< std::string, std::shared_ptr< void > > cond::persistency::fetch ( const cond::Hash payloadId,
Session session 
)

Definition at line 341 of file CondDBFetch.cc.

References data, fetchOne(), cond::persistency::Session::fetchPayloadData(), newFWLiteAna::found, AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

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

341  {
342  std::shared_ptr<void> payloadPtr;
344  cond::Binary streamerInfo;
345  std::string payloadTypeName;
346  bool found = session.fetchPayloadData(payloadId, payloadTypeName, data, streamerInfo);
347  if (!found)
348  throwException("Payload with id " + payloadId + " has not been found in the database.", "fetch");
349  return fetchOne(payloadTypeName, data, streamerInfo, payloadPtr);
350  }
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:79
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
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(), cond::persistency::Session::fetchPayloadData(), 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:79
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, match(), AlCaHLTBitMon_QueryRunRegistry::string, and throwException().

Referenced by fetch(), and fetchIfExists().

26  {
27  bool match = false;
29  FETCH_PAYLOAD_CASE(std::vector<unsigned long long>)
181  FETCH_PAYLOAD_CASE(JME::JetResolutionObject)
220  FETCH_PAYLOAD_CASE(l1t::CaloParams)
221  FETCH_PAYLOAD_CASE(l1t::CaloConfig)
236  FETCH_PAYLOAD_CASE(lumi::LumiSectionData)
241  FETCH_PAYLOAD_CASE(PhysicsTools::Calibration::MVAComputerContainer)
250  //FETCH_PAYLOAD_CASE( PerformancePayload )
307  FETCH_PAYLOAD_CASE(cond::BaseKeyed)
319 
320  //
321  if (payloadTypeName == "PhysicsTools::Calibration::Histogram3D<double,double,double,double>") {
322  payloadPtr = deserialize<PhysicsTools::Calibration::Histogram3D<double, double, double, double> >(
323  payloadTypeName, data, streamerInfo);
324  match = true;
325  }
326  if (payloadTypeName == "PhysicsTools::Calibration::Histogram2D<double,double,double>") {
327  payloadPtr = deserialize<PhysicsTools::Calibration::Histogram2D<double, double, double> >(
328  payloadTypeName, data, streamerInfo);
329  match = true;
330  }
331  if (payloadTypeName == "std::vector<unsignedlonglong,std::allocator<unsignedlonglong>>") {
332  payloadPtr = deserialize<std::vector<unsigned long long> >(payloadTypeName, data, streamerInfo);
333  match = true;
334  }
335 
336  if (!match)
337  throwException("Payload type \"" + payloadTypeName + "\" is unknown.", "fetch");
338  return std::make_pair(payloadTypeName, payloadPtr);
339  }
Definition: ESGain.h:7
#define FETCH_PAYLOAD_CASE(TYPENAME)
Definition: CondDBFetch.cc:3
Definition: DTT0.h:48
Histogram3D< double > HistogramD3D
Definition: Histogram3D.h:184
QGLikelihoodObject containing valid range and entries with category and histogram (mean is not used a...
if(conf_.getParameter< bool >("UseStripCablingDB"))
Channel-mask mapping.
Category structure: ranges associated with QGLikelihood histograms.
list lumi
Definition: dqmdumpme.py:53
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:79
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.
std::string cond::persistency::fullyQualifiedTag ( const std::string &  tag,
const std::string &  connectionString 
)

Definition at line 8 of file GTProxy.cc.

Referenced by CondDBESSource::CondDBESSource().

8  {
9  if (connectionString.empty())
10  return tag;
11  return tag + "@[" + connectionString + "]";
12  }
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
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
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(), cmsLHEtoEOSManager::l, edm::SiteLocalConfig::lookupCalibConnect(), parseFipConnectionString(), alignCSCRings::s, 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://");
49  std::string::size_type fpos = connectionString.find(protocol);
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)
std::string cond::persistency::getConnectionProtocol ( const std::string &  connectionString)
inline

Definition at line 86 of file Utils.h.

References 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
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 cmsStageWithFailover::destination, IMPORT_PAYLOAD_CASE, match(), 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>)
199  IMPORT_PAYLOAD_CASE(JME::JetResolutionObject)
238  IMPORT_PAYLOAD_CASE(l1t::CaloParams)
239  IMPORT_PAYLOAD_CASE(l1t::CaloConfig)
254  if (inputTypeName == "L1TriggerKeyList") {
255  match = true;
256  throwException("Import of \"L1TriggerKeyList\" type payloads is not supported.", "import");
257  }
258  //IMPORT_PAYLOAD_CASE( L1TriggerKeyList )
266  IMPORT_PAYLOAD_CASE(PhysicsTools::Calibration::MVAComputerContainer)
273  //IMPORT_PAYLOAD_CASE( PerformancePayload )
333  IMPORT_PAYLOAD_CASE(cond::BaseKeyed)
344  if (inputTypeName == "PhysicsTools::Calibration::Histogram3D<double,double,double,double>") {
345  match = true;
348  payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time());
349  }
350  if (inputTypeName == "PhysicsTools::Calibration::Histogram2D<double,double,double>") {
351  match = true;
354  payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time());
355  }
356  if (inputTypeName == "std::vector<unsignedlonglong,std::allocator<unsignedlonglong>>") {
357  match = true;
358  const std::vector<unsigned long long>& obj = *static_cast<const std::vector<unsigned long long>*>(inputPtr);
359  payloadId = destination.storePayload(obj, boost::posix_time::microsec_clock::universal_time());
360  }
361 
362  if (!match)
363  throwException("Payload type \"" + inputTypeName + "\" is unknown.", "import");
364  }
365  return payloadId;
366  }
Definition: ESGain.h:7
Definition: DTT0.h:48
Histogram3D< double > HistogramD3D
Definition: Histogram3D.h:184
QGLikelihoodObject containing valid range and entries with category and histogram (mean is not used a...
if(conf_.getParameter< bool >("UseStripCablingDB"))
#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.
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 SplitLinear::begin, cond::persistency::Session::connectionString(), gather_cfg::cout, cond::persistency::Session::createDatabase(), cond::persistency::Session::createIov(), cond::persistency::Session::editIov(), dataset::end, cond::persistency::Session::existsDatabase(), cond::persistency::Session::existsIov(), cond::persistency::IOVArray::find(), cond::persistency::IOVEditor::flush(), cond::persistency::IOVProxy::getInterval(), importPayload(), cond::persistency::IOVEditor::insert(), run_AlCaRecoTriggerBitsUpdateWorkflow::iovs, AlCaHLTBitMon_ParallelJobs::p, cond::persistency::IOVEditor::payloadType(), cond::Tag_t::payloadType, cond::persistency::Session::readIov(), cond::persistency::IOVProxy::selectAll(), cond::persistency::IOVProxy::selectRange(), cond::persistency::IOVEditor::setDescription(), SiStripO2O_cfg_template::since, EcalCondDB::sinces, createPayload::skip, cond::persistency::TransactionScope::start(), cond::Tag_t::synchronizationType, cond::persistency::IOVProxy::tagInfo(), throwException(), cond::persistency::IOVEditor::timeType(), cond::Tag_t::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
string end
Definition: dataset.py:937
tuple cout
Definition: gather_cfg.py:144
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
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_FULL_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:341
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 validate-o2o-wbm::f.

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

181  {
182  return std::get<0>(f) < std::get<0>(s);
183  }
template<typename T , typename Arg1 >
constexpr bool cond::persistency::is_same_any ( )

Definition at line 276 of file DbCore.h.

References relativeConstraints::value.

276  {
278  };
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  };
cond::Hash cond::persistency::makeHash ( const std::string &  objectType,
const cond::Binary data 
)

Definition at line 11 of file IOVSchema.cc.

References cond::Binary::data(), cond::hash, mps_fire::i, cond::Binary::size(), throwException(), and createJobs::tmp.

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

11  {
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  }
size_t size() const
Definition: Binary.cc:48
const void * data() const
Definition: Binary.cc:37
tmp
align.sh
Definition: createJobs.py:716
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
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 getConnectionProtocol(), 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
std::string cond::persistency::parseFipConnectionString ( const std::string &  fipConnect)

Definition at line 27 of file DbConnectionString.cc.

References convertSQLitetoXML_cfg::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
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, and submitPVValidationJobs::t.

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  }
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  }
template<typename T >
std::vector<T>::const_iterator cond::persistency::search ( const cond::Time_t val,
const std::vector< T > &  container 
)
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, alignCSCRings::e, jetCorrFactors_cfi::payload, runTheMatrix::ret, cond::serialize(), AlCaHLTBitMon_QueryRunRegistry::string, throwException(), and cms::Exception::what().

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  }
tuple ret
prodAgent to be discontinued
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
char const * what() const noexceptoverride
Definition: Exception.cc:103
std::string Hash
Definition: Types.h:43
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:12
void cond::persistency::setTillToLastIov ( cond::Iov_t target,
cond::Time_t  endOfValidity 
)

Definition at line 248 of file IOVProxy.cc.

References cond::Iov_t::clear(), cond::time::MAX_VAL(), cond::Iov_t::since, and cond::Iov_t::till.

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

248  {
249  if (endOfValidity < cond::time::MAX_VAL) {
250  if (target.since >= endOfValidity) {
251  target.clear();
252  } else {
253  target.till = endOfValidity;
254  }
255  } else {
256  target.till = cond::time::MAX_VAL;
257  }
258  }
virtual void clear()
Definition: Types.cc:10
Time_t since
Definition: Types.h:53
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
Time_t till
Definition: Types.h:54
template<typename T , typename P >
void cond::persistency::static_assert_is_same_decayed ( )
inline

Definition at line 84 of file DbCore.h.

References relativeConstraints::value.

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  };
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  }