ATLAS Offline Software
Loading...
Searching...
No Matches
ReadFromFileMetaData.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "CoralBase/AttributeList.h"
13
15
16namespace IOVDbNamespace{
18 const IOVTime & refTime, const bool useEpochTimestamp) :
20 m_referenceTime(refTime) {
21 m_payload = (container) ? (container->payloadContainer()) : (nullptr);
22 if (m_payload){
24 if (pitr!=m_payload->end()){
25 m_pptr=*pitr;
26 } else {
27 m_pptr = new CondAttrListCollection(not useEpochTimestamp);
28 m_newedPtr=true;
29 }
31 }
32 }
33 //
35 const cool::ValidityKey & refTimeKey, const bool useEpochTimestamp)
37 makeEpochOrRunLumi(refTimeKey,useEpochTimestamp),
38 useEpochTimestamp )
39 { }
40 //
44
45 //
46 bool
50
51 //
56 //
57 unsigned int
61 //
62 std::string
64 std::string strAddress{};
66 const coral::AttributeList& payload1=m_pptr->begin()->second;
67 if (m_folderType==PoolRef) {
68 // single channel with PoolRef
69 strAddress=payload1[0].data<std::string>();
70 } else {
71 // create an AthenaAttributeList for this data
72 strAddress="POOLContainer_AthenaAttributeList][CLID=x";
73 }
74 }
75 return strAddress;
76 }
77
78 //
79 bool
83
87 return (m_pptr->iov_begin())->second;
88 } else {
89 return m_pptr->minRange();
90 }
91 }
92
100
106
107//-----------------------------------------------------------------------
109 : m_metadatatool(metadatatool)
110 {
111 m_metadatatool->lock_shared();
112 }
113
114 IOVMetaDataContainer* FMDReadLock::findFolder( const std::string& folderName )
115 {
116 return m_metadatatool->findMetaDataContainer( folderName );
117 }
118
120 m_metadatatool->unlock_shared();
121 }
122
123
125 const std::string& folderName,
126 IIOVDbMetaDataTool* metadatatool,
127 const IOVTime & refTime, const bool useEpochTimestamp )
128 : FMDReadLock(metadatatool),
129 ReadFromFileMetaData( FMDReadLock::findFolder(folderName), refTime, useEpochTimestamp )
130 { }
131
133 const std::string& folderName,
134 IIOVDbMetaDataTool* metadatatool,
135 const cool::ValidityKey & refTimeKey, const bool useEpochTimestamp)
136 : FMDReadLock(metadatatool),
137 ReadFromFileMetaData( FMDReadLock::findFolder(folderName), refTimeKey, useEpochTimestamp )
138 { }
139}
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
This is an interface to a tool used to manage the IOV Meta Data for a given object in the MetaData St...
This class is a container for conditions data.
This class is a container for the payload of conditions data.
An AttributeList represents a logical row of attributes in a metadata table.
This class is a collection of AttributeLists where each one is associated with a channel number.
This is an interface to a tool used to manage the IOV Meta Data for a given object in the MetaData St...
FMDReadLock(const FMDReadLock &)=delete
IIOVDbMetaDataTool * m_metadatatool
IOVMetaDataContainer * findFolder(const std::string &folderName)
const IOVMetaDataContainer * m_metaContainer
IOVDbNamespace::FolderType m_folderType
CondAttrListCollection * attrListCollection()
IOVDbNamespace::FolderType folderType()
const IOVPayloadContainer * m_payload
SafeReadFromFileMetaData(const std::string &folderName, IIOVDbMetaDataTool *metadatatool, const IOVTime &refTime, const bool useEpochTimestamp)
This class is a container for conditions data.
payloadVec::const_iterator const_iterator
Validity Range object.
Definition IOVRange.h:30
Basic time unit for IOVSvc.
Definition IOVTime.h:33
FolderType determineFolderType(const std::string &folderDescription, const std::string &spec, const std::vector< cool::ChannelId > &chans)
Determine folder type with optional check using clid service to check clid matches typename.
IOVTime makeEpochOrRunLumi(const cool::ValidityKey key, const bool timeIsEpoch)
Create an IOVTime in ns of epoch or run-lumi (determined by the bool) from a ValidityKey.