CMS 3D CMS Logo

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::PSimHitContainertheHits
 

Detailed Description

Writes an event made of neutron hits

Definition at line 9 of file EDMNeutronWriter.h.

Constructor & Destructor Documentation

◆ EDMNeutronWriter()

EDMNeutronWriter::EDMNeutronWriter ( )

Definition at line 4 of file EDMNeutronWriter.cc.

4 : theEvent(nullptr), theHits(nullptr) {}

◆ ~EDMNeutronWriter()

EDMNeutronWriter::~EDMNeutronWriter ( )
override

Definition at line 6 of file EDMNeutronWriter.cc.

6 {}

Member Function Documentation

◆ beginEvent()

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

Reimplemented from NeutronWriter.

Definition at line 12 of file EDMNeutronWriter.cc.

12  {
13  theEvent = &e;
14  theHits = std::unique_ptr<edm::PSimHitContainer>(new edm::PSimHitContainer());
15 }

References MillePedeFileConverter_cfg::e, theEvent, and theHits.

◆ endEvent()

void EDMNeutronWriter::endEvent ( )
overridevirtual

Reimplemented from NeutronWriter.

Definition at line 17 of file EDMNeutronWriter.cc.

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

◆ initialize()

void EDMNeutronWriter::initialize ( int  detType)
inlineoverridevirtual

Reimplemented from NeutronWriter.

Definition at line 18 of file EDMNeutronWriter.h.

18 {}

◆ writeCluster()

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

writes out a list of SimHits.

Implements NeutronWriter.

Definition at line 8 of file EDMNeutronWriter.cc.

8  {
9  theHits->insert(theHits->end(), simHits.begin(), simHits.end());
10 }

References FastTrackerRecHitCombiner_cfi::simHits, and theHits.

Member Data Documentation

◆ theEvent

edm::Event* EDMNeutronWriter::theEvent
private

Definition at line 21 of file EDMNeutronWriter.h.

Referenced by beginEvent(), and endEvent().

◆ theHits

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

Definition at line 22 of file EDMNeutronWriter.h.

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

FastTrackerRecHitCombiner_cfi.simHits
simHits
Definition: FastTrackerRecHitCombiner_cfi.py:5
EDMNeutronWriter::theEvent
edm::Event * theEvent
Definition: EDMNeutronWriter.h:21
edm::Event::put
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:132
eostools.move
def move(src, dest)
Definition: eostools.py:511
EDMNeutronWriter::theHits
std::unique_ptr< edm::PSimHitContainer > theHits
Definition: EDMNeutronWriter.h:22
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37