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
T getUntrackedParameter(std::string const &, T const &) const
#define DEFINE_FWK_MODULE(type)
const Bounds & bounds() const
void analyze(const edm::Event &, const edm::EventSetup &) override
Log< level::Error, false > LogError
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
virtual float thickness() const =0
bool getData(T &iHolder) const
virtual float stripLength() const =0
SiStripDetInfoFileWriter(const edm::ParameterSet &)
void endRun(const edm::Run &, const edm::EventSetup &iSetup) override
DetId geographicalId() const
The label of this GeomDet.
void beginRun(const edm::Run &, const edm::EventSetup &iSetup) override
Log< level::Info, false > LogInfo
std::ofstream outputFile_
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
~SiStripDetInfoFileWriter() override
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.