55 edm::LogInfo(
"SiStripDetInfoFileWriter::SiStripDetInfoFileWriter");
58 tkGeomToken_ = esConsumes<edm::Transition::BeginRun>();
62 edm::LogInfo(
"SiStripDetInfoFileWriter::~SiStripDetInfoFileWriter");
66 outputFile_.open(filePath_.c_str());
68 if (outputFile_.is_open()) {
69 const auto&
dd = iSetup.
getData(tkGeomToken_);
71 edm::LogInfo(
"SiStripDetInfoFileWriter::beginRun - got geometry ") << std::endl;
73 edm::LogInfo(
"SiStripDetInfoFileWriter") <<
" There are " <<
dd.detUnits().size() <<
" detectors" << std::endl;
75 for (
const auto& it :
dd.detUnits()) {
84 if (numberOfAPVs < 1 || numberOfAPVs > 6) {
87 <<
"Will not write this entry to file" << endl;
91 outputFile_ << detid <<
" " << numberOfAPVs <<
" " << stripLength <<
" " <<
thickness <<
"\n";
96 edm::LogError(
"SiStripDetInfoFileWriter::beginRun - Unable to open file") << endl;
virtual int nstrips() const =0
#define DEFINE_FWK_MODULE(type)
void analyze(const edm::Event &, const edm::EventSetup &) override
Log< level::Error, false > LogError
T getUntrackedParameter(std::string const &, T const &) const
virtual float thickness() const =0
virtual float stripLength() const =0
SiStripDetInfoFileWriter(const edm::ParameterSet &)
void endRun(const edm::Run &, const edm::EventSetup &iSetup) override
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
bool getData(T &iHolder) const
void beginRun(const edm::Run &, const edm::EventSetup &iSetup) override
DetId geographicalId() const
The label of this GeomDet.
Namespace of DDCMS conversion namespace.
Log< level::Info, false > LogInfo
std::ofstream outputFile_
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
~SiStripDetInfoFileWriter() override
const Bounds & bounds() const