ATLAS Offline Software
ReadFromFileMetaData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //@file ReadFromFileMetaData.h
6 //@brief Class to read from file metadata and give the results
7 //@author Shaun Roe
8 #ifndef IOVDbSvc_ReadFromFileMetaData_h
9 #define IOVDbSvc_ReadFromFileMetaData_h
10 
11 
12 #include "CoolKernel/ValidityKey.h"
13 #include "AthenaKernel/IOVTime.h"
14 #include "AthenaKernel/IOVRange.h"
15 #include <string>
16 #include "FolderTypes.h"
18 
19 //fwd declarations
20 class IIOVDbMetaDataTool;
24 
25 namespace coral{
26  class AttributeList;
27 }
28 
29 namespace IOVDbNamespace{
30  //@brief Encapsulates the functionality to read database quantities from file metadata
32  public:
36  ReadFromFileMetaData(const IOVMetaDataContainer* m_metacon, const IOVTime & refTime, const bool useEpochTimestamp);
37  ReadFromFileMetaData(const IOVMetaDataContainer* m_metacon, const cool::ValidityKey & refTimeKey, const bool useEpochTimestamp);
39  //
40  //
41  bool isValid();
45  unsigned int numberOfObjects();
46  std::string stringAddress();
47  bool poolPayloadRequested();
48  IOVRange range();
49 
50  private:
58  bool m_newedPtr{};
59  };
60 
61 
62  class FMDReadLock {
63  public:
64  FMDReadLock( const FMDReadLock& )=delete;
65  void operator=( const FMDReadLock& )=delete;
66  FMDReadLock( IIOVDbMetaDataTool* metadatatool );
67  ~FMDReadLock();
68  IOVMetaDataContainer* findFolder( const std::string& folderName );
69  private:
71  };
72 
74  {
75  public:
76  SafeReadFromFileMetaData( const std::string& folderName,
77  IIOVDbMetaDataTool* metadatatool,
78  const IOVTime & refTime, const bool useEpochTimestamp );
79  SafeReadFromFileMetaData( const std::string& folderName,
80  IIOVDbMetaDataTool* metadatatool,
81  const cool::ValidityKey & refTimeKey, const bool useEpochTimestamp);
82  };
83 
84 }//namespace
85 #endif
IOVDbNamespace::ReadFromFileMetaData::~ReadFromFileMetaData
~ReadFromFileMetaData()
Definition: ReadFromFileMetaData.cxx:41
IOVDbNamespace::ReadFromFileMetaData::numberOfObjects
unsigned int numberOfObjects()
Definition: ReadFromFileMetaData.cxx:58
IOVPayloadContainer.h
This class is a container for the payload of conditions data. It is intended to be used to store cond...
IOVDbNamespace::ReadFromFileMetaData::attrListCollection
CondAttrListCollection * attrListCollection()
Definition: ReadFromFileMetaData.cxx:94
IOVMetaDataContainer
This class is a container for conditions data. It is intended to be used to store conditions data fro...
Definition: IOVMetaDataContainer.h:37
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
IOVDbNamespace::ReadFromFileMetaData::poolPayloadRequested
bool poolPayloadRequested()
Definition: ReadFromFileMetaData.cxx:80
IOVRange.h
Validity Range object. Holds two IOVTime instances (start and stop)
IOVDbNamespace::ReadFromFileMetaData::range
IOVRange range()
Definition: ReadFromFileMetaData.cxx:85
IOVDbNamespace::FMDReadLock::operator=
void operator=(const FMDReadLock &)=delete
IOVDbNamespace::ReadFromFileMetaData::stringAddress
std::string stringAddress()
Definition: ReadFromFileMetaData.cxx:63
IOVDbNamespace::UNKNOWN
@ UNKNOWN
Definition: FolderTypes.h:27
IOVDbNamespace::ReadFromFileMetaData
Definition: ReadFromFileMetaData.h:31
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
IOVDbNamespace::FMDReadLock::m_metadatatool
IIOVDbMetaDataTool * m_metadatatool
Definition: ReadFromFileMetaData.h:70
CondAttrListCollection
This class is a collection of AttributeLists where each one is associated with a channel number....
Definition: CondAttrListCollection.h:52
IOVDbNamespace::SafeReadFromFileMetaData::SafeReadFromFileMetaData
SafeReadFromFileMetaData(const std::string &folderName, IIOVDbMetaDataTool *metadatatool, const IOVTime &refTime, const bool useEpochTimestamp)
Definition: ReadFromFileMetaData.cxx:124
IOVDbNamespace::ReadFromFileMetaData::attributeList
AthenaAttributeList * attributeList()
Definition: ReadFromFileMetaData.cxx:102
IOVDbNamespace::ReadFromFileMetaData::m_attrListColl
CondAttrListCollection * m_attrListColl
Definition: ReadFromFileMetaData.h:56
IOVTime.h
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
IOVDbNamespace::ReadFromFileMetaData::m_payload
const IOVPayloadContainer * m_payload
Definition: ReadFromFileMetaData.h:53
IOVDbNamespace::ReadFromFileMetaData::m_newedPtr
bool m_newedPtr
Definition: ReadFromFileMetaData.h:58
IOVDbNamespace::FMDReadLock
Definition: ReadFromFileMetaData.h:62
coral
Definition: ISecondaryEventSelector.h:19
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
IOVDbNamespace::FMDReadLock::~FMDReadLock
~FMDReadLock()
Definition: ReadFromFileMetaData.cxx:119
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
IIOVDbMetaDataTool
This is an interface to a tool used to manage the IOV Meta Data for a given object in the MetaData St...
Definition: IIOVDbMetaDataTool.h:44
IOVDbNamespace::ReadFromFileMetaData::m_pptr
CondAttrListCollection * m_pptr
Definition: ReadFromFileMetaData.h:54
IOVDbNamespace::ReadFromFileMetaData::folderType
IOVDbNamespace::FolderType folderType()
Definition: ReadFromFileMetaData.cxx:53
IOVPayloadContainer
This class is a container for the payload of conditions data. It is intended to be used to store cond...
Definition: IOVPayloadContainer.h:35
CaloCellTimeCorrFiller.folderName
string folderName
Definition: CaloCellTimeCorrFiller.py:20
IOVDbNamespace::ReadFromFileMetaData::isValid
bool isValid()
Definition: ReadFromFileMetaData.cxx:47
IOVDbNamespace::FMDReadLock::findFolder
IOVMetaDataContainer * findFolder(const std::string &folderName)
Definition: ReadFromFileMetaData.cxx:114
IOVDbNamespace::ReadFromFileMetaData::ReadFromFileMetaData
ReadFromFileMetaData(const ReadFromFileMetaData &)=delete
IOVDbNamespace::FMDReadLock::FMDReadLock
FMDReadLock(const FMDReadLock &)=delete
IOVDbNamespace::SafeReadFromFileMetaData
Definition: ReadFromFileMetaData.h:74
IOVDbNamespace::ReadFromFileMetaData::m_folderType
IOVDbNamespace::FolderType m_folderType
Definition: ReadFromFileMetaData.h:57
FolderTypes.h
IOVDbNamespace::ReadFromFileMetaData::ReadFromFileMetaData
ReadFromFileMetaData()=delete
IOVDbNamespace::ReadFromFileMetaData::m_metaContainer
const IOVMetaDataContainer * m_metaContainer
Definition: ReadFromFileMetaData.h:51
IOVDbNamespace::ReadFromFileMetaData::operator=
ReadFromFileMetaData & operator=(const ReadFromFileMetaData &)=delete
IOVDbNamespace::ReadFromFileMetaData::m_attrList
AthenaAttributeList * m_attrList
Definition: ReadFromFileMetaData.h:55
IOVDbNamespace::ReadFromFileMetaData::m_referenceTime
IOVTime m_referenceTime
Definition: ReadFromFileMetaData.h:52
IOVDbNamespace::FolderType
FolderType
Definition: FolderTypes.h:26
IOVDbNamespace
Definition: Base64Codec.cxx:16