23 for (ApvAnalysis::PedestalType::const_iterator pedsIter = rPEDS.begin(); pedsIter != rPEDS.end(); ++pedsIter) {
24 rOut <<
' ' << *pedsIter;
37 <<
" Constructing object...";
44 <<
" Destructing object...";
59 static std::unique_ptr<SiStripPedestals> pDBPedestals;
60 static std::unique_ptr<SiStripNoises> pDBNoises;
62 const uint16_t nBINS = 256;
82 oHSet.
histo(
dqm()->bookProfile(title, title, nBINS, -0.5, nBINS * 1. - 0.5, 1025, 0., 1025.));
84 peds_.push_back(oHSet);
105 oHSet.
histo(
dqm()->bookProfile(title, title, nBINS, -0.5, nBINS * 1. - 0.5, 1025, 0., 1025.));
107 peds_.push_back(oHSet);
110 const uint16_t nCM_BINS = 1024;
111 for (uint16_t nApv = 0; 2 > nApv; ++nApv) {
127 oHSet.
histo(
dqm()->book1D(title, title, nCM_BINS, nCM_BINS / 2 * -1. - 0.5, nCM_BINS / 2 * 1. - 0.5));
129 cm_.push_back(oHSet);
137 if (!pDBPedestals.get()) {
139 <<
"Retrieving Pedestals from DB";
149 <<
"Done Retrieving Pedestals from DB";
154 if (!pDBNoises.get()) {
156 <<
"Retrieving Noises from DB";
166 <<
"Done Retrieving Noises from DB";
178 for (uint16_t nLclApv = 0; 2 > nLclApv; ++nLclApv) {
182 for (uint16_t nStrip = nAPV_PAIR * 256 + nLclApv * 128, nMaxStrip = nStrip + 128; nMaxStrip > nStrip; ++nStrip) {
183 pedestals.push_back(pDBPedestals->getPed(nStrip, pedestalsRange));
184 noises.push_back(pDBNoises->getNoise(nStrip, noisesRange));
191 rApvAnalysis->pedestalCalculator().setPedestals(pedestals);
192 rApvAnalysis->pedestalCalculator().setNoise(noises);
204 }
catch (std::out_of_range
const &) {
207 <<
"Could not set Pedestals/Noises for DetId|Apv# -> " <<
connection().
detId() <<
'|' 208 << (nAPV_PAIR * 2 + nLclApv) <<
". !!! POSSIBLE BUG !!!";
227 for (uint16_t nLclApv = 2 *
connection().
apvPairNumber(), nMaxLclApv = nLclApv + 2, nApv = 0; nMaxLclApv > nLclApv;
236 const uint16_t nSTART_BIN = 128 * (nLclApv % 2);
238 for (uint16_t
nBin = 0, nAbsBin = nSTART_BIN +
nBin + 1; 128 >
nBin; ++
nBin, ++nAbsBin) {
239 updateTProfile.
setBinContent(pedsProf, nAbsBin, 5, lclPedestals[
nBin], lclNoises[nBin]);
240 updateTProfile.
setBinContent(noiseProf, nAbsBin, 5, lclNoises[nBin], 0);
246 for (ApvAnalysis::PedestalType::const_iterator cmIterator = lclCommonMode.begin();
247 cmIterator != lclCommonMode.end();
252 float nCM =
static_cast<float>(*cmIterator);
256 std::stringstream
out;
258 <<
"DET ID [" <<
connection().
detId() <<
"] has Common Mode size " << lclCommonMode.size()
259 <<
" : " << (out << lclCommonMode, out.str());
NoiseTask(DQMStore *, const FedChannelConnection &)
std::vector< float > vNumOfEntries_
std::vector< float > PedestalType
Utility class that holds histogram title.
const std::string & title() const
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_[]
uint16_t apvPairNumber() const
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 uint32_t & detId() const
DQMStore *const dqm() 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)
void fill(const SiStripEventSummary &, const edm::DetSet< SiStripRawDigi > &) override
void getCommonMode(uint32_t det_id, ApvAnalysis::PedestalType &tmp)
std::vector< ApvAnalysis * > ApvAnalysisVector
std::vector< HistoSet > peds_
int extract(std::vector< int > *output, const std::string &dati)
ApvAnalysisVector getApvAnalysis(const uint32_t nDET_ID)
void histo(MonitorElement *)
const edm::EventSetup *const eventSetup() const
const uint32_t & fedKey() const
std::vector< double > vSumOfSquares_
const FedChannelConnection & connection() const
std::pair< ContainerIterator, ContainerIterator > Range