94 const auto chosenTag = globalTagsGroup->findGroup(iPSet.getParameter<
std::string>(
"globalTag"));
95 const auto tagsDataSet = chosenTag->findDataSet(
"Tags");
98 std::vector<hobj_ref_t>
tags = tagsDataSet->readRefs();
100 std::set<std::string> recordsToExclude;
102 auto exclude = iPSet.getParameter<std::vector<std::string>>(
"excludeRecords");
103 recordsToExclude = std::set(exclude.begin(), exclude.end());
106 for (
auto t :
tags) {
109 record.name_ = tagGroup->findAttribute(
"record")->readString();
112 if (recordsToExclude.end() != recordsToExclude.find(
record.name_)) {
117 auto recordGroup = recordsGroup->findGroup(
record.name_);
119 auto dataProductsGroup = recordGroup->findGroup(
"DataProducts");
122 for (
size_t i = 0;
i < dataProductsGroup->getNumObjs(); ++
i) {
123 std::string productGroupName = dataProductsGroup->getObjnameByIdx(
i);
125 auto dataProductGroup = dataProductsGroup->findGroup(productGroupName);
127 auto const typeAttr = dataProductGroup->findAttribute(
"type");
132 if (
name.size() == 1 and
name[0] ==
'-') {
139 auto const typeAttr = tagGroup->findAttribute(
"time_type");
144 std::vector<hobj_ref_t> payloadRefForIOVs;
146 auto const firstDataSet = tagGroup->findDataSet(
"first");
147 auto const lastDataSet = tagGroup->findDataSet(
"last");
149 record.iovFirsts_ = firstDataSet->readSyncValues();
150 record.iovLasts_ = lastDataSet->readSyncValues();
153 auto const payloadDataSet = tagGroup->findDataSet(
"payload");
154 payloadRefForIOVs = payloadDataSet->readRefs();
155 assert(payloadRefForIOVs.size() ==
record.iovFirsts_.size() *
record.dataProducts_.size());
158 size_t dataProductIndex = 0;
159 for (
auto r : payloadRefForIOVs) {
160 record.dataProducts_[dataProductIndex].payloadForIOVs_.push_back(
r);
162 if (dataProductIndex >=
record.dataProducts_.size()) {
163 dataProductIndex = 0;
std::shared_ptr< Group > derefGroup(hobj_ref_t iRef) const
std::vector< Record > records_
void usingRecordWithKey(const EventSetupRecordKey &key)
std::shared_ptr< Group > findGroup(std::string const &iName) const
std::shared_ptr< Attribute > findAttribute(std::string const &iName) const
void findingRecordWithKey(const eventsetup::EventSetupRecordKey &)
static HCTypeTag findType(char const *iTypeName)
find a type based on the types name, if not found will return default HCTypeTag