CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
EDMNeutronWriter Class Reference

#include <EDMNeutronWriter.h>

Inheritance diagram for EDMNeutronWriter:
NeutronWriter

Public Member Functions

void beginEvent (edm::Event &e, const edm::EventSetup &es) override
 
 EDMNeutronWriter ()
 
void endEvent () override
 
void initialize (int detType) override
 
void writeCluster (int detType, const edm::PSimHitContainer &simHits) override
 writes out a list of SimHits. More...
 
 ~EDMNeutronWriter () override
 
- Public Member Functions inherited from NeutronWriter
virtual ~NeutronWriter ()
 

Private Attributes

edm::EventtheEvent
 
std::unique_ptr
< edm::PSimHitContainer
theHits
 

Detailed Description

Writes an event made of neutron hits

Definition at line 9 of file EDMNeutronWriter.h.

Constructor & Destructor Documentation

EDMNeutronWriter::EDMNeutronWriter ( )

Definition at line 7 of file EDMNeutronWriter.cc.

7 : theEvent(nullptr), theHits(nullptr) {}
std::unique_ptr< edm::PSimHitContainer > theHits
edm::Event * theEvent
EDMNeutronWriter::~EDMNeutronWriter ( )
override

Definition at line 9 of file EDMNeutronWriter.cc.

9 {}

Member Function Documentation

void EDMNeutronWriter::beginEvent ( edm::Event e,
const edm::EventSetup es 
)
overridevirtual

Reimplemented from NeutronWriter.

Definition at line 15 of file EDMNeutronWriter.cc.

References alignCSCRings::e, theEvent, and theHits.

15  {
16  theEvent = &e;
17  theHits = std::make_unique<edm::PSimHitContainer>();
18 }
std::unique_ptr< edm::PSimHitContainer > theHits
edm::Event * theEvent
void EDMNeutronWriter::endEvent ( )
overridevirtual

Reimplemented from NeutronWriter.

Definition at line 20 of file EDMNeutronWriter.cc.

References eostools::move(), edm::Event::put(), theEvent, and theHits.

OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:133
std::unique_ptr< edm::PSimHitContainer > theHits
def move
Definition: eostools.py:511
edm::Event * theEvent
void EDMNeutronWriter::initialize ( int  detType)
inlineoverridevirtual

Reimplemented from NeutronWriter.

Definition at line 18 of file EDMNeutronWriter.h.

18 {}
void EDMNeutronWriter::writeCluster ( int  detType,
const edm::PSimHitContainer simHits 
)
overridevirtual

writes out a list of SimHits.

Implements NeutronWriter.

Definition at line 11 of file EDMNeutronWriter.cc.

References theHits.

11  {
12  theHits->insert(theHits->end(), simHits.begin(), simHits.end());
13 }
std::unique_ptr< edm::PSimHitContainer > theHits
tuple simHits
Definition: trackerHits.py:16

Member Data Documentation

edm::Event* EDMNeutronWriter::theEvent
private

Definition at line 21 of file EDMNeutronWriter.h.

Referenced by beginEvent(), and endEvent().

std::unique_ptr<edm::PSimHitContainer> EDMNeutronWriter::theHits
private

Definition at line 22 of file EDMNeutronWriter.h.

Referenced by beginEvent(), endEvent(), and writeCluster().