ATLAS Offline Software
IOVRegistrationSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
16 //<<<<<< INCLUDES >>>>>>
17 
18 #include "IOVRegistrationSvc.h"
19 
20 //#include "GaudiKernel/DeclareFactoryEntries.h"
21 
22 // Athena includes
23 #include "IOVDbSvc/IIOVCondDbSvc.h"
24 #include "AthenaKernel/IOVTime.h"
26 
27 // Gaudi includes
28 #include "GaudiKernel/IAddressCreator.h"
29 #include "GaudiKernel/IClassIDSvc.h"
30 #include "GaudiKernel/IConversionSvc.h"
31 #include "GaudiKernel/IOpaqueAddress.h"
32 #include "GaudiKernel/IConverter.h"
33 
34 // AttrList and address
39 
40 // COOL includes
41 //#include "AttributeList/AttributeList.h"
42 #include "CoolKernel/IDatabase.h"
43 #include "CoolKernel/IFolder.h"
44 #include "CoolKernel/RecordSpecification.h"
45 #include "CoolKernel/FolderSpecification.h"
46 #include "CoolKernel/Record.h"
47 
48 //<<<<<< METHOD DEFINITIONS
49 
50 //--------------------------------------------------------------------------
51 
52 IOVRegistrationSvc::IOVRegistrationSvc( const std::string& name, ISvcLocator* svc )
53  :
54  AthService( name, svc ),
55  m_recreateFolders(false),
56  m_beginRun(IOVTime::MINRUN),
57  m_endRun(IOVTime::MAXRUN),
58  m_beginLB(IOVTime::MINEVENT),
59  m_endLB(IOVTime::MAXEVENT),
60  m_beginTime(IOVTime::MINTIMESTAMP),
61  m_endTime(IOVTime::MAXEVENT), // as the time parameter is only 32bit
62  m_tag(""),
63  m_timeStamp(false),
64  m_tagDescription("Athena IOVRegistrationSvc"),
65  m_writeKeyInfo(true),
66  m_userTags(true),
67  m_userTagsUH(false),
68  m_svFolder(false),
69  m_payloadTable(false),
70  m_forceGlobalIOV(false),
71  m_iov_db ( "IOVDbSvc", name ),
72  m_detStore( "DetectorStore", name ),
73  m_persSvc ( "EventPersistencySvc", name ),
74  m_clidSvc ( "ClassIDSvc", name )
75 {
76 
77  // Declare properties
78  declareProperty("RecreateFolders", m_recreateFolders);
79  declareProperty("BeginRun", m_beginRun);
80  declareProperty("EndRun", m_endRun);
81  declareProperty("BeginLB", m_beginLB);
82  declareProperty("EndLB", m_endLB);
83  declareProperty("BeginTime", m_beginTime);
84  declareProperty("EndTime", m_endTime);
85  declareProperty("IOVDbTag", m_tag);
86  declareProperty("IOVDbTimeStamp", m_timeStamp);
87  declareProperty("TagDescription", m_tagDescription);
88  declareProperty("writeKeyInfo", m_writeKeyInfo);
89  declareProperty("userTags", m_userTags);
90  declareProperty("userTagsUpdateHead",m_userTagsUH);
91  declareProperty("SVFolder", m_svFolder);
92  declareProperty("PayloadTable", m_payloadTable);
93  declareProperty("OverrideNames", m_overrideName);
94  declareProperty("OverrideTypes", m_overrideType);
95  declareProperty("UseGlobalIOVForCollections", m_forceGlobalIOV);
96 }
97 
98 //--------------------------------------------------------------------------
100 {}
101 
102 const InterfaceID& IOVRegistrationSvc::type() const
103 
104 {
106 }
107 
108 //--------------------------------------------------------------------------
111 IOVRegistrationSvc::queryInterface( const InterfaceID& riid, void** ppvInterface )
112 {
113  ATH_MSG_DEBUG ("in queryInterface()");
114 
115  if ( IIOVRegistrationSvc::interfaceID().versionMatch(riid) ) {
116  ATH_MSG_DEBUG ("matched IIOVRegistrationSvc");
117  *ppvInterface = (IIOVRegistrationSvc*)this;
118  }
119  else {
120  // Interface is not directly available: try out a base class
121  ATH_MSG_DEBUG ("Default to Service interface");
122  return AthService::queryInterface(riid, ppvInterface);
123  }
124 
125  return StatusCode::SUCCESS;
126 }
127 
128 
129 //--------------------------------------------------------------------------
130 
132 {
133  ATH_MSG_DEBUG ("in initialize()");
134 
136  if ( sc.isFailure() ) {
137  ATH_MSG_ERROR ("Unable to call base initialize method");
138  return StatusCode::FAILURE;
139  }
140 
141  // locate the conditions store ptr to it.
142  sc = m_detStore.retrieve();
143  if (!sc.isSuccess() || 0 == m_detStore) {
144  ATH_MSG_ERROR ("Could not find ConditionStore");
145  return StatusCode::FAILURE;
146  }
147 
148  // Get the IOVDbSvc
149  sc = m_iov_db.retrieve();
150  if ( sc.isFailure() ) {
151  ATH_MSG_ERROR ("Unable to get the IOVDbSvc");
152  return StatusCode::FAILURE;
153  }
154 
155  // Get the persistency mgr for conversion of IOpaqueAddress to
156  // string
157  sc = m_persSvc.retrieve();
158  if ( sc != StatusCode::SUCCESS ) {
159  ATH_MSG_ERROR (" Cannot get IAddressCreator interface of the EventPersistencySvc ");
160  return sc ;
161  }
162  ATH_MSG_DEBUG ("Found PersistencySvc ");
163 
164 
165  // Get the ClassIDSvc - to get typename for clid
166  sc = m_clidSvc.retrieve();
167  if (sc != StatusCode::SUCCESS ) {
168  ATH_MSG_ERROR (" Cannot get IClassIDSvc interface of the CLIDSvc " );
169  return sc ;
170  }
171  ATH_MSG_DEBUG ("Found CLIDSvc ");
172 
173 
174  ATH_MSG_DEBUG ("Properties ");
175  ATH_MSG_DEBUG ("RecreateFolders " << m_recreateFolders);
176  if (m_timeStamp)
177  {
178  ATH_MSG_DEBUG ("BeginTime " << m_beginTime);
179  ATH_MSG_DEBUG ("EndTime " << m_endTime);
180  }
181  else
182  {
183  ATH_MSG_DEBUG ("BeginRun " << m_beginRun);
184  ATH_MSG_DEBUG ("EndRun " << m_endRun);
185  ATH_MSG_DEBUG ("BeginLB " << m_beginLB);
186  ATH_MSG_DEBUG ("EndLB " << m_endLB);
187  }
188  ATH_MSG_DEBUG ("IOVDbTag " << m_tag);
189 
190  // check consistency of override specification, if any
191  if (m_overrideName.size()!=m_overrideType.size()) {
192  ATH_MSG_FATAL ("Inconsistent settings of OverrideNames and OverrideTypes parameters");
193  return StatusCode::FAILURE;
194  }
195  for (unsigned int i=0;i<m_overrideName.size();++i)
196  ATH_MSG_INFO ("Attributes with name " << m_overrideName[i] <<
197  " will be stored as COOL type " << m_overrideType[i]);
198  return StatusCode::SUCCESS;
199 
200 }
201 
202 //--------------------------------------------------------------------------
203 
205 {
206  return StatusCode::SUCCESS;
207 }
208 
209 //--------------------------------------------------------------------------
210 
212 {
213  std::string key = "";
214 
215  if (m_timeStamp)
216  {
217  IOVTime start;
218  start.setTimestamp(timeToNano(m_beginTime));
219  IOVTime stop ;
220  stop.setTimestamp(timeToNano(m_endTime));
221 
222  return ( registerIOV( typeName,
223  key,key,
224  m_tag.value(),
225  start,
226  stop) );
227  }
228  else
229  {
230  IOVTime start;
231  start.setRunEvent( (unsigned long)m_beginRun, (unsigned long)m_beginLB );
232  IOVTime stop;
233  stop.setRunEvent ( (unsigned long)m_endRun, (unsigned long)m_endLB );
234 
235  return ( registerIOV( typeName,
236  key,key,
237  m_tag.value(),
238  start,
239  stop) );
240  }
241 }
242 
243 //--------------------------------------------------------------------------
244 
245 StatusCode IOVRegistrationSvc::registerIOV( const std::string& typeName, const std::string& tag ) const
246 {
247  std::string key = "";
248 
249  if (m_timeStamp)
250  {
251  IOVTime start;
252  start.setTimestamp( timeToNano(m_beginTime) );
253  IOVTime stop ;
254  stop.setTimestamp ( timeToNano(m_endTime) );
255 
256  return ( registerIOV( typeName,
257  key,key,
258  tag,
259  start,
260  stop) );
261  }
262  else
263  {
264  IOVTime start;
265  start.setRunEvent( (unsigned long)m_beginRun, (unsigned long)m_beginLB );
266  IOVTime stop;
267  stop.setRunEvent ( (unsigned long)m_endRun, (unsigned long)m_endLB );
268 
269  return ( registerIOV( typeName,
270  key,key,
271  tag,
272  start,
273  stop) );
274  }
275 }
276 
277 //--------------------------------------------------------------------------
278 
279 StatusCode IOVRegistrationSvc::registerIOV( const std::string& typeName, const std::string& key,
280  const std::string& tag ) const
281 {
282  if (m_timeStamp)
283  {
284  IOVTime start;
285  start.setTimestamp( timeToNano(m_beginTime) );
286  IOVTime stop ;
287  stop.setTimestamp ( timeToNano(m_endTime) );
288 
289  return ( registerIOV( typeName,
290  key,key,
291  tag,
292  start,
293  stop) );
294  }
295  else
296  {
297  IOVTime start;
298  start.setRunEvent( (unsigned long)m_beginRun, (unsigned long)m_beginLB );
299  IOVTime stop;
300  stop.setRunEvent ( (unsigned long)m_endRun, (unsigned long)m_endLB );
301 
302  return ( registerIOV( typeName,
303  key,key,
304  tag,
305  start,
306  stop) );
307  }
308 }
309 
310 //--------------------------------------------------------------------------
311 
313  const std::string& tag,
314  unsigned int beginRun,
315  unsigned int endRun,
316  unsigned int beginLB,
317  unsigned int endLB ) const
318 {
319  IOVTime start;
320  start.setRunEvent( (unsigned long)beginRun, (unsigned long)beginLB );
321  IOVTime stop;
322  stop.setRunEvent ( (unsigned long)endRun, (unsigned long)endLB );
323  std::string key = "";
324 
325  return ( registerIOV( typeName,
326  key,key,
327  tag,
328  start,
329  stop) );
330 }
331 
332 //--------------------------------------------------------------------------
333 
335  const std::string& tag,
336  uint64_t beginTime,
337  uint64_t endTime ) const
338 {
339  IOVTime start;
340  start.setTimestamp( beginTime );
341  IOVTime stop;
342  stop.setTimestamp ( endTime );
343 
344  std::string key = "";
345 
346  return ( registerIOV( typeName,
347  key,key,
348  tag,
349  start,
350  stop) );
351 }
352 
353 //--------------------------------------------------------------------------
354 
356  const std::string& key,
357  const std::string& tag,
358  unsigned int beginRun,
359  unsigned int endRun,
360  unsigned int beginLB,
361  unsigned int endLB ) const
362 {
363  IOVTime start;
364  start.setRunEvent( (unsigned long)beginRun, (unsigned long)beginLB );
365  IOVTime stop;
366  stop.setRunEvent ( (unsigned long)endRun, (unsigned long)endLB );
367 
368  return ( registerIOV( typeName,
369  key,key,
370  tag,
371  start,
372  stop) );
373 }
374 
375 //--------------------------------------------------------------------------
376 
378  const std::string& key,
379  const std::string& tag,
380  uint64_t beginTime,
381  uint64_t endTime ) const
382 {
383  IOVTime start;
384  start.setTimestamp( beginTime );
385  IOVTime stop;
386  stop.setTimestamp ( endTime );
387 
388  return ( registerIOV( typeName,
389  key,key,
390  tag,
391  start,
392  stop) );
393 }
394 
395 //--------------------------------------------------------------------------
396 
398  const std::string& key,
399  const std::string& folder,
400  const std::string& tag,
401  unsigned int beginRun,
402  unsigned int endRun,
403  unsigned int beginLB,
404  unsigned int endLB ) const
405 {
406  IOVTime start;
407  start.setRunEvent( (unsigned long)beginRun, (unsigned long)beginLB );
408  IOVTime stop;
409  stop.setRunEvent ( (unsigned long)endRun, (unsigned long)endLB );
410 
411  return ( registerIOV( typeName,
412  key,
413  folder,
414  tag,
415  start,
416  stop) );
417 }
418 
419 //--------------------------------------------------------------------------
420 
422  const std::string& key,
423  const std::string& folder,
424  const std::string& tag,
425  uint64_t beginTime,
426  uint64_t endTime ) const
427 {
428  IOVTime start;
429  start.setTimestamp( beginTime );
430  IOVTime stop;
431  stop.setTimestamp ( endTime );
432 
433  return ( registerIOV( typeName,
434  key,
435  folder,
436  tag,
437  start,
438  stop) );
439 }
440 
442 // Private methods
444 
445 //--------------------------------------------------------------------------
446 
448  const std::string& spec_key,
449  const std::string& folder,
450  const std::string& tag,
451  const IOVTime& start,
452  const IOVTime& stop ) const
453 {
454  // Register the conditions objects in the IOV database with
455  // start/stop as the time interval
456 
457 
458  msg() << MSG::DEBUG <<" in registerIOV()"
459  << " typename: " << typeName << " - tag: " << tag;
460  if (spec_key.empty())
461  {
462  msg() << " key: *empty* " << endmsg;
463  }
464  else
465  {
466  msg() << " spec_key " << spec_key << endmsg;
467  }
468  msg() << " - begin time: " << start
469  << " - end time: " << stop
470  << endmsg;
471 
472  // Check validity of start/stop
473  if(start.isBoth() || stop.isBoth() ||
474  start.isTimestamp() != stop.isTimestamp() ||
475  start.isRunEvent() != stop.isRunEvent()) {
476  ATH_MSG_ERROR ("Incorrect start/stop: "
477  << " isBoth: " << start.isBoth() << ":" << stop.isBoth()
478  << " isTimestamp: " << start.isTimestamp() << ":" << stop.isTimestamp()
479  << " isRunEvent: " << start.isRunEvent() << ":" << stop.isRunEvent());
480  return( StatusCode::FAILURE);
481  }
482 
483  return registerIOVCOOL( typeName,
484  spec_key,
485  folder,
486  tag,
487  start,
488  stop );
489 }
490 
491 
492 
493 //--------------------------------------------------------------------------
494 
496  const std::string& spec_key,
497  const std::string& folderName,
498  const std::string& tag,
499  const IOVTime& start,
500  const IOVTime& stop ) const
501 {
502  // Register the conditions objects in the IOV database with
503  // start/stop as the time interval
504 
505 
506  ATH_MSG_DEBUG (" in registerIOVCOOL()" );
507 
508 
509  // Find the clid for type name from the CLIDSvc
510  CLID clid;
511  StatusCode sc = m_clidSvc->getIDOfTypeName(typeName, clid);
512  if (sc.isFailure()) {
513  ATH_MSG_ERROR ("Could not get clid for typeName " << typeName);
514  return( StatusCode::FAILURE);
515  }
516 
517  try {
518 
519  // There are two possible states:
520  // 1) The DataObject is stored elsewhere and we store in the
521  // IOVDb only a stringified ref to the object, or
522  // 2) The DataObject is an AthenaAttributeList or a
523  // CondAttrListCollection and then we store it directly into
524  // the IOVDb.
525  //
526  // The second case is detected either with the type name,
527  // for AthenaAttributeList or CondAttrListCollection, or by
528  // checking the real type of the IOA - i.e. if it is a
529  // CondAttrListCollAddress then a CondAttrListCollection may
530  // have been filled with pool refs stored in it.
531 
532  bool storeRef = true;
533  bool storeAttrListColl = false;
534  bool needSGaddr=false;
535  if ("AthenaAttributeList" == typeName) {
536  storeRef = false;
537  needSGaddr=false;
538  }
539  if ("CondAttrListCollection" == typeName) {
540  storeRef = false;
541  storeAttrListColl = true;
542  needSGaddr=false;
543  }
544  // (See after retrieval of the IOA for a final check of the
545  // type of storage.)
546 
547  // Get IOpaqueAddress, key and symlinks for each data object
548  // from StoreGate
549  IOpaqueAddress* addr=0;
550  std::string key = spec_key;
551  std::vector<CLID> symlinks;
553  if (key.empty()) {
554  // Get IOpaqueAddress and key for each data object from
555  // StoreGate
556  proxy = m_detStore->proxy(clid);
557  if (!proxy) {
558  ATH_MSG_ERROR ("Could not get proxy for clid " << clid);
559  return( StatusCode::FAILURE);
560  }
561 
562  // Get key to be used for folder name
563  key = proxy->name();
564  // get proxy address - this will fail if object not streamed out
565  // but this can be recovered later for inline data
566  addr = proxy->address();
567  } else {
568  // Get IOpaqueAddress for each data object from StoreGate
569  proxy = m_detStore->proxy(clid, key);
570  if (!proxy) {
571  ATH_MSG_ERROR ("Could not get proxy for clid " << clid << " and key " << key);
572  return( StatusCode::FAILURE );
573  }
574  // get proxy address - this will fail if object not streamed out
575  // but this can be recovered later for inline data
576  addr = proxy->address();
577  }
578  std::string saddr;
579  if (addr) {
580  // Get symlinks, if any
581  symlinks = proxy->transientID();
582  auto it = std::find (symlinks.begin(), symlinks.end(), clid);
583  if (it != symlinks.end()) {
584  symlinks.erase (it);
585  }
586 
587  // Check whether the IOA is a CondAttrListCollAddress - if so
588  // we will store a CondAttrListCollection
589  CondAttrListCollAddress* collAddr = dynamic_cast<CondAttrListCollAddress*>(addr);
590  if (collAddr) {
591  storeRef = false;
592  storeAttrListColl = true;
593  }
594  // Convert IOpaqueAddress to string via the persistency
595  // service. We then store the string address in the IOV DB
596  sc = m_persSvc->convertAddress(addr, saddr);
597  if (sc.isFailure()) {
598  ATH_MSG_WARNING ("Could not get string from IOpaqueAddress for clid " << clid
599  << " is BAD_STORAGE_TYPE: " << (sc == IConversionSvc::Status::BAD_STORAGE_TYPE));
600  return( StatusCode::FAILURE);
601  }
602  ATH_MSG_DEBUG ("String address = \"" << saddr << "\"");
603  } else {
604  // if no addr was found, object has not been streamed out
605  // this is OK providing we do not need the addr later
606  // i.e. plain CondAttrListCollection or AthenaAttributeList
607  if (needSGaddr) {
608  ATH_MSG_ERROR ("Could not get address for clid " << clid);
609  return( StatusCode::FAILURE );
610  } else {
611  ATH_MSG_DEBUG ("Faking address for " << typeName);
612  // fake the saddr contents
613  if ("AthenaAttributeList" == typeName) {
614  saddr="<address_header service_type=\"256\" clid=\"40774348\" /> POOLContainer_AthenaAttributeList][CLID=x";
615  } else if ("CondAttrListCollection" == typeName) {
616  saddr="<address_header service_type=\"256\" clid=\"1238547719\" /> POOLContainer_CondAttrListCollection][CLID=x";
617  } else {
618  ATH_MSG_ERROR ("Cannot fake stringaddress for typename "
619  << typeName);
620  }
621  }
622  }
623 
624  ATH_MSG_DEBUG ("Storing ref: " << storeRef
625  << " Storing AttrListCollection: " << storeAttrListColl);
626 
627  // Set folder name - in the present case this is defined
628  // to be the key
629  // RJH - unless a non-null folder is given on input
630  std::string local_folder;
631  if (""==folderName) {
632  local_folder = key;
633  } else {
634  local_folder=folderName;
635  }
636  ATH_MSG_DEBUG ("Using folder name " << local_folder);
637 
638  // Get COOL database in update mode (false == readOnly flag)
639  cool::IDatabasePtr db = m_iov_db->getDatabase(false);
640  if (!db) {
641  ATH_MSG_ERROR ("Could not get pointer to COOL db ");
642  return(StatusCode::FAILURE);
643  }
644  // get some information about the database connection for later checks
645  const cool::DatabaseId& dbid=db->databaseId();
646  // look for direct connection to production accounts
647  bool dbidprod=(dbid.find("oracle")!=std::string::npos && (
648  dbid.find("ATLAS_COOLONL_")!=std::string::npos ||
649  dbid.find("ATLAS_COOLOFL_")!=std::string::npos ||
650  dbid.find("ATLAS_COOL_")!=std::string::npos));
651  // look for use of writer account ('_W' in connection string)
652  bool dbidwriter=(dbid.find("oracle")!=std::string::npos &&
653  dbid.find("_W")!=std::string::npos);
654  ATH_MSG_DEBUG ("Identified prod/writer " << dbidprod << dbidwriter);
655  // do not allow write accesss to production servers
656  if (dbidprod) {
657  ATH_MSG_FATAL ("Direct update of production Oracle servers from Athena is FORBIDDEN");
658  ATH_MSG_FATAL ("Please write to SQLite file and then merge with AtlCoolMerge.py");
659  return StatusCode::FAILURE;
660  }
661 
662  // For AthenaAttributeList/CondAttrListCollection, save a pointer to the object
663  const AthenaAttributeList* attrList = 0;
664  const CondAttrListCollection* attrListColl = 0;
665 
666  if (!storeRef) {
667  if ("CondAttrListCollection"==typeName) {
668  if (StatusCode::SUCCESS!=m_detStore->
669  retrieve(attrListColl,key)) {
670  ATH_MSG_ERROR ("Could not find CondAttrListCollecton for "
671  << key);
672  return StatusCode::FAILURE;
673  }
674  } else if (storeAttrListColl) {
675  // have to go through SG proxy, as it is a collection of POOLref
676  if (addr) {
677  CondAttrListCollAddress* attrAddr = dynamic_cast<CondAttrListCollAddress*>(addr);
678  if (attrAddr) {
679  // Successful cast
680  attrListColl = attrAddr->attrListColl();
681  ATH_MSG_DEBUG ("Set attr list coll ptr ");
682  ATH_MSG_DEBUG ("addr, attrAddr, coll "
683  << addr << " " << attrAddr << " " << attrListColl);
684  } else {
685  ATH_MSG_ERROR ("Could not extract ptr for CondAttrListCollAddress ");
686  return StatusCode::FAILURE;
687  }
688  } else {
689  ATH_MSG_ERROR ("Cannot write out collection of POOLref without streaming them first" );
690  return StatusCode::FAILURE;
691  }
692  } else {
693  // Just AttrList - get directly from Storegate
694  if (StatusCode::SUCCESS!=m_detStore->retrieve(attrList,key)) {
695  ATH_MSG_ERROR ("Could not find AthenaAttributeList for "
696  << key);
697  return StatusCode::FAILURE;
698  }
699  }
700 
701  }
702 
703 
704  ATH_MSG_DEBUG ("Set attr list coll ptr " << attrListColl);
705 
706  // Save folder pointer
707  cool::IFolderPtr folder;
708 
709  // Create folders if required - a job option allows on to
710  // delete existing folders and then recreate them
711 
712  bool createFolders = false;
713 
714  if(db->existsFolder(local_folder)) {
715 
716  if (m_recreateFolders) {
717  // do not allow this action on production schema or with writer
718  if (dbidprod || dbidwriter) {
719  ATH_MSG_FATAL ("Apparent attempt to delete folder on production COOL schema " << dbid);
720  return StatusCode::FAILURE;
721  }
722 
723  ATH_MSG_DEBUG (" Deleting existing COOL Folder " << local_folder);
724  db->dropNode( local_folder );
725  createFolders = true;
726  }
727  else {
728  // Get folder
729  ATH_MSG_DEBUG ("COOL Folder " << local_folder << " exists");
730  folder = db->getFolder(local_folder);
731  }
732 
733  }
734  else {
735  ATH_MSG_DEBUG ("COOL Folder " << local_folder
736  << " does not exist - must create it");
737  createFolders = true;
738  }
739 
740  // Split the string address into header and data parts
741  std::string address_header;
742  std::string address_data;
743 
744  sc = splitAddress(saddr,address_header,address_data);
745  if (sc.isFailure()) {
746  ATH_MSG_ERROR ("Could not split address: "
747  << "addr: " << saddr << "\n"
748  << "hdr: " << address_header << "\n"
749  << "data " << address_data);
750  return( StatusCode::FAILURE);
751  }
752  msg() << MSG::DEBUG <<"split address: " << saddr << endmsg
753  << " hdr: " << address_header << endmsg
754  << " data: " << address_data << endmsg;
755 
756 
757  if(createFolders) {
758  // first make sure not using writer account -if so abort
759  if (dbidwriter) {
760  ATH_MSG_FATAL ("Apparent attempt to create folder using writer account, dbID is: " << dbid);
761  return StatusCode::FAILURE;
762  }
763 
764  // We store extra information in the folder description.
765  // This info is:
766  // typeName - required information
767  // symlinks - the extra StoreGate keys, if any
768  // key - optional, only needed if key != folder name
769  // timeStamp - either run-lumi (default) or time
770  // address_header - added by convention
771  //
772  //
773  // The convention is that the address_header is stored
774  // in the description, and the IOV interval data
775  // payload is just the pool reference in string form.
776  // The address_header and address_data can be obtained
777  // from the string address returned from the
778  // persistency service, using splitAddress
779 
780  std::string mergedNames;
781 
782  sc = buildDescription( "typeName", typeName,
783  mergedNames );
784  if (sc.isFailure()) {
785  ATH_MSG_ERROR ("Could not merge towards merged description: "
786  << "typeName: " << typeName);
787  return( StatusCode::FAILURE);
788  }
789 
790  sc = buildDescription( "addrHeader", address_header,
791  mergedNames );
792  if (sc.isFailure()) {
793  ATH_MSG_ERROR ("Could not merge towards merged description: "
794  << "addrHeader: " << address_header);
795  return( StatusCode::FAILURE);
796  }
797  // RJH - if key is not same as folder, and we want the read-back
798  // objects to end up in the TDS with the given Storegate key rather
799  // than the folder name, need to set the <key> attribute
800  // a jobOption WriteKeyInfo=FALSE disables this, in case you have
801  // created objects with the 'wrong' SG key and want the key
802  // on read-back to correspond to the folder name
803  if (local_folder!=key && m_writeKeyInfo) {
804  sc=buildDescription("key",key,mergedNames);
805  if (sc.isFailure()) {
806  ATH_MSG_ERROR ("Could not merge towards merged description: "
807  << "key: " << key);
808  return( StatusCode::FAILURE);
809  }
810  }
811 
812  // Add in symlink types
813  if (!symlinks.empty()) {
814  std::string symlinkTypes;
815  for (unsigned int i = 0; i < symlinks.size(); ++i) {
816  std::string type;
817  sc = m_clidSvc->getTypeNameOfID(symlinks[i], type);
818  if (sc.isFailure()) {
819  ATH_MSG_ERROR ("Could not get type name for symlink clid "
820  << symlinks[i]);
821  return( StatusCode::FAILURE);
822  }
823  else {
824  ATH_MSG_DEBUG ("adding symlink: clid, type "
825  << symlinks[i] << " " << type);
826  }
827  if (symlinkTypes.size()) symlinkTypes += ':';
828  symlinkTypes += type;
829  }
830  sc=buildDescription("symlinks", symlinkTypes, mergedNames);
831  if (sc.isFailure()) {
832  msg() << MSG::ERROR <<"Could not merge symlinks to merged description: "
833  << "symlink types: ";
834  for (unsigned int i = 0; i < symlinkTypes.size(); ++i) {
835  msg() << MSG::ERROR << symlinkTypes[i] << " ";
836  }
837  msg() << MSG::ERROR << endmsg;
838  return( StatusCode::FAILURE);
839  }
840  else {
841  ATH_MSG_DEBUG ("symlinks, merged names "
842  << symlinkTypes << " " << mergedNames);
843  }
844  }
845 
846  // Type of time is defined by start/stop
847 
848  // Some checks on the times:
849  if (!start.isValid() ||
850  !stop.isValid() ||
851  start.isTimestamp() != stop.isTimestamp() ||
852  start.isRunEvent() != stop.isRunEvent()) {
853  ATH_MSG_ERROR ("Invalid times: start isValid/isTimeStamp/isRunEvent "
854  << "addrHeader: " << address_header
855  << start.isValid() << " " << start.isTimestamp() << " "
856  << start.isRunEvent());
857  ATH_MSG_ERROR ("Invalid times: stop isValid/isTimeStamp/isRunEvent "
858  << "addrHeader: " << address_header
859  << stop.isValid() << " " << stop.isTimestamp() << " "
860  << stop.isRunEvent());
861  return( StatusCode::FAILURE);
862  }
863  bool isTimeStamp = false;
864  if (start.isTimestamp()) isTimeStamp = true;
865 
866  if (isTimeStamp)
867  {
868  sc = buildDescription( "timeStamp", "time",
869  mergedNames );
870  }
871  else
872  {
873  sc = buildDescription( "timeStamp", "run-lumi",
874  mergedNames );
875  }
876  if (sc.isFailure()) {
877  ATH_MSG_ERROR ("Could not merge timeStamp flag towards merged description. ");
878  return( StatusCode::FAILURE);
879  }
880  // add <named/> for channels with names
881  if (storeAttrListColl && attrListColl!=0 &&
882  attrListColl->name_size()>0) mergedNames+="<named/>";
883 
884  ATH_MSG_DEBUG (" create folder " << local_folder
885  << " with description " << mergedNames);
886 
887  // Create folder
888 
889  ATH_MSG_DEBUG ("Set attr list coll ptr " << attrListColl);
890 
891  cool::RecordSpecification payloadSpec;
892  if (storeRef) {
893  // Folder with refs only:
894  // Payload specification - contains just a string
895  // assuming POOL refs will not be longer than 4000 chars
896  payloadSpec.extend("PoolRef",cool::StorageType::String4k);
897  }
898  else {
899  // Store AttributeList or a collection of AttributeLists
900  const coral::AttributeList* atr4spec=0;
901  if (storeAttrListColl) {
902 
903  // Folder with CondAttrListCollection itself
904  // Get the attribute spec from the first element in the collection
905  if (0 == attrListColl) {
906  ATH_MSG_ERROR ("attrListColl not found. ");
907  return( StatusCode::FAILURE);
908  }
909 
910  if (0 == attrListColl->size()) {
911  ATH_MSG_ERROR ("attrListColl is empty. ");
912  return( StatusCode::FAILURE);
913  }
914  // FIXME
915  ATH_MSG_DEBUG ("Size of AttrList collection" <<
916  attrListColl->size());
917 
918  atr4spec=&((*attrListColl->begin()).second);
919  } else {
920  // folder with simple AttributeList
921  atr4spec=attrList;
922  ATH_MSG_DEBUG ("In simple atrlist branch");
923  }
924  ATH_MSG_DEBUG ("Pointer to atrList is " << atr4spec);
925  // construct COOL specification
926  for (coral::AttributeList::const_iterator itr=
927  atr4spec->begin();itr!=atr4spec->end();++itr) {
928  // extend specification with appropriate COOL type
929  // giving opportunity to override default choice
930  payloadSpec.extend(itr->specification().name(),
931  coralToCoolType(itr->specification().name(),
932  itr->specification().typeName()));
933  }
934  }
935  // create folder
937  cool::FolderVersioning::MULTI_VERSION;
938  if (m_svFolder) {
939  version=cool::FolderVersioning::SINGLE_VERSION;
940  ATH_MSG_INFO ("Creating single version folder for "
941  << local_folder);
942  }
943  if (m_payloadTable)
944  ATH_MSG_INFO ("Creating separate payload table for "
945  << local_folder);
946  cool::FolderSpecification folderSpec(version,payloadSpec,cool::PayloadMode::SEPARATEPAYLOAD);
947  folder = db->createFolder(local_folder,folderSpec,
948  mergedNames,true);
949  ATH_MSG_DEBUG ("Creation of CondDBFolder " <<
950  local_folder << " done");
951 
952  // create channels if needed - only for CondAttrListColl with names
953  if (storeAttrListColl && attrListColl!=0 &&
954  attrListColl->name_size()>0) {
955  ATH_MSG_DEBUG ("Naming " << attrListColl->name_size() <<
956  " channels in " << local_folder);
958  attrListColl->name_begin();
959  nitr!=attrListColl->name_end();++nitr) {
960  folder->createChannel(nitr->first,nitr->second);
961  }
962  }
963  }
964 
965  // Print out stop/start ONLY for non-collections - collections
966  // have a per-channel start/stop
967  if (storeAttrListColl) {
968  ATH_MSG_DEBUG (" Global Start/stop time: "
969  << start << " " << stop << " Note: will be ignored for channels with differnt IOVs " );
970  }
971  else {
972  ATH_MSG_DEBUG (" Start/stop time " << start << " " << stop << " ");
973  }
974 
975  // Convert IOVTime to ValidityKey
976  cool::ValidityKey ivStart = start.re_time();
977  cool::ValidityKey ivStop = stop.re_time();
978  if(start.isTimestamp()) {
979  ivStart = start.timestamp();
980  ivStop = stop.timestamp();
981  }
982 
983  // get record specification of folder
984 
985  const cool::RecordSpecification& rspec=folder->payloadSpecification();
986 
987  if (storeAttrListColl) {
988  //
989  // Need to store multiple channels
990  //
991  // The policy for the IOV of each channel is to use the
992  // channel IOV already stored in the collection, if it is
993  // there. If it is not there, then use the global IOV.
994  //
995  if (storeRef) {
996  // Should NOT get here for a collection, signal error
997  ATH_MSG_ERROR ("Trying to store a ref for a CondAttrListCollection. ");
998  return( StatusCode::FAILURE);
999  }
1000 
1001  ATH_MSG_DEBUG (" --> Storing Object( " << start << ", " << stop
1002  << ", " << tag << " )");
1003  ATH_MSG_DEBUG (" --> address: " << address_data);
1004  // Loop over collection
1006  CondAttrListCollection::const_iterator last = attrListColl->end();
1007  for (; first != last; ++first) {
1008 
1009  // Copy from retrieved attribute list
1010  const coral::AttributeList& payload = (*first).second;
1011  // Get channel id
1012  CondAttrListCollection::ChanNum chanNum = (*first).first;
1013 
1014  // Check whether to use already stored IOV, or the
1015  // global IOV
1016  cool::ValidityKey ivStart1 = ivStart;
1017  cool::ValidityKey ivStop1 = ivStop;
1019  std::ostringstream attr;
1020  payload.toOutputStream( attr );
1021  ATH_MSG_DEBUG (" --> ChanNum: " << chanNum << " Payload: " << attr.str());
1022  if (!m_forceGlobalIOV && iovIt != attrListColl->iov_end()) {
1023  const IOVRange& range = (*iovIt).second;
1024  if(range.start().isTimestamp()) {
1025  ivStart1 = range.start().timestamp();
1026  ivStop1 = range.stop().timestamp();
1027  }
1028  else {
1029  ivStart1 = range.start().re_time();
1030  ivStop1 = range.stop().re_time();
1031  }
1032  ATH_MSG_DEBUG (" --> Start/stop time "
1033  << range.start() << " " << range.stop() << " ");
1034  }
1035  else {
1036  ATH_MSG_DEBUG (" --> Start/stop time "
1037  << start << " " << stop << " ");
1038  }
1039 
1040  // Store address in folder with interval
1041  cool::Record record(rspec,payload);
1042  if (m_userTags && tag!="") {
1043  ATH_MSG_DEBUG ("Object stored with user tag " << tag );
1044  folder->storeObject( ivStart1,
1045  ivStop1,
1046  record,
1048  } else {
1049  folder->storeObject( ivStart1,
1050  ivStop1,
1051  record,
1052  chanNum);
1053  }
1054  }
1055  }
1056  else {
1057  // Store a single channel
1058  cool::Record record(rspec);
1059  if (storeRef) {
1060  // PayLoad is ONLY the ref
1061  record["PoolRef"].setValue<std::string>(address_data);
1062  }
1063  else {
1064  // Copy from retrieved attribute list
1065  record=cool::Record(rspec,*attrList);
1066  }
1067 
1068  // Store address in folder with interval
1069  if (m_userTags && tag!="") {
1070  ATH_MSG_DEBUG ("Object stored with user tag " << tag );
1071  folder->storeObject( ivStart,
1072  ivStop,
1073  record,0,tag,!m_userTagsUH);
1074  } else {
1075  folder->storeObject( ivStart,
1076  ivStop,
1077  record,0);
1078  }
1079 
1080  ATH_MSG_DEBUG (" --> Stored Object( " << start << ", " << stop
1081  << ", " << tag << " )");
1082  ATH_MSG_DEBUG (" --> address: " << address_data);
1083  }
1084 
1085  ATH_MSG_DEBUG (" storeData OK ");
1086 
1087  // Now tag the folder if required
1088  if (!m_userTags) {
1089  if ("" == tag) {
1090  ATH_MSG_DEBUG (" tag is empty - folder is not being tagged ");
1091  }
1092  else {
1093  ATH_MSG_INFO (" Tagging HEAD of folder " << local_folder <<
1094  " with tag " << tag);
1095  try {
1096  folder->tagCurrentHead(tag,m_tagDescription);
1097  }
1098  catch ( cool::TagExists& e) {
1099  ATH_MSG_INFO ("Tag " << tag <<
1100  " exists - attempt to delete tag and retag HEAD");
1101  // first check this tag is really defined in THIS folder
1102  std::vector<std::string> taglist=folder->listTags();
1103  if (find(taglist.begin(),taglist.end(),tag)==
1104  taglist.end()) {
1105  ATH_MSG_ERROR ("Tag is defined in another folder - tag names must be global");
1106  } else if (folder->existsUserTag(tag)) {
1107  // this is a COOL user tag, in which case user
1108  // is trying to mix user and HEAD tags, not allowed in COOL1.3
1109  ATH_MSG_ERROR ("Tag " << tag <<
1110  " is already USER tag - cannot mix tagging modes");
1111  } else {
1112  try {
1113  folder->deleteTag(tag);
1114  folder->tagCurrentHead(tag,m_tagDescription);
1115  ATH_MSG_INFO ("Delete and retag succeeded");
1116  }
1117  catch ( cool::TagNotFound& e) {
1118  ATH_MSG_ERROR ("Delete and retag HEAD failed");
1119  }
1120  }
1121  }
1122  }
1123  }
1124  return StatusCode::SUCCESS;
1125  }
1126 
1127  catch (std::exception& e) {
1128  ATH_MSG_ERROR ("*** COOL exception caught: " << e.what() );
1129  // << "\n"
1130  // << "*** error code: " << e.code()
1131  return StatusCode::FAILURE;
1132  }
1133 
1134  //return StatusCode::SUCCESS;
1135 }
1136 
1137 cool::StorageType::TypeId IOVRegistrationSvc::coralToCoolType(
1138  const std::string& parname,const std::string& coralName) const {
1139  // map coral type onto corresponding COOL storage type
1140  std::string coralType=coralName;
1141  // check for any overrides
1142  for (unsigned int i=0;i<m_overrideType.size();++i) {
1143  if (m_overrideName[i]==parname) {
1144  coralType=m_overrideType[i];
1145  ATH_MSG_INFO ("Override default type for attribute " <<
1146  parname << " - use " << coralType);
1147  }
1148  }
1149  // FIXME to include all CORAL/COOL types
1150  // give both the names of CORAL types, and COOL types which may get specified
1151  // as overrides
1152  if (coralType=="bool") return cool::StorageType::Bool;
1153  if (coralType=="UChar" || coralType=="unsigned char") return cool::StorageType::UChar;
1154  if (coralType=="Int16") return cool::StorageType::Int16;
1155  if (coralType=="UInt16") return cool::StorageType::UInt16;
1156  if (coralType=="Int32" || coralType=="int") return cool::StorageType::Int32;
1157  if (coralType=="UInt32" || coralType=="unsigned int") return cool::StorageType::UInt32;
1158  if (coralType=="UInt63" || coralType=="unsigned long long") return cool::StorageType::UInt63;
1159  if (coralType=="Int64" || coralType=="long long") return cool::StorageType::Int64;
1160  if (coralType=="Float" || coralType=="float") return cool::StorageType::Float;
1161  if (coralType=="Double" || coralType=="double") return cool::StorageType::Double;
1162  if (coralType=="String255") return cool::StorageType::String255;
1163  if (coralType=="String4k" || coralType=="string") return cool::StorageType::String4k;
1164  if (coralType=="String64k") return cool::StorageType::String64k;
1165  if (coralType=="String16M") return cool::StorageType::String16M;
1166  if (coralType=="blob" || coralType=="Blob64k")
1167  return cool::StorageType::Blob64k;
1168  if (coralType=="Blob16M") return cool::StorageType::Blob16M;
1169 
1170  // if we get here, mapping is undefined
1171  ATH_MSG_FATAL ("No COOL mapping defined for CORAL type " << coralName);
1172  throw std::exception();
1173 }
1174 
1175 
1176 //--------------------------------------------------------------------------
1177 
1178 uint64_t IOVRegistrationSvc::timeToNano(const unsigned long int timesec) const
1179 {
1180  // convert time specified in seconds to ns used by COOL
1181  // use the magic value MAXEVENT to signal full range
1182  if (timesec==IOVTime::MAXEVENT) {
1183  return IOVTime::MAXTIMESTAMP;
1184  } else {
1185  return static_cast<uint64_t>(timesec)*1000000000;
1186  }
1187 }
1188 
1190  const std::string& value,
1191  std::string& description) const {
1192  // this routine was originally in IOVDbSvc, moved here as only client
1193  // buids an XML fragment of form <identifier>value</identifier>
1194  if (identifier.empty() || value.empty()) {
1195  ATH_MSG_ERROR ("Identifier or value is null.");
1196  return StatusCode::FAILURE;
1197  }
1198  description = "<"+identifier+">"+value+"</"+identifier+">"+description;
1199  return StatusCode::SUCCESS;
1200 }
1201 
1203  std::string& address_header,
1204  std::string& address_data ) const {
1205  // this routine was originally in IOVDbSvc, moved here as only client
1206  // Deals with address of form
1207  // <address_header service_type="256" clid="1238547719" /> POOLContainer_CondAttrListCollection][CLID=x
1208  // return header as part up to and including />, trailer as rest
1209 
1210  std::string::size_type p1=address.find(" />");
1211  if (p1!=std::string::npos) {
1212  address_header=address.substr(0,p1+3);
1213  address_data=address.substr(p1+4);
1214  return StatusCode::SUCCESS;
1215  } else {
1216  return StatusCode::FAILURE;
1217  }
1218 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
IOVRegistrationSvc::~IOVRegistrationSvc
virtual ~IOVRegistrationSvc()
Definition: IOVRegistrationSvc.cxx:99
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
CondAttrListCollection::end
const_iterator end() const
Definition: CondAttrListCollection.h:315
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
IOVRegistrationSvc::m_beginLB
UnsignedIntegerProperty m_beginLB
Definition: IOVRegistrationSvc.h:196
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
CondAttrListCollection::iov_end
iov_const_iterator iov_end() const
Definition: CondAttrListCollection.h:343
CondAttrListCollection.h
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CondAttrListCollAddress.h
This file contains the class definition for the CondAttrListCollAddress class.
initialize
void initialize()
Definition: run_EoverP.cxx:894
IOVRegistrationSvc::m_svFolder
BooleanProperty m_svFolder
Definition: IOVRegistrationSvc.h:208
IOVRegistrationSvc::m_tag
StringProperty m_tag
Definition: IOVRegistrationSvc.h:202
CaloCondBlobAlgs_fillNoiseFromASCII.db
db
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:43
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
python.CaloCondTools.MINRUN
int MINRUN
Definition: CaloCondTools.py:23
IOVRegistrationSvc::queryInterface
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Query the interfaces.
Definition: IOVRegistrationSvc.cxx:111
python.CreateTierZeroArgdict.parname
parname
Definition: CreateTierZeroArgdict.py:194
skel.it
it
Definition: skel.GENtoEVGEN.py:423
IOVRegistrationSvc::m_writeKeyInfo
BooleanProperty m_writeKeyInfo
Definition: IOVRegistrationSvc.h:205
CondAttrListCollection::begin
const_iterator begin() const
Access to Chan/AttributeList pairs via iterators.
Definition: CondAttrListCollection.h:309
CheckTagAssociation.taglist
taglist
Definition: CheckTagAssociation.py:103
athena.value
value
Definition: athena.py:122
IOVRegistrationSvc::m_userTags
BooleanProperty m_userTags
Definition: IOVRegistrationSvc.h:206
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
IOVRegistrationSvc::registerIOVCOOL
StatusCode registerIOVCOOL(const std::string &typeName, const std::string &key, const std::string &folderName, const std::string &tag, const IOVTime &begin, const IOVTime &end) const
Definition: IOVRegistrationSvc.cxx:495
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
xAOD::identifier
identifier
Definition: UncalibratedMeasurement_v1.cxx:15
IOVRegistrationSvc::m_endRun
UnsignedIntegerProperty m_endRun
Definition: IOVRegistrationSvc.h:195
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
CaloTime_fillDB.folderSpec
folderSpec
Definition: CaloTime_fillDB.py:92
AthenaAttributeList.h
IOVRegistrationSvc::m_endLB
UnsignedIntegerProperty m_endLB
Definition: IOVRegistrationSvc.h:197
CondAttrListCollection::iov_const_iterator
ChanIOVMap::const_iterator iov_const_iterator
Definition: CondAttrListCollection.h:66
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
IOVTime.h
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
IOVRegistrationSvc::splitAddress
StatusCode splitAddress(const std::string &address, std::string &address_header, std::string &address_data) const
Split address in its header and data parts.
Definition: IOVRegistrationSvc.cxx:1202
CondAttrListCollAddress
This class provides the an IOpaqueAddress/GenericAddress which can hold a pointer to an CondAttrListC...
Definition: CondAttrListCollAddress.h:27
CondAttrListCollection::name_const_iterator
ChanNameMap::const_iterator name_const_iterator
Definition: CondAttrListCollection.h:69
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
IOVRegistrationSvc::m_forceGlobalIOV
BooleanProperty m_forceGlobalIOV
Definition: IOVRegistrationSvc.h:210
IOVRegistrationSvc::initialize
virtual StatusCode initialize()
Initialize AlgTool.
Definition: IOVRegistrationSvc.cxx:131
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
checkCoolLatestUpdate.chanNum
chanNum
Definition: checkCoolLatestUpdate.py:27
IOVRegistrationSvc::m_iov_db
ServiceHandle< IIOVCondDbSvc > m_iov_db
Definition: IOVRegistrationSvc.h:214
lumiFormat.i
int i
Definition: lumiFormat.py:92
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthService
Definition: AthService.h:32
AthenaAttrListAddress.h
This file contains the class definition for theAthenaAttrListAddress class.
calibdata.exception
exception
Definition: calibdata.py:496
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
IOVTime::MAXTIMESTAMP
static constexpr uint64_t MAXTIMESTAMP
Definition: IOVTime.h:58
IOVRegistrationSvc::coralToCoolType
cool::StorageType::TypeId coralToCoolType(const std::string &parname, const std::string &coralName) const
Definition: IOVRegistrationSvc.cxx:1137
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
IIOVRegistrationSvc
This is an interface to a service used to register conditions objects in the Interval of Validity (IO...
Definition: IIOVRegistrationSvc.h:52
AthenaAttributeList
An AttributeList represents a logical row of attributes in a metadata table. The name and type of eac...
Definition: PersistentDataModel/PersistentDataModel/AthenaAttributeList.h:45
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
IOVRegistrationSvc::m_overrideType
std::vector< std::string > m_overrideType
Definition: IOVRegistrationSvc.h:212
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
CondAttrListCollection::ChanNum
unsigned int ChanNum
Definition: CondAttrListCollection.h:55
IOVRegistrationSvc::m_persSvc
ServiceHandle< IAddressCreator > m_persSvc
Definition: IOVRegistrationSvc.h:216
IOVRegistrationSvc::m_recreateFolders
BooleanProperty m_recreateFolders
Definition: IOVRegistrationSvc.h:193
CondAttrListCollection::name_begin
name_const_iterator name_begin() const
Access to Chan/Name pairs via iterators.
Definition: CondAttrListCollection.h:364
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
IOVRegistrationSvc::m_endTime
UnsignedLongProperty m_endTime
Definition: IOVRegistrationSvc.h:200
CondAttrListCollection::name_size
name_size_type name_size() const
number of Chan/Name pairs
Definition: CondAttrListCollection.h:377
CondAttrListCollAddress::attrListColl
CondAttrListCollection * attrListColl()
Access to AttributeList.
Definition: CondAttrListCollAddress.h:120
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:20
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
EventContainers::Mode
Mode
Definition: IdentifiableContainerBase.h:13
python.CaloCondTools.MAXRUN
MAXRUN
Definition: CaloCondTools.py:25
RTTAlgmain.address
address
Definition: RTTAlgmain.py:55
CondAttrListCollection::size
size_type size() const
number of Chan/AttributeList pairs
Definition: CondAttrListCollection.h:322
PixelModuleFeMask_create_db.payload
string payload
Definition: PixelModuleFeMask_create_db.py:69
IOVRegistrationSvc::m_clidSvc
ServiceHandle< IClassIDSvc > m_clidSvc
Definition: IOVRegistrationSvc.h:217
IOVRegistrationSvc::finalize
virtual StatusCode finalize()
Finalize AlgTool.
Definition: IOVRegistrationSvc.cxx:204
IOVRegistrationSvc::buildDescription
virtual StatusCode buildDescription(const std::string &identifier, const std::string &value, std::string &description) const
Build the folder description field add in front of the description the value with identifier-markups.
Definition: IOVRegistrationSvc.cxx:1189
IOVRegistrationSvc::type
virtual const InterfaceID & type() const
Service type.
Definition: IOVRegistrationSvc.cxx:102
IOVRegistrationSvc.h
This is an interface to a tool used to register conditions objects in the Interval of Validity (IOV) ...
get_generator_info.version
version
Definition: get_generator_info.py:33
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CondAttrListCollection::const_iterator
ChanAttrListMap::const_iterator const_iterator
Definition: CondAttrListCollection.h:63
TransientAddress.h
IOVRegistrationSvc::registerIOV
virtual StatusCode registerIOV(const std::string &typeName) const
Register IOV DB for an object given its typeName - run/LB numbers interval or times interval and tag ...
Definition: IOVRegistrationSvc.cxx:211
DeMoScan.first
bool first
Definition: DeMoScan.py:534
IOVRegistrationSvc::m_payloadTable
BooleanProperty m_payloadTable
Definition: IOVRegistrationSvc.h:209
DEBUG
#define DEBUG
Definition: page_access.h:11
AthCommonMsg< Service >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
IOVRegistrationSvc::m_userTagsUH
BooleanProperty m_userTagsUH
Definition: IOVRegistrationSvc.h:207
IOVRegistrationSvc::m_beginTime
UnsignedLongProperty m_beginTime
Definition: IOVRegistrationSvc.h:199
CaloCondBlobAlgs_fillNoiseFromASCII.folder
folder
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:56
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
IIOVRegistrationSvc::interfaceID
static const InterfaceID & interfaceID()
Retrieve interface ID.
Definition: IIOVRegistrationSvc.h:133
IIOVCondDbSvc.h
IOVRegistrationSvc::m_timeStamp
BooleanProperty m_timeStamp
Definition: IOVRegistrationSvc.h:203
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
IOVRegistrationSvc::m_overrideName
std::vector< std::string > m_overrideName
Definition: IOVRegistrationSvc.h:211
CondAttrListCollection::chanIOVPair
iov_const_iterator chanIOVPair(ChanNum chanNum) const
Access to Chan/IOV pairs via channel number: returns map iterator.
Definition: CondAttrListCollection.h:330
IOVRegistrationSvc::IOVRegistrationSvc
IOVRegistrationSvc(const std::string &name, ISvcLocator *svc)
Definition: IOVRegistrationSvc.cxx:52
SG::DataProxy
Definition: DataProxy.h:44
IOVRegistrationSvc::m_beginRun
UnsignedIntegerProperty m_beginRun
Definition: IOVRegistrationSvc.h:194
IOVRegistrationSvc::m_detStore
ServiceHandle< StoreGateSvc > m_detStore
Definition: IOVRegistrationSvc.h:215
IOVRegistrationSvc::timeToNano
uint64_t timeToNano(const unsigned long int timesec) const
Definition: IOVRegistrationSvc.cxx:1178
lumiFormat.endTime
endTime
Definition: lumiFormat.py:107
CondAttrListCollection::name_end
name_const_iterator name_end() const
Definition: CondAttrListCollection.h:370
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
IOVRegistrationSvc::m_tagDescription
StringProperty m_tagDescription
Definition: IOVRegistrationSvc.h:204