CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CondDBTools.cc
Go to the documentation of this file.
4 //
7 //
8 #include <boost/filesystem.hpp>
9 #include <boost/regex.hpp>
10 #include <boost/bind.hpp>
11 
12 namespace cond {
13 
14  namespace persistency {
15 
16  table( COND_LOG_TABLE ) {
20  }
21 
22  static const boost::regex popcon_many("PopCon[[:print:]]+?first payload Since ([[:alnum:]]+?),.*");
23  static const boost::regex duplicate("duplicateIOV[[:print:]]+?[S|s]ince[=| ]([[:alnum:]]+?);.*");
24  static const boost::regex popcon_one("PopCon[[:print:]]+?;Since ([[:alnum:]]+?);.*");
25  static const boost::regex exportIOV("exportIOV[[:print:]]+?;since=([[:alnum:]]+?),[[:print:]]+?; *copied=([[:alnum:]]+?);.*");
26  //
27  static const std::string time_0("2008-01-01 00:00:42.000");
28 
29  size_t copyTag( const std::string& sourceTag,
30  Session& sourceSession,
31  const std::string& destTag,
32  Session& destSession,
33  UpdatePolicy policy,
34  bool log,
35  bool forValidation ){
36  persistency::TransactionScope ssc( sourceSession.transaction() );
37  ssc.start();
38  if( log && !forValidation ) std::cout <<" Loading source iov..."<<std::endl;
39  persistency::IOVProxy p = sourceSession.readIov( sourceTag, true );
40  if( p.loadedSize()==0 ) {
41  if( log ) std::cout <<" Tag contains 0 iovs."<<std::endl;
42  return 0;
43  }
44  if( log && !forValidation ) std::cout <<" Copying tag. Iov size:"<<p.loadedSize()<<" timeType:"<<p.timeType()<<" payloadObjectType=\""<<p.payloadObjectType()<<"\""<<std::endl;
45 
47  persistency::TransactionScope dsc( destSession.transaction() );
48  dsc.start( false );
49  bool exists = false;
50  if( !destSession.existsDatabase() ) {
51  destSession.createDatabase();
52  } else {
53  exists = destSession.existsIov( destTag );
54  }
55  if( exists ){
56  if( policy == REPLACE ){
57  destSession.clearIov( destTag );
58  } else if( policy == NEW ){
59  destSession.transaction().rollback();
60  throwException(" Tag \""+destTag+"\" already exists.","copyTag");
61  }
62  editor = destSession.editIov( destTag );
63  } else {
64  editor = destSession.createIov( p.payloadObjectType(), destTag, p.timeType(), p.synchronizationType() );
65  }
66  if( forValidation ) {
67  editor.setValidationMode();
68  editor.setDescription("Validation");
69  } else {
70  editor.setDescription("Tag "+sourceTag+" migrated from "+sourceSession.connectionString());
71  }
72  size_t niovs = 0;
73  std::set<cond::Hash> pids;
74  std::set<cond::Time_t> sinces;
75  for( auto iov : p ){
76  // skip duplicated sinces
77  if( sinces.find( iov.since ) != sinces.end() ){
78  if( log && !forValidation ) std::cout <<" WARNING. Skipping duplicated since="<<iov.since<<std::endl;
79  continue;
80  }
81  sinces.insert( iov.since );
82  // make sure that we import the payload _IN_USE_
83  auto usedIov = p.getInterval( iov.since );
84  std::pair<std::string,boost::shared_ptr<void> > readBackPayload = fetch( usedIov.payloadId, sourceSession );
85  cond::Hash ph = import( sourceSession, usedIov.payloadId, readBackPayload.first, readBackPayload.second.get(), destSession );
86  editor.insert( iov.since, ph );
87  pids.insert( ph );
88  niovs++;
89  if( log && !forValidation && niovs && (niovs%1000==0) ) std::cout <<" Total of iov inserted: "<<niovs<<" payloads: "<<pids.size()<<std::endl;
90  }
91  if( log && !forValidation) std::cout <<" Total of iov inserted: "<<niovs<<" payloads: "<<pids.size()<<std::endl;
92  if( log && !forValidation) std::cout <<" Flushing changes..."<<std::endl;
93  editor.flush();
94  dsc.commit();
95  ssc.commit();
96  return niovs;
97  }
98 
100  cond::DbSession& logDbSession,
101  std::vector<std::pair<cond::Time_t,boost::posix_time::ptime> >& loggedInsertions ){
102  logDbSession.transaction().start( true );
103  std::set<cond::Time_t> loggedSinces;
105  q.addCondition<COND_LOG_TABLE::IOVTAG>( tag );
106  for ( auto row : q ) {
107  if( std::get<1>( row ).empty() ) continue;
108  boost::smatch matches;
109  cond::Time_t since_t = 0;
110  size_t copied_n = 0;
111 
112  if (boost::regex_match(std::get<1>( row ), matches, popcon_many )){
113  since_t = boost::lexical_cast<unsigned long long>(matches[1]);
114  copied_n = 1;
115  } else if (boost::regex_match(std::get<1>( row ), matches, popcon_one )){
116  since_t = boost::lexical_cast<unsigned long long>(matches[1]);
117  copied_n = 1;
118  } else if (boost::regex_match(std::get<1>( row ), matches, exportIOV )){
119  since_t = boost::lexical_cast<unsigned long long>(matches[1]);
120  copied_n = boost::lexical_cast<unsigned long long>(matches[2]);
121  } else if( boost::regex_match(std::get<1>( row ), matches, duplicate )){
122  since_t = boost::lexical_cast<unsigned long long>(matches[1]);
123  copied_n = 1;
124  } else {
125  //throwException( "Tag "+tag+": could not parse the PopConLog info entry: "+std::get<1>( row ), "migrateTag" );
126  std::cout <<"ERROR: tag "<<tag<<": could not parse the PopConLog info entry: \""<<std::get<1>( row )<<"\""<<std::endl;
127  loggedSinces.clear();
128  break;
129  }
130  // if the insertion of a given since happens also later ( maybe it was deleted and re-written ), we keep the first insertion time...
131  if( loggedSinces.find( since_t ) == loggedSinces.end() && copied_n>0 ){
132  std::string s_t = std::get<0>( row );
133  int Y,M,D,h,m,s;
134  if(sscanf( s_t.c_str(), "%d-%d-%d-%d:%d:%d",&Y,&M,&D,&h,&m,&s) != 6 ){
135  throwException( "Tag "+tag+": time information can't be parsed.","migrateTag");
136  }
137  char parsable_s_t[23];
138  sprintf( parsable_s_t, "%04d-%02d-%02d %02d:%02d:%02d.000",Y,M,D,h,m,s );
139  //std::cout <<"## since="<<since_t<<" time="<<std::string( parsable_s_t )<<std::endl;
140  boost::posix_time::ptime insertionTime = boost::posix_time::time_from_string( std::string( parsable_s_t ) );
141  loggedInsertions.push_back( std::make_pair( since_t, insertionTime ) );
142  loggedSinces.insert( since_t );
143  }
144  }
145  logDbSession.transaction().commit();
146 
147  std::sort( loggedInsertions.begin(),
148  loggedInsertions.end(),
149  boost::bind( std::less<cond::Time_t>(),
152  ));
153  return loggedInsertions.size()>0;
154  }
155 
156  // comparison functor for iov tuples: Time_t only and Time_t,string
157  struct IOVComp {
158  bool operator()( const cond::Time_t& x, const std::pair<cond::Time_t,boost::posix_time::ptime>& y ){ return ( x < y.first ); }
159  };
160 
161  // function to search in the vector the target time
162  template <typename T> typename std::vector<T>::const_iterator search( const cond::Time_t& val, const std::vector<T>& container ){
163  if( !container.size() ) return container.end();
164  auto p = std::upper_bound( container.begin(), container.end(), val, IOVComp() );
165  return (p!= container.begin()) ? p-1 : container.end();
166  }
167 
169  Session& sourceSession,
170  const std::string& destTag,
171  Session& destSession,
172  UpdatePolicy policy,
173  cond::DbSession& logDbSession){
174  persistency::TransactionScope ssc( sourceSession.transaction() );
175  ssc.start();
176  std::cout <<" Loading source iov..."<<std::endl;
177  persistency::IOVProxy p = sourceSession.readIov( sourceTag, true );
178  if( p.loadedSize()==0 ) {
179  std::cout <<" Tag contains 0 iovs."<<std::endl;
180  return 0;
181  }
182 
183  std::vector<std::pair<cond::Time_t,boost::posix_time::ptime> > loggedInsertions;
184  std::tuple<std::string, boost::posix_time::ptime, boost::posix_time::ptime > metadata = p.getMetadata();
185  boost::posix_time::ptime creationTime = boost::posix_time::time_from_string( time_0 );
186  if( p.loadedSize() == 1 ){
187  creationTime = std::get<2>(metadata);
188  //std::cout <<"## creation time="<<creationTime<<std::endl;
189  } else {
190  getInsertionLogs( sourceTag, logDbSession, loggedInsertions );
191  if( !loggedInsertions.empty() ) creationTime = loggedInsertions[0].second;
192  }
193 
194  std::cout <<" Copying tag. Iov size:"<<p.loadedSize()<<" timeType:"<<p.timeType()<<" payloadObjectType=\""<<p.payloadObjectType()<<"\""<<std::endl;
195 
197  persistency::TransactionScope dsc( destSession.transaction() );
198  dsc.start( false );
199  bool exists = false;
200  if( !destSession.existsDatabase() ) {
201  destSession.createDatabase();
202  } else {
203  exists = destSession.existsIov( destTag );
204  }
205  if( exists ){
206  if( policy == REPLACE ){
207  destSession.clearIov( destTag );
208  } else if( policy == NEW ){
209  destSession.transaction().rollback();
210  throwException(" Tag \""+destTag+"\" already exists.","copyTag");
211  }
212  editor = destSession.editIov( destTag );
213  } else {
214  editor = destSession.createIov( p.payloadObjectType(), destTag, p.timeType(), p.synchronizationType(), creationTime );
215  editor.setDescription( std::get<0>( metadata ));
216  }
217  size_t niovs = 0;
218  std::set<cond::Hash> pids;
219  std::set<cond::Time_t> sinces;
220  for( auto iov : p ){
221  // skip duplicated sinces
222  if( sinces.find( iov.since ) != sinces.end() ){
223  std::cout <<" WARNING. Skipping duplicated since="<<iov.since<<std::endl;
224  continue;
225  }
226  sinces.insert( iov.since );
227 
228  boost::posix_time::ptime insertionTime = creationTime;
229  if( !loggedInsertions.empty() ){
230  auto iL = search( iov.since, loggedInsertions );
231  if( iL != loggedInsertions.end() ) insertionTime = iL->second;
232  }
233 
234  // make sure that we import the payload _IN_USE_
235  auto usedIov = p.getInterval( iov.since );
236  std::pair<std::string,boost::shared_ptr<void> > readBackPayload = fetch( usedIov.payloadId, sourceSession );
237  cond::Hash ph = import( sourceSession, usedIov.payloadId, readBackPayload.first, readBackPayload.second.get(), destSession );
238  //std::cout <<"## inserting iov "<<iov.since<<" on time "<<insertionTime<<std::endl;
239  editor.insert( iov.since, ph, insertionTime );
240  pids.insert( ph );
241  niovs++;
242  if( niovs && (niovs%1000==0) ) {
243  std::cout <<" Total of iov inserted: "<<niovs<<" payloads: "<<pids.size()<<std::endl;
244  std::cout <<" Last since imported: "<<iov.since<<std::endl;
245  }
246  }
247  std::cout <<" Total of iov inserted: "<<niovs<<" payloads: "<<pids.size()<<std::endl;
248  std::cout <<" Flushing changes..."<<std::endl;
249  editor.flush();
250  dsc.commit();
251  ssc.commit();
252  return niovs;
253  }
254 
255 
257  Session& sourceSession,
258  const std::string& destTag,
259  Session& destSession,
262  const std::string& description,
263  bool log ){
264  persistency::TransactionScope ssc( sourceSession.transaction() );
265  ssc.start();
266  if( log ) std::cout <<" Loading source iov..."<<std::endl;
267  persistency::IOVProxy p = sourceSession.readIov( sourceTag, true );
268  if( p.loadedSize()==0 ) {
269  if( log ) std::cout <<" Tag contains 0 iovs."<<std::endl;
270  return 0;
271  } else {
272  if( log ) std::cout <<" Iov size:"<<p.loadedSize()<<" timeType:"<<p.timeType()<<" payloadObjectType=\""<<p.payloadObjectType()<<"\""<<std::endl;
273  }
274  if( (*p.begin()).since > begin ) begin = (*p.begin()).since;
275  if( end < begin ) {
276  if( log ) std::cout <<" No Iov in the selected range."<<std::endl;
277  }
279  persistency::TransactionScope dsc( destSession.transaction() );
280  dsc.start( false );
281  bool exists = false;
282  if( !destSession.existsDatabase() ) {
283  destSession.createDatabase();
284  } else {
285  exists = destSession.existsIov( destTag );
286  }
287  if( exists ){
288  editor = destSession.editIov( destTag );
289  if( editor.timeType() != p.timeType() )
290  throwException( "TimeType of the destination tag does not match with the source tag timeType.", "importIovs");
291  if( editor.payloadType() != p.payloadObjectType() )
292  throwException( "PayloadType of the destination tag does not match with the source tag payloadType.", "importIovs");
293  } else {
294  editor = destSession.createIov( p.payloadObjectType(), destTag, p.timeType(), p.synchronizationType() );
295  if( description.empty() ) editor.setDescription( "Created copying tag "+sourceTag+" from "+sourceSession.connectionString() );
296  else editor.setDescription( description );
297  }
298  size_t niovs = 0;
299  std::set<cond::Hash> pids;
300  std::set<cond::Time_t> sinces;
301  auto iiov = p.find( begin );
302  cond::Time_t newSince = begin;
303  while( iiov != p.end() ){
304  // skip duplicated sinces
305  if( sinces.find( newSince ) != sinces.end() ){
306  if( log ) std::cout <<" WARNING. Skipping duplicated since="<<newSince<<std::endl;
307  continue;
308  }
309  sinces.insert( newSince );
310  // make sure that we import the payload _IN_USE_
311  auto usedIov = p.getInterval( newSince );
312  std::pair<std::string,boost::shared_ptr<void> > readBackPayload = fetch( usedIov.payloadId, sourceSession );
313  cond::Hash ph = import( sourceSession, usedIov.payloadId, readBackPayload.first, readBackPayload.second.get(), destSession );
314  editor.insert( newSince, ph );
315  pids.insert( ph );
316  niovs++;
317  if( log && niovs && (niovs%1000==0) ) std::cout <<" Total of iov inserted: "<<niovs<<" payloads: "<<pids.size()<<std::endl;
318  iiov++;
319  if( iiov == p.end() || (*iiov).since > end ){
320  break;
321  } else {
322  newSince = (*iiov).since;
323  }
324  }
325  if( log ) std::cout <<" Total of iov inserted: "<<niovs<<" payloads: "<<pids.size()<<std::endl;
326  if( log ) std::cout <<" Flushing changes..."<<std::endl;
327  editor.flush();
328  dsc.commit();
329  ssc.commit();
330  return niovs;
331  }
332 
334  const std::string& sourceTag,
335  const std::string& destTag,
336  cond::Time_t sourceSince,
337  cond::Time_t destSince,
338  const std::string& description,
339  bool log ){
341  ssc.start( false );
342  if( log ) std::cout <<" Loading source iov..."<<std::endl;
343  persistency::IOVProxy p = session.readIov( sourceTag, true );
344  if( p.loadedSize()==0 ) {
345  if( log ) std::cout <<" Tag contains 0 iovs."<<std::endl;
346  return false;
347  } else {
348  if( log ) std::cout <<" Iov size:"<<p.loadedSize()<<" timeType:"<<p.timeType()<<" payloadObjectType=\""<<p.payloadObjectType()<<"\""<<std::endl;
349  }
350 
351  auto iiov = p.find( sourceSince );
352  if( iiov == p.end() ){
353  if( log ) std::cout <<"ERROR: No Iov valid found for target time "<<sourceSince<<std::endl;
354  return false;
355  }
356 
358  if( session.existsIov( destTag ) ){
359  editor = session.editIov( destTag );
360  if( editor.timeType() != p.timeType() )
361  throwException( "TimeType of the destination tag does not match with the source tag timeType.", "importIovs");
362  if( editor.payloadType() != p.payloadObjectType() )
363  throwException( "PayloadType of the destination tag does not match with the source tag payloadType.", "importIovs");
364  } else {
365  editor = session.createIov( p.payloadObjectType(), destTag, p.timeType(), p.synchronizationType() );
366  if( description.empty() ) editor.setDescription( "Created copying iovs from tag "+sourceTag );
367  else editor.setDescription( description );
368  }
369 
370  editor.insert( destSince, (*iiov).payloadId );
371 
372  if( log ) std::cout <<" Flushing changes..."<<std::endl;
373  editor.flush();
374  ssc.commit();
375  return true;
376  }
377 
378  size_t exportTagToFile( const std::string& tag, const std::string& destTag, Session& session, const std::string fileName ){
379  ConnectionPool localPool;
380  Session writeSession = localPool.createSession( "sqlite:"+fileName, true );
381  size_t ret = copyTag( tag, session, destTag, writeSession, NEW, false,true );
382  return ret;
383  }
384 
385  bool compareTags( const std::string& firstTag,
386  Session& firstSession,
387  const std::string& firstFileName,
388  const std::string& secondTag,
389  Session& secondSession,
390  const std::string& secondFileName ){
391  size_t n1 = exportTagToFile( firstTag, firstTag, firstSession, firstFileName );
392  if( ! n1 ){
393  std::cout <<"Can't compare empty tag "<<firstTag<<std::endl;
394  return false;
395  }
396  size_t n2 = exportTagToFile( secondTag, firstTag, secondSession, secondFileName );
397  if( ! n2 ){
398  std::cout <<"Can't compare empty tag "<<secondTag<<std::endl;
399  return false;
400  }
401  if( n1 != n2 ) {
402  std::cout <<" Tag size is different. "<<firstSession.connectionString()<<":"<<firstTag<<": "<<n1<<" "<<
403  secondSession.connectionString()<<":"<<secondTag<<": "<<n2<<std::endl;
404  }
405 
406  FILE* file1 = fopen( firstFileName.c_str(), "r" );
407  if( file1 == NULL ){
408  throwException("Can't open file "+firstFileName, "compareTags" );
409  }
410  FILE* file2 = fopen( secondFileName.c_str(), "r" );
411  if( file2 == NULL ){
412  throwException("Can't open file "+secondFileName, "compareTags" );
413  }
414  int N = 10000;
415  char buf1[N];
416  char buf2[N];
417 
418  bool cmpOk = true;
419  size_t totSize = 0;
420  do {
421  size_t r1 = fread( buf1, 1, N, file1 );
422  size_t r2 = fread( buf2, 1, N, file2 );
423 
424  if( r1 != r2 || memcmp( buf1, buf2, r1)) {
425  cmpOk = false;
426  break;
427  }
428  totSize += r1;
429  } while(!feof(file2) || !feof(file2));
430 
431  std::cout <<" "<<totSize<<" bytes compared."<<std::endl;
432  fclose( file1 );
433  fclose( file2 );
434 
435  if( cmpOk ){
436  boost::filesystem::path fp1( firstFileName );
438  boost::filesystem::path fp2( secondFileName );
440  }
441 
442  return cmpOk;
443  }
444 
445  bool validateTag( const std::string& refTag,
446  Session& refSession,
447  const std::string& candTag,
448  Session& candSession ){
449  std::cout <<" Validating..."<<std::endl;
450  std::tuple<std::string,std::string,std::string> connPars = persistency::parseConnectionString( refSession.connectionString() );
451  std::string dbLabel = std::get<2>( connPars );
452  std::string tagLabel = dbLabel+"_"+refTag;
453  std::string refFile = tagLabel+"_ref.db";
454  std::string candFile = tagLabel+"_cand.db";
455  bool ret = compareTags( refTag, refSession, refFile, candTag, candSession, candFile );
456  if( ret ) {
457  boost::filesystem::path refF( refFile );
458  if( boost::filesystem::exists(refF) ) boost::filesystem::remove( refF );
459  boost::filesystem::path candF( candFile );
460  if( boost::filesystem::exists(candF) ) boost::filesystem::remove( candF );
461  }
462  return ret;
463  }
464 
465  }
466 }
467 
cond::SynchronizationType synchronizationType() const
Definition: IOVProxy.cc:174
void clearIov(const std::string &tag)
Definition: Session.cc:139
DbTransaction & transaction()
Definition: DbSession.cc:208
static const boost::regex popcon_one("PopCon[[:print:]]+?;Since ([[:alnum:]]+?);.*")
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, bool log)
Definition: CondDBTools.cc:256
int commit()
commit transaction.
#define NULL
Definition: scimark2.h:8
void setDescription(const std::string &description)
Definition: IOVEditor.cc:116
size_t migrateTag(const std::string &sourceTag, Session &sourceSession, const std::string &destTag, Session &destSession, UpdatePolicy policy, cond::DbSession &logDbSession)
Definition: CondDBTools.cc:168
std::string payloadObjectType() const
Definition: IOVProxy.cc:170
Transaction & transaction()
Definition: Session.cc:66
list sinces
Definition: EcalCondDB.py:80
Iterator begin() const
Definition: IOVProxy.cc:228
U second(std::pair< T, U > const &p)
std::tuple< std::string, boost::posix_time::ptime, boost::posix_time::ptime > getMetadata() const
Definition: IOVProxy.cc:186
int start(bool readOnly=false)
start transaction
std::tuple< std::string, std::string, std::string > parseConnectionString(const std::string &connectionString)
Definition: Utils.h:43
IOVProxy readIov(const std::string &tag, bool full=false)
Definition: Session.cc:81
cond::TimeType timeType() const
Definition: IOVProxy.cc:166
unsigned long long Time_t
Definition: Time.h:16
static const boost::regex duplicate("duplicateIOV[[:print:]]+?[S|s]ince[=| ]([[:alnum:]]+?);.*")
tuple path
else: Piece not in the list, fine.
tuple iov
Definition: o2o.py:307
Session createSession(const std::string &connectionString, bool writeCapable=false, BackendType backType=DEFAULT_DB)
size_t copyTag(const std::string &sourceTag, Session &sourceSession, const std::string &destTag, Session &destSession, UpdatePolicy policy, bool log, bool forValidation)
Definition: CondDBTools.cc:29
Iterator find(cond::Time_t time)
Definition: IOVProxy.cc:258
size_t exportTagToFile(const std::string &tag, const std::string &destTag, Session &session, const std::string fileName)
Definition: CondDBTools.cc:378
void start(bool readOnly=true)
Definition: Session.cc:283
static const boost::regex exportIOV("exportIOV[[:print:]]+?;since=([[:alnum:]]+?),[[:print:]]+?; *copied=([[:alnum:]]+?);.*")
std::string Hash
Definition: Types.h:43
cond::Iov_t getInterval(cond::Time_t time)
Definition: IOVProxy.cc:303
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
#define end
Definition: vmac.h:37
std::pair< std::string, boost::shared_ptr< void > > fetch(const cond::Hash &payloadId, Session &session)
Definition: CondDBFetch.cc:290
bool getInsertionLogs(const std::string &tag, cond::DbSession &logDbSession, std::vector< std::pair< cond::Time_t, boost::posix_time::ptime > > &loggedInsertions)
Definition: CondDBTools.cc:99
std::string connectionString()
Definition: Session.cc:259
bool copyIov(Session &session, const std::string &sourceTag, const std::string &destTag, cond::Time_t souceSince, cond::Time_t destSince, const std::string &description, bool log)
Definition: CondDBTools.cc:333
IOVEditor editIov(const std::string &tag)
Definition: Session.cc:132
tuple description
Definition: idDealer.py:66
#define table(NAME)
Definition: DbCore.h:49
void insert(cond::Time_t since, const cond::Hash &payloadHash, bool checkType=false)
Definition: IOVEditor.cc:138
#define N
Definition: blowfish.cc:9
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:150
#define column(...)
Definition: DbCore.h:74
static const std::string time_0("2008-01-01 00:00:42.000")
tuple editor
Definition: idDealer.py:73
coral::ISchema & nominalSchema()
Definition: DbSession.cc:243
static const boost::regex popcon_many("PopCon[[:print:]]+?first payload Since ([[:alnum:]]+?),.*")
bool existsIov(const std::string &tag)
Definition: Session.cc:88
cond::TimeType timeType() const
Definition: IOVEditor.cc:89
bool validateTag(const std::string &refTag, Session &refSession, const std::string &candTag, Session &candSession)
Definition: CondDBTools.cc:445
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::OFFLINE)
Definition: Session.h:194
#define begin
Definition: vmac.h:30
tuple cout
Definition: gather_cfg.py:121
Definition: DDAxes.h:10
bool operator()(const cond::Time_t &x, const std::pair< cond::Time_t, boost::posix_time::ptime > &y)
Definition: CondDBTools.cc:158
std::string payloadType() const
Definition: IOVEditor.cc:93
bool compareTags(const std::string &firstTag, Session &firstSession, const std::string &firstFileName, const std::string &secondTag, Session &secondSession, const std::string &secondFileName)
Definition: CondDBTools.cc:385
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
Iterator end() const
Definition: IOVProxy.cc:236
std::vector< T >::const_iterator search(const cond::Time_t &val, const std::vector< T > &container)
Definition: IOVProxy.cc:252
tuple log
Definition: cmsBatch.py:347