16 printdebug_(iConfig.getUntrackedParameter<
bool>(
"printDebug",
true)),
17 formatedOutput_(iConfig.getUntrackedParameter<
std::
string>(
"outputFile",
"")),
18 gainType_ (iConfig.getUntrackedParameter<uint32_t>(
"gainType",1)),
23 tree_->Branch(
"Index",&
id_,
"Index/I");
36 edm::LogInfo(
"SiStripApvGainReader") <<
"[SiStripApvGainReader::analyze] End Reading SiStripApvGain" << std::endl;
37 std::vector<uint32_t> detid;
39 edm::LogInfo(
"Number of detids ") << detid.size() << std::endl;
43 for (
size_t id=0;
id<detid.size();
id++){
47 for(
int it=0;it<range.second-range.first;it++){
48 edm::LogInfo(
"SiStripApvGainReader") <<
"detid " << detid[
id] <<
" \t " << apv++ <<
" \t " << SiStripApvGain_->
getApvGain(it,range) << std::endl;
61 fprintf(pFile,
"%i ",detid[
id]);
62 for(
int it=0;it<range.second-range.first;it++){
63 fprintf(pFile,
"%f ", SiStripApvGain_->
getApvGain(it,range) );
64 }fprintf(pFile,
"\n");
69 if(pFile)fclose(pFile);
T * make(const Args &...args) const
make new ROOT object
static float getApvGain(const uint16_t &apv, const SiStripApvGain::Range &range)
std::pair< ContainerIterator, ContainerIterator > Range
std::string formatedOutput_
void getDetIds(std::vector< uint32_t > &DetIds_) const
ATTENTION: we assume the detIds are the same as those from the first gain.
edm::Service< TFileService > fs_
~SiStripApvGainReader() override
void analyze(const edm::Event &, const edm::EventSetup &) override
SiStripApvGainReader(const edm::ParameterSet &)
const SiStripApvGain::Range getRange(uint32_t detID) const