CMS 3D CMS Logo

Public Member Functions | Private Attributes

CollectionDumper< T > Class Template Reference

Inheritance diagram for CollectionDumper< T >:
edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &evt, const edm::EventSetup &es)
 CollectionDumper (const edm::ParameterSet &pset)
virtual ~CollectionDumper ()

Private Attributes

std::string moduleName_
edm::InputTag src_

Detailed Description

template<typename T>
class CollectionDumper< T >

Definition at line 68 of file RecoTauDumper.cc.


Constructor & Destructor Documentation

template<typename T >
CollectionDumper< T >::CollectionDumper ( const edm::ParameterSet pset) [inline, explicit]

Definition at line 70 of file RecoTauDumper.cc.

                                                          :
      src_(pset.getParameter<edm::InputTag>("src")),
      moduleName_(pset.getParameter<std::string>("@module_label")){}
template<typename T >
virtual CollectionDumper< T >::~CollectionDumper ( ) [inline, virtual]

Definition at line 73 of file RecoTauDumper.cc.

{}

Member Function Documentation

template<typename T >
void CollectionDumper< T >::analyze ( const edm::Event evt,
const edm::EventSetup es 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 81 of file RecoTauDumper.cc.

References gather_cfg::cout, edm::Event::getByLabel(), VarParsing::obj, convertSQLitetoXML_cfg::output, and TablePrint::write.

                                                                         {
  typedef edm::View<T> TView;
  edm::Handle<TView> view;
  evt.getByLabel(src_, view);

  std::ostringstream output;
  output << " * * * <" << moduleName_
    << "> Dump - source: [" << src_ << "]" << std::endl;

  BOOST_FOREACH(const T& obj, *view) {
    write(output, obj);
  }
  std::cout << output.str();
}

Member Data Documentation

template<typename T >
std::string CollectionDumper< T >::moduleName_ [private]

Definition at line 77 of file RecoTauDumper.cc.

template<typename T >
edm::InputTag CollectionDumper< T >::src_ [private]

Definition at line 76 of file RecoTauDumper.cc.