FWCore
Framework
src
NumberOfConcurrentIOVs.h
Go to the documentation of this file.
1
#ifndef FWCore_Framework_NumberOfConcurrentIOVs_h
2
#define FWCore_Framework_NumberOfConcurrentIOVs_h
3
// -*- C++ -*-
4
//
5
// Package: Framework
6
// Class : NumberOfConcurrentIOVs
7
//
17
//
18
// Original Authors: W. David Dagenhart
19
// Created: 1 February 2019
20
21
#include "
FWCore/Framework/interface/EventSetupRecordKey.h
"
22
23
#include <set>
24
#include <utility>
25
#include <vector>
26
27
namespace
edm
{
28
29
class
ParameterSet
;
30
31
namespace
eventsetup {
32
33
class
EventSetupProvider;
34
35
class
NumberOfConcurrentIOVs
{
36
public
:
37
NumberOfConcurrentIOVs
();
38
39
void
readConfigurationParameters
(
ParameterSet
const
* eventSetupPset,
40
unsigned
int
maxConcurrentIOVs,
41
bool
dumpOptions);
42
43
// This depends on bool's hard coded in the EventSetupRecord C++ classes
44
void
fillRecordsNotAllowingConcurrentIOVs
(
EventSetupProvider
const
&);
45
46
unsigned
int
numberOfConcurrentIOVs
(
EventSetupRecordKey
const
&,
bool
printInfoMsg =
false
)
const
;
47
48
void
clear
();
49
50
private
:
51
// This is the single value configured in the top level options
52
// parameter set that determines the number of concurrent IOVs
53
// allowed for each record. This value can be overridden by
54
// either of the values of the next two data members. The default
55
// for this is one.
56
unsigned
int
numberConcurrentIOVs_
;
57
58
// This is derived from a boolean value that can be hard coded
59
// into the C++ definition of a class deriving from EventSetupRecord.
60
// The data member is a static constexpr member of the class and
61
// this data member is named allowConcurrentIOVs_.
62
// If the value is defined as false, then the key to the record
63
// will get stored in the set defined below. This will be used to
64
// to limit the number of concurrent IOVs for a particular record
65
// to be one even if the overall "numberOfConcurrentIOVs" parameter
66
// is configured to be greater than one.
67
std::set<EventSetupRecordKey>
recordsNotAllowingConcurrentIOVs_
;
68
69
// It is possible to individually configure the number of concurrent
70
// IOVs allowed for each record. This is done by adding parameters
71
// to a nested parameter set in the top level options parameter set.
72
// Setting these parameters is optional. This container can hold an
73
// entry for all records, it can be empty, or hold an entry for
74
// any subset of records. Values in this container override both of the
75
// above data members.
76
std::vector<std::pair<EventSetupRecordKey, unsigned int>>
forceNumberOfConcurrentIOVs_
;
77
78
unsigned
int
maxConcurrentIOVs_
= 1;
79
};
80
81
}
// namespace eventsetup
82
}
// namespace edm
83
#endif
edm
HLT enums.
Definition:
AlignableModifier.h:19
edm::eventsetup::EventSetupRecordKey
Definition:
EventSetupRecordKey.h:30
edm::eventsetup::EventSetupProvider
Definition:
EventSetupProvider.h:50
edm::eventsetup::NumberOfConcurrentIOVs
Definition:
NumberOfConcurrentIOVs.h:35
edm::ParameterSet
Definition:
ParameterSet.h:47
ParameterSet
Definition:
Functions.h:16
edm::eventsetup::NumberOfConcurrentIOVs::recordsNotAllowingConcurrentIOVs_
std::set< EventSetupRecordKey > recordsNotAllowingConcurrentIOVs_
Definition:
NumberOfConcurrentIOVs.h:67
edm::eventsetup::NumberOfConcurrentIOVs::numberOfConcurrentIOVs
unsigned int numberOfConcurrentIOVs(EventSetupRecordKey const &, bool printInfoMsg=false) const
Definition:
NumberOfConcurrentIOVs.cc:49
edm::eventsetup::NumberOfConcurrentIOVs::clear
void clear()
Definition:
NumberOfConcurrentIOVs.cc:77
edm::eventsetup::NumberOfConcurrentIOVs::fillRecordsNotAllowingConcurrentIOVs
void fillRecordsNotAllowingConcurrentIOVs(EventSetupProvider const &)
Definition:
NumberOfConcurrentIOVs.cc:45
edm::eventsetup::NumberOfConcurrentIOVs::readConfigurationParameters
void readConfigurationParameters(ParameterSet const *eventSetupPset, unsigned int maxConcurrentIOVs, bool dumpOptions)
Definition:
NumberOfConcurrentIOVs.cc:19
edm::eventsetup::NumberOfConcurrentIOVs::NumberOfConcurrentIOVs
NumberOfConcurrentIOVs()
Definition:
NumberOfConcurrentIOVs.cc:17
EventSetupRecordKey.h
edm::eventsetup::NumberOfConcurrentIOVs::maxConcurrentIOVs_
unsigned int maxConcurrentIOVs_
Definition:
NumberOfConcurrentIOVs.h:78
edm::eventsetup::NumberOfConcurrentIOVs::numberConcurrentIOVs_
unsigned int numberConcurrentIOVs_
Definition:
NumberOfConcurrentIOVs.h:56
edm::eventsetup::NumberOfConcurrentIOVs::forceNumberOfConcurrentIOVs_
std::vector< std::pair< EventSetupRecordKey, unsigned int > > forceNumberOfConcurrentIOVs_
Definition:
NumberOfConcurrentIOVs.h:76
Generated for CMSSW Reference Manual by
1.8.16