23 for (ApvAnalysis::PedestalType::const_iterator pedsIter = rPEDS.begin(); pedsIter != rPEDS.end(); ++pedsIter) {
24 rOut <<
' ' << *pedsIter;
41 <<
" Constructing object...";
48 <<
" Destructing object...";
63 static std::unique_ptr<SiStripPedestals> pDBPedestals;
64 static std::unique_ptr<SiStripNoises> pDBNoises;
66 const uint16_t nBINS = 256;
86 oHSet.
histo(
dqm()->bookProfile(
title,
title, nBINS, -0.5, nBINS * 1. - 0.5, 1025, 0., 1025.));
88 peds_.push_back(oHSet);
109 oHSet.
histo(
dqm()->bookProfile(
title,
title, nBINS, -0.5, nBINS * 1. - 0.5, 1025, 0., 1025.));
111 peds_.push_back(oHSet);
114 const uint16_t nCM_BINS = 1024;
115 for (uint16_t nApv = 0; 2 > nApv; ++nApv) {
131 oHSet.
histo(
dqm()->book1D(
title,
title, nCM_BINS, nCM_BINS / 2 * -1. - 0.5, nCM_BINS / 2 * 1. - 0.5));
133 cm_.push_back(oHSet);
141 if (!pDBPedestals.get()) {
143 <<
"Retrieving Pedestals from DB";
149 <<
"Done Retrieving Pedestals from DB";
154 if (!pDBNoises.get()) {
156 <<
"Retrieving Noises from DB";
162 <<
"Done Retrieving Noises from DB";
174 for (uint16_t nLclApv = 0; 2 > nLclApv; ++nLclApv) {
178 for (uint16_t nStrip = nAPV_PAIR * 256 + nLclApv * 128, nMaxStrip = nStrip + 128; nMaxStrip > nStrip; ++nStrip) {
179 pedestals.push_back(pDBPedestals->getPed(nStrip, pedestalsRange));
180 noises.push_back(pDBNoises->getNoise(nStrip, noisesRange));
187 rApvAnalysis->pedestalCalculator().setPedestals(pedestals);
188 rApvAnalysis->pedestalCalculator().setNoise(
noises);
200 }
catch (std::out_of_range
const &) {
203 <<
"Could not set Pedestals/Noises for DetId|Apv# -> " <<
connection().
detId() <<
'|' 204 << (nAPV_PAIR * 2 + nLclApv) <<
". !!! POSSIBLE BUG !!!";
223 for (uint16_t nLclApv = 2 *
connection().
apvPairNumber(), nMaxLclApv = nLclApv + 2, nApv = 0; nMaxLclApv > nLclApv;
232 const uint16_t nSTART_BIN = 128 * (nLclApv % 2);
234 for (uint16_t
nBin = 0, nAbsBin = nSTART_BIN +
nBin + 1; 128 >
nBin; ++
nBin, ++nAbsBin) {
242 for (ApvAnalysis::PedestalType::const_iterator cmIterator = lclCommonMode.begin();
243 cmIterator != lclCommonMode.end();
248 float nCM =
static_cast<float>(*cmIterator);
252 std::stringstream
out;
254 <<
"DET ID [" <<
connection().
detId() <<
"] has Common Mode size " << lclCommonMode.size()
255 <<
" : " << (
out << lclCommonMode,
out.str());
std::vector< float > vNumOfEntries_
std::vector< float > PedestalType
Utility class that holds histogram title.
void getPedestal(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &peds)
void getNoise(uint32_t det_id, int apvNumber, ApvAnalysis::PedestalType &noise)
static const char mlDqmSource_[]
edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > pedestalToken_
std::vector< float > vSumOfContents_
ApvAnalysisFactory * pApvFactory_
std::pair< ContainerIterator, ContainerIterator > Range
std::ostream & operator<<(std::ostream &os, const FEDBufferFormat &value)
void updateHistoSet(HistoSet &, const uint32_t &bin, const float &value)
void updatePair(uint32_t det_id, size_t apvPair, const edm::DetSet< SiStripRawDigi > &in)
const edm::EventSetup *const eventSetup() const
Class containning control, module, detector and connection information, at the level of a FED channel...
bool instantiateApvs(uint32_t det_id, int numberOfApvs)
std::vector< HistoSet > cm_
static void setBinContent(TProfile *const profile, const uint32_t &bin, const double &entries, const double &mean, const double &spread)
bool getData(T &iHolder) const
void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
const uint32_t & fedKey() const
void getCommonMode(uint32_t det_id, ApvAnalysis::PedestalType &tmp)
std::vector< ApvAnalysis * > ApvAnalysisVector
const uint32_t & detId() const
DQMStore *const dqm() const
std::vector< HistoSet > peds_
int extract(std::vector< int > *output, const std::string &dati)
edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noiseToken_
uint16_t apvPairNumber() const
ApvAnalysisVector getApvAnalysis(const uint32_t nDET_ID)
NoiseTask(DQMStore *, const FedChannelConnection &, edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > pedestalToken, edm::ESGetToken< SiStripNoises, SiStripNoisesRcd > noiseToken)
void histo(MonitorElement *)
std::vector< double > vSumOfSquares_
const std::string & title() const
const FedChannelConnection & connection() const
std::pair< ContainerIterator, ContainerIterator > Range