24 #include "TDirectory.h"
49 : printdebug_(iConfig.getUntrackedParameter<bool>(
"printDebug",
true)),
50 formatedOutput_(iConfig.getUntrackedParameter<std::
string>(
"outputFile",
"")),
51 gainType_(iConfig.getUntrackedParameter<uint32_t>(
"gainType", 1)),
58 tree_->Branch(
"Index", &
id_,
"Index/I");
67 edm::LogInfo(
"SiStripApvGainReader") <<
"[SiStripApvGainReader::analyze] End Reading SiStripApvGain" << std::endl;
68 std::vector<uint32_t> detid;
69 stripApvGain.getDetIds(detid);
70 edm::LogInfo(
"Number of detids ") << detid.size() << std::endl;
72 FILE* pFile =
nullptr;
75 for (
size_t id = 0;
id < detid.size();
id++) {
79 for (
int it = 0; it < range.second - range.first; it++) {
81 <<
"detid " << detid[
id] <<
" \t " << apv++ <<
" \t " << stripApvGain.getApvGain(it, range) << std::endl;
87 gain_ = stripApvGain.getApvGain(it, range);
94 fprintf(pFile,
"%i ", detid[
id]);
95 for (
int it = 0; it < range.second - range.first; it++) {
96 fprintf(pFile,
"%f ", stripApvGain.getApvGain(it, range));
static const std::string kSharedResource
uint16_t *__restrict__ id
#define DEFINE_FWK_MODULE(type)
T * make(const Args &...args) const
make new ROOT object
~SiStripApvGainReader() override=default
const uint16_t range(const Frame &aFrame)
bool getData(T &iHolder) const
const std::string formatedOutput_
std::pair< ContainerIterator, ContainerIterator > Range
Log< level::Info, false > LogInfo
edm::Service< TFileService > fs_
void analyze(const edm::Event &, const edm::EventSetup &) override
SiStripApvGainReader(const edm::ParameterSet &)
const edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_