00001 #ifndef ParallelAnalysis_TSelectorAnalyzer_h 00002 #define ParallelAnalysis_TSelectorAnalyzer_h 00003 #include "FWCore/Framework/interface/EDAnalyzer.h" 00004 #include "TList.h" 00005 00006 template<typename Algo> 00007 class TSelectorAnalyzer : public edm::EDAnalyzer { 00008 public: 00009 TSelectorAnalyzer( const edm::ParameterSet & cfg ) : 00010 list_(), algo_( 0, list_ ) { 00011 } 00012 void analyze( const edm::Event & evt, const edm::EventSetup & ) { 00013 algo_.process( evt ); 00014 } 00015 void endJob( const edm::EventSetup & ) { 00016 algo_.postProcess( list_ ); 00017 algo_.terminate( list_ ); 00018 } 00019 private: 00020 TList list_; 00021 Algo algo_; 00022 }; 00023 00024 #endif