Skip to content

Commit

Permalink
Add const in a few places
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Jan 23, 2024
1 parent c771881 commit 357b7ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions k4MarlinWrapper/k4MarlinWrapper/LcioEventOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class LcioEventOutput : Gaudi::Algorithm {
explicit LcioEventOutput(const std::string& name, ISvcLocator* pSL);
virtual ~LcioEventOutput() = default;
virtual StatusCode initialize() override final;
virtual StatusCode execute(const EventContext&) override final;
virtual StatusCode execute(const EventContext&) const final;
virtual StatusCode finalize() override final;

private:
Expand All @@ -54,9 +54,9 @@ class LcioEventOutput : Gaudi::Algorithm {
Gaudi::Property<std::vector<std::string>> m_drop_coll_types{this, "DropCollectionTypes", {}};
Gaudi::Property<std::vector<std::string>> m_full_subset_colls{this, "FullSubsetCollections", {}};

void dropCollections(lcio::LCEventImpl* event, std::vector<lcio::LCCollectionVec*>& subsets);
void dropCollections(lcio::LCEventImpl* event, std::vector<lcio::LCCollectionVec*>& subsets) const;

void revertSubsets(const std::vector<lcio::LCCollectionVec*>& subsets);
void revertSubsets(const std::vector<lcio::LCCollectionVec*>& subsets) const;
};

#endif
8 changes: 4 additions & 4 deletions k4MarlinWrapper/src/components/LcioEventOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

DECLARE_COMPONENT(LcioEventOutput)

LcioEventOutput::LcioEventOutput(const std::string& name, ISvcLocator* pSL) : GaudiAlgorithm(name, pSL) {}
LcioEventOutput::LcioEventOutput(const std::string& name, ISvcLocator* pSL) : Gaudi::Algorithm(name, pSL) {}

////////////////////////////////////////////
// Init MT writer and write mode
////////////////////////////////////////////
StatusCode LcioEventOutput::initialize() {
StatusCode sc = GaudiAlgorithm::initialize();
StatusCode sc = Gaudi::Algorithm::initialize();
if (sc.isFailure())
return sc;

Expand All @@ -52,7 +52,7 @@ StatusCode LcioEventOutput::initialize() {
////////////////////////////////////////////
// Go over all collections and drop based on input parameters
////////////////////////////////////////////
void LcioEventOutput::dropCollections(lcio::LCEventImpl* event, std::vector<lcio::LCCollectionVec*>& subsets) {
void LcioEventOutput::dropCollections(lcio::LCEventImpl* event, std::vector<lcio::LCCollectionVec*>& subsets) const {
const std::vector<std::string>* evt_coll_names = event->getCollectionNames();

bool th_drop, ch_drop = false;
Expand Down Expand Up @@ -118,7 +118,7 @@ void LcioEventOutput::dropCollections(lcio::LCEventImpl* event, std::vector<lcio
////////////////////////////////////////////
// Revert subsets marked while dropping collections
////////////////////////////////////////////
void LcioEventOutput::revertSubsets(const std::vector<lcio::LCCollectionVec*>& subsets) {
void LcioEventOutput::revertSubsets(const std::vector<lcio::LCCollectionVec*>& subsets) const {
// revert subset flag - if any
for (auto& subset : subsets) {
(*subset).setSubset(true);
Expand Down

0 comments on commit 357b7ae

Please sign in to comment.