1#ifndef DETCOMPONENTS_REWRITEBITFIELD_H
2#define DETCOMPONENTS_REWRITEBITFIELD_H
5#include "Gaudi/Algorithm.h"
6#include "GaudiKernel/ToolHandle.h"
9#include "k4FWCore/DataHandle.h"
13#include "DD4hep/Readout.h"
15namespace DDSegmentation {
22class CalorimeterHitCollection;
50 virtual StatusCode
execute(
const EventContext&)
const final;
60 mutable k4FWCore::DataHandle<edm4hep::CalorimeterHitCollection>
m_inHits{
"hits/caloInHits", Gaudi::DataHandle::Reader,
63 mutable k4FWCore::DataHandle<edm4hep::CalorimeterHitCollection>
m_outHits{
"hits/caloOutHits",
64 Gaudi::DataHandle::Writer,
this};
67 "Name of the detector readout used in simulation"};
69 Gaudi::Property<std::string>
m_newReadoutName{
this,
"newReadoutName",
"",
"Name of the new detector readout"};
76 this,
"removeIds", {},
"Segmentation fields that are going to be removed"};
80 Gaudi::Property<uint>
m_debugPrint{
this,
"debugPrint", 10,
"Limit of debug printing"};
Rewrite the readout bitfield.
Definition RewriteBitfield.h:39
Gaudi::Property< std::vector< std::string > > m_oldIdentifiers
Segmentation fields that are going to be removed from the readout.
Definition RewriteBitfield.h:75
virtual StatusCode execute(const EventContext &) const final
Execute.
Definition RewriteBitfield.cpp:76
k4FWCore::DataHandle< edm4hep::CalorimeterHitCollection > m_inHits
Handle for the EDM hits to be read.
Definition RewriteBitfield.h:60
Gaudi::Property< std::string > m_newReadoutName
Name of the new detector readout.
Definition RewriteBitfield.h:69
Gaudi::Property< std::string > m_oldReadoutName
Name of the detector readout used in simulation.
Definition RewriteBitfield.h:66
virtual ~RewriteBitfield()
Definition RewriteBitfield.cpp:21
virtual StatusCode initialize() final
Initialize.
Definition RewriteBitfield.cpp:23
Gaudi::Property< uint > m_debugPrint
Limit of debug printing.
Definition RewriteBitfield.h:80
std::vector< std::string > m_detectorIdentifiers
Detector fields that are going to be rewritten ( = old field - to be removed)
Definition RewriteBitfield.h:78
dd4hep::DDSegmentation::BitFieldCoder * m_newDecoder
New bitfield decoder.
Definition RewriteBitfield.h:73
RewriteBitfield(const std::string &, ISvcLocator *)
Definition RewriteBitfield.cpp:15
virtual StatusCode finalize() final
Finalize.
Definition RewriteBitfield.cpp:106
dd4hep::DDSegmentation::BitFieldCoder * m_oldDecoder
Old bitfield decoder.
Definition RewriteBitfield.h:71
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition RewriteBitfield.h:58
k4FWCore::DataHandle< edm4hep::CalorimeterHitCollection > m_outHits
Handle for the EDM hits to be written.
Definition RewriteBitfield.h:63
Definition GeoConstruction.h:10
Definition EventInformation.h:10