Skip to content

Commit

Permalink
DB output migration of RPCReadOutMapBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
tvami committed Dec 5, 2021
1 parent ad121a5 commit 1a48c79
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions CondFormats/RPCObjects/test/RPCReadOutMapBuilder.cc
Expand Up @@ -32,7 +32,7 @@ class RPCReadOutMapBuilder : public edm::one::EDAnalyzer<> {
void endJob() override;

private:
RPCReadOutMapping* cabling;
RPCReadOutMapping cabling;
string m_record;
};

Expand All @@ -56,10 +56,9 @@ void RPCReadOutMapBuilder::endJob() {

try {
if (mydbservice->isNewTagRequest(m_record)) {
mydbservice->createNewIOV<RPCReadOutMapping>(
cabling, mydbservice->beginOfTime(), mydbservice->endOfTime(), m_record);
mydbservice->createOneIOV(cabling, mydbservice->beginOfTime(), m_record);
} else {
mydbservice->appendSinceTime<RPCReadOutMapping>(cabling, mydbservice->currentTime(), m_record);
mydbservice->appendOneIOV(cabling, mydbservice->currentTime(), m_record);
}
} catch (std::exception& e) {
cout << "std::exception: " << e.what();
Expand All @@ -73,7 +72,7 @@ void RPCReadOutMapBuilder::endJob() {
void RPCReadOutMapBuilder::beginJob() {
cout << "BeginJob method " << endl;
cout << "Building RPC Cabling" << endl;
cabling = new RPCReadOutMapping("My map V-TEST");
RPCReadOutMapping cabling;
{
DccSpec dcc(790);
for (int idtb = 1; idtb <= 68; idtb++) {
Expand Down Expand Up @@ -103,7 +102,7 @@ void RPCReadOutMapBuilder::beginJob() {
}
dcc.add(tb);
}
cabling->add(dcc);
cabling.add(dcc);
}
}

Expand Down

0 comments on commit 1a48c79

Please sign in to comment.