From bbcc4a536c402f9c2f89059325a00806006d9e50 Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Fri, 19 Jul 2019 13:58:37 +0200 Subject: [PATCH 1/3] Processor: make setParameters and setName public --- source/include/marlin/Processor.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/include/marlin/Processor.h b/source/include/marlin/Processor.h index e96a73bf..1e0b8c9d 100644 --- a/source/include/marlin/Processor.h +++ b/source/include/marlin/Processor.h @@ -220,6 +220,12 @@ namespace marlin{ // */ // ProcessorParameter* getProcessorParameter( const std::string name) ; + /** Initialize the parameters */ + virtual void setParameters( std::shared_ptr parameters) ; + + /** Set processor name */ + virtual void setName( const std::string & processorName) { _processorName = processorName ; } + protected: /** Set the return value for this processor - typically at end of processEvent(). @@ -409,12 +415,6 @@ namespace marlin{ /** Allow friend class CCProcessor to update processor parameters */ virtual void updateParameters(); - - /** Set processor name */ - virtual void setName( const std::string & processorName) { _processorName = processorName ; } - - /** Initialize the parameters */ - virtual void setParameters( std::shared_ptr parameters) ; /** Sets the registered steering parameters before calling init() */ From a7314424bcf07cec243856828897d3f6ce103016 Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Wed, 4 Sep 2019 14:32:24 +0200 Subject: [PATCH 2/3] EventSelector: place processor into marlin namespace --- source/include/marlin/EventSelector.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/include/marlin/EventSelector.h b/source/include/marlin/EventSelector.h index 1d1fac5c..e3e287c7 100644 --- a/source/include/marlin/EventSelector.h +++ b/source/include/marlin/EventSelector.h @@ -23,6 +23,7 @@ using namespace marlin ; * @author F. Gaede, DESY * @version $Id:$ */ +namespace marlin { class EventSelector : public Processor, public marlin::EventModifier { @@ -73,6 +74,8 @@ class EventSelector : public Processor, public marlin::EventModifier { int _nEvt=-1; } ; +} // namespace marlin + #endif From c8e4092dd48a2611fe29aad0003d7c472faa9f32 Mon Sep 17 00:00:00 2001 From: Andre Sailer Date: Wed, 4 Sep 2019 15:12:01 +0200 Subject: [PATCH 3/3] EventSelector: indent for namespace --- source/include/marlin/EventSelector.h | 92 +++++++++++++-------------- 1 file changed, 44 insertions(+), 48 deletions(-) diff --git a/source/include/marlin/EventSelector.h b/source/include/marlin/EventSelector.h index e3e287c7..af57a03b 100644 --- a/source/include/marlin/EventSelector.h +++ b/source/include/marlin/EventSelector.h @@ -25,54 +25,50 @@ using namespace marlin ; */ namespace marlin { -class EventSelector : public Processor, public marlin::EventModifier { - - typedef std::set< std::pair< int, int > > SET ; - - public: - - virtual Processor* newProcessor() { return new EventSelector ; } - - - EventSelector() ; - - /** Called at the begin of the job before anything is read. - * Use to initialize the processor, e.g. book histograms. - */ - virtual void init() ; - - /** Called for every run. - */ - virtual void processRunHeader( LCRunHeader* run ) ; - - /** Called for every event - the working horse. - */ - virtual void processEvent( LCEvent * evt ) ; - - - virtual void check( LCEvent * evt ) ; - - - virtual void modifyEvent( LCEvent *evt ) ; - - - /** Called after data processing for clean up. - */ - virtual void end() ; - - virtual const std::string & name() const { return Processor::name() ; } - - - protected: - - /** Input collection name. - */ - IntVec _evtList{}; - SET _evtSet{}; - - int _nRun=-1; - int _nEvt=-1; -} ; + class EventSelector : public Processor, public marlin::EventModifier { + + typedef std::set< std::pair< int, int > > SET ; + + public: + + virtual Processor* newProcessor() { return new EventSelector ; } + + EventSelector() ; + + /** Called at the begin of the job before anything is read. + * Use to initialize the processor, e.g. book histograms. + */ + virtual void init() ; + + /** Called for every run. + */ + virtual void processRunHeader( LCRunHeader* run ) ; + + /** Called for every event - the working horse. + */ + virtual void processEvent( LCEvent * evt ) ; + + virtual void check( LCEvent * evt ) ; + + virtual void modifyEvent( LCEvent *evt ) ; + + /** Called after data processing for clean up. + */ + virtual void end() ; + + virtual const std::string & name() const { return Processor::name() ; } + + + protected: + + /** Input collection name. + */ + IntVec _evtList{}; + SET _evtSet{}; + + int _nRun=-1; + int _nEvt=-1; + } ; } // namespace marlin