|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef IOVDbSvc_IOVDbCoolFunctions_h
8 #define IOVDbSvc_IOVDbCoolFunctions_h
9 #include "CoolKernel/ChannelId.h"
10 #include "CoolKernel/ValidityKey.h"
25 class AttributeListSpecification;
26 class AttributeSpecification;
31 class ChannelSelection;
40 template <
class NumericType>
42 inRange(
const NumericType &
val,
const std::pair<NumericType, NumericType> &
range){
46 template <
class NumericType>
48 inRange(
const NumericType &
val,
const std::vector<std::pair<NumericType, NumericType> > &
ranges){
50 return std::any_of(
ranges.begin(),
ranges.end(), valueInRange);
54 const coral::AttributeListSpecification &
86 std::pair<unsigned long long, unsigned long long>
91 makeRange(
const cool::ValidityKey
since,
const cool::ValidityKey
until,
const bool timeIsEpoch);
98 std::pair<bool, std::string>
102 std::pair<std::vector<cool::ChannelId>, std::vector<std::string>>
Validity Range object. Holds two IOVTimes (start and stop)
constexpr unsigned long long ALL_LUMI_BLOCKS
All the lumi blocks in one run.
bool inRange(const NumericType &val, const std::pair< NumericType, NumericType > &range)
Function to check whether a number is in the inclusive range, given as a pair.
unsigned long long iovTimeFromSeconds(const unsigned long long seconds)
Create a long long time in ns from s.
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.
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
const coral::AttributeListSpecification & attrList2Spec(const coral::AttributeList &atrlist)
return the AttributeListSpecification of an AttributeList
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
std::pair< std::vector< cool::ChannelId >, std::vector< std::string > > channelList(IOVDbConn *pConnection, const std::string &folderName, const bool named)
Retrieve channel information.
IOVRange makeRange(const cool::ValidityKey since, const cool::ValidityKey until, const bool timeIsEpoch)
Make an IOVRange from two validity keys.
bool typeSizeIsKnown(const coral::Attribute &attribute)
Return a bool indicating whether the size of a given Attribute can be determined.
std::pair< unsigned long long, unsigned long long > runLumiFromIovTime(const unsigned long long iovTime)
Return a [run,lumi] pair from an IOV time.
unsigned int attributeSize(const coral::Attribute &attribute)
return the size (in bytes) of an Attribute
unsigned int attributeListSize(const coral::AttributeList &atrlist)
return the size (in bytes) of an AttributeList
std::pair< bool, std::string > folderMetadata(IOVDbConn *pConnection, const std::string &folderName)
Retrieve (bool) multiversion flag and folder description
unsigned long long iovTimeFromRunLumi(const unsigned long long run, const unsigned long long lumi)
Create a long long representing the IOV from run, lumi.
int countSelectedChannels(const std::vector< cool::ChannelId > &channels, const cool::ChannelSelection &selected)
Count the number of selected channels in a vector of channels according to cool::Channel selection.
cool::ChannelId makeChannel(const std::string &strval, const cool::ChannelId defchan)
Create a ChannelId from a string; if string is empty, return the default channel number given.