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  return 0;
278  }
280  persistency::TransactionScope dsc( destSession.transaction() );
281  dsc.start( false );
282  bool exists = false;
283  if( !destSession.existsDatabase() ) {
284  destSession.createDatabase();
285  } else {
286  exists = destSession.existsIov( destTag );
287  }
288  if( exists ){
289  editor = destSession.editIov( destTag );
290  if( editor.timeType() != p.timeType() )
291  throwException( "TimeType of the destination tag does not match with the source tag timeType.", "importIovs");
292  if( editor.payloadType() != p.payloadObjectType() )
293  throwException( "PayloadType of the destination tag does not match with the source tag payloadType.", "importIovs");
294  } else {
295  editor = destSession.createIov( p.payloadObjectType(), destTag, p.timeType(), p.synchronizationType() );
296  if( description.empty() ) editor.setDescription( "Created copying tag "+sourceTag+" from "+sourceSession.connectionString() );
297  else editor.setDescription( description );
298  }
299  size_t niovs = 0;
300  std::set<cond::Hash> pids;
301  std::set<cond::Time_t> sinces;
302  auto iiov = p.find( begin );
303  cond::Time_t newSince = begin;
304  while( iiov != p.end() ){
305  // skip duplicated sinces
306  if( sinces.find( newSince ) != sinces.end() ){
307  if( log ) std::cout <<" WARNING. Skipping duplicated since="<<newSince<<std::endl;
308  continue;
309  }
310  sinces.insert( newSince );
311  // make sure that we import the payload _IN_USE_
312  auto usedIov = p.getInterval( newSince );
313  std::pair<std::string,boost::shared_ptr<void> > readBackPayload = fetch( usedIov.payloadId, sourceSession );
314  cond::Hash ph = import( sourceSession, usedIov.payloadId, readBackPayload.first, readBackPayload.second.get(), destSession );
315  editor.insert( newSince, ph );
316  pids.insert( ph );
317  niovs++;
318  if( log && niovs && (niovs%1000==0) ) std::cout <<" Total of iov inserted: "<<niovs<<" payloads: "<<pids.size()<<std::endl;
319  iiov++;
320  if( iiov == p.end() || (*iiov).since > end ){
321  break;
322  } else {
323  newSince = (*iiov).since;
324  }
325  }
326  if( log ) std::cout <<" Total of iov inserted: "<<niovs<<" payloads: "<<pids.size()<<std::endl;
327  if( log ) std::cout <<" Flushing changes..."<<std::endl;
328  editor.flush();
329  dsc.commit();
330  ssc.commit();
331  return niovs;
332  }
333 
335  const std::string& sourceTag,
336  const std::string& destTag,
337  cond::Time_t sourceSince,
338  cond::Time_t destSince,
339  const std::string& description,
340  bool log ){
342  ssc.start( false );
343  if( log ) std::cout <<" Loading source iov..."<<std::endl;
344  persistency::IOVProxy p = session.readIov( sourceTag, true );
345  if( p.loadedSize()==0 ) {
346  if( log ) std::cout <<" Tag contains 0 iovs."<<std::endl;
347  return false;
348  } else {
349  if( log ) std::cout <<" Iov size:"<<p.loadedSize()<<" timeType:"<<p.timeType()<<" payloadObjectType=\""<<p.payloadObjectType()<<"\""<<std::endl;
350  }
351 
352  auto iiov = p.find( sourceSince );
353  if( iiov == p.end() ){
354  if( log ) std::cout <<"ERROR: No Iov valid found for target time "<<sourceSince<<std::endl;
355  return false;
356  }
357 
359  if( session.existsIov( destTag ) ){
360  editor = session.editIov( destTag );
361  if( editor.timeType() != p.timeType() )
362  throwException( "TimeType of the destination tag does not match with the source tag timeType.", "importIovs");
363  if( editor.payloadType() != p.payloadObjectType() )
364  throwException( "PayloadType of the destination tag does not match with the source tag payloadType.", "importIovs");
365  } else {
366  editor = session.createIov( p.payloadObjectType(), destTag, p.timeType(), p.synchronizationType() );
367  if( description.empty() ) editor.setDescription( "Created copying iovs from tag "+sourceTag );
368  else editor.setDescription( description );
369  }
370 
371  editor.insert( destSince, (*iiov).payloadId );
372 
373  if( log ) std::cout <<" Flushing changes..."<<std::endl;
374  editor.flush();
375  ssc.commit();
376  return true;
377  }
378 
379  size_t exportTagToFile( const std::string& tag, const std::string& destTag, Session& session, const std::string fileName ){
380  ConnectionPool localPool;
381  Session writeSession = localPool.createSession( "sqlite:"+fileName, true );
382  size_t ret = copyTag( tag, session, destTag, writeSession, NEW, false,true );
383  return ret;
384  }
385 
386  bool compareTags( const std::string& firstTag,
387  Session& firstSession,
388  const std::string& firstFileName,
389  const std::string& secondTag,
390  Session& secondSession,
391  const std::string& secondFileName ){
392  size_t n1 = exportTagToFile( firstTag, firstTag, firstSession, firstFileName );
393  if( ! n1 ){
394  std::cout <<"Can't compare empty tag "<<firstTag<<std::endl;
395  return false;
396  }
397  size_t n2 = exportTagToFile( secondTag, firstTag, secondSession, secondFileName );
398  if( ! n2 ){
399  std::cout <<"Can't compare empty tag "<<secondTag<<std::endl;
400  return false;
401  }
402  if( n1 != n2 ) {
403  std::cout <<" Tag size is different. "<<firstSession.connectionString()<<":"<<firstTag<<": "<<n1<<" "<<
404  secondSession.connectionString()<<":"<<secondTag<<": "<<n2<<std::endl;
405  }
406 
407  FILE* file1 = fopen( firstFileName.c_str(), "r" );
408  if( file1 == NULL ){
409  throwException("Can't open file "+firstFileName, "compareTags" );
410  }
411  FILE* file2 = fopen( secondFileName.c_str(), "r" );
412  if( file2 == NULL ){
413  throwException("Can't open file "+secondFileName, "compareTags" );
414  }
415  int N = 10000;
416  char buf1[N];
417  char buf2[N];
418 
419  bool cmpOk = true;
420  size_t totSize = 0;
421  do {
422  size_t r1 = fread( buf1, 1, N, file1 );
423  size_t r2 = fread( buf2, 1, N, file2 );
424 
425  if( r1 != r2 || memcmp( buf1, buf2, r1)) {
426  cmpOk = false;
427  break;
428  }
429  totSize += r1;
430  } while(!feof(file2) || !feof(file2));
431 
432  std::cout <<" "<<totSize<<" bytes compared."<<std::endl;
433  fclose( file1 );
434  fclose( file2 );
435 
436  if( cmpOk ){
437  boost::filesystem::path fp1( firstFileName );
439  boost::filesystem::path fp2( secondFileName );
441  }
442 
443  return cmpOk;
444  }
445 
446  bool validateTag( const std::string& refTag,
447  Session& refSession,
448  const std::string& candTag,
449  Session& candSession ){
450  std::cout <<" Validating..."<<std::endl;
451  std::tuple<std::string,std::string,std::string> connPars = persistency::parseConnectionString( refSession.connectionString() );
452  std::string dbLabel = std::get<2>( connPars );
453  std::string tagLabel = dbLabel+"_"+refTag;
454  std::string refFile = tagLabel+"_ref.db";
455  std::string candFile = tagLabel+"_cand.db";
456  bool ret = compareTags( refTag, refSession, refFile, candTag, candSession, candFile );
457  if( ret ) {
458  boost::filesystem::path refF( refFile );
459  if( boost::filesystem::exists(refF) ) boost::filesystem::remove( refF );
460  boost::filesystem::path candF( candFile );
461  if( boost::filesystem::exists(candF) ) boost::filesystem::remove( candF );
462  }
463  return ret;
464  }
465 
466  }
467 }
468 
cond::SynchronizationType synchronizationType() const
Definition: IOVProxy.cc:199
void clearIov(const std::string &tag)
Definition: Session.cc:148
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:195
Transaction & transaction()
Definition: Session.cc:66
list sinces
Definition: EcalCondDB.py:80
Iterator begin() const
Definition: IOVProxy.cc:257
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:211
int start(bool readOnly=false)
start transaction
std::tuple< std::string, std::string, std::string > parseConnectionString(const std::string &connectionString)
Definition: Utils.h:61
IOVProxy readIov(const std::string &tag, bool full=false)
Definition: Session.cc:81
cond::TimeType timeType() const
Definition: IOVProxy.cc:191
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:288
size_t exportTagToFile(const std::string &tag, const std::string &destTag, Session &session, const std::string fileName)
Definition: CondDBTools.cc:379
void start(bool readOnly=true)
Definition: Session.cc:292
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:317
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:296
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:268
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:334
IOVEditor editIov(const std::string &tag)
Definition: Session.cc:141
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:97
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:446
IOVEditor createIov(const std::string &tag, cond::TimeType timeType, cond::SynchronizationType synchronizationType=cond::OFFLINE)
Definition: Session.h:198
#define begin
Definition: vmac.h:30
tuple cout
Definition: gather_cfg.py:121
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:386
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:11
Iterator end() const
Definition: IOVProxy.cc:265
std::vector< T >::const_iterator search(const cond::Time_t &val, const std::vector< T > &container)
Definition: IOVProxy.cc:282