25 for( ApvAnalysis::PedestalType::const_iterator pedsIter = rPEDS.begin();
26 pedsIter != rPEDS.end();
29 rOut <<
' ' << *pedsIter;
45 <<
"[NoiseTask::" << __func__ <<
"]" 46 <<
" Constructing object...";
54 <<
"[NoiseTask::" << __func__ <<
"]" 55 <<
" Destructing object...";
69 static std::auto_ptr<SiStripPedestals> pDBPedestals;
70 static std::auto_ptr<SiStripNoises> pDBNoises;
72 const uint16_t nBINS = 256;
91 oHSet.
histo(
dqm()->bookProfile( title, title,
92 nBINS, -0.5, nBINS * 1. - 0.5,
95 peds_.push_back( oHSet);
115 oHSet.
histo(
dqm()->bookProfile( title, title,
116 nBINS, -0.5, nBINS * 1. - 0.5,
119 peds_.push_back( oHSet);
122 const uint16_t nCM_BINS = 1024;
123 for( uint16_t nApv = 0; 2 > nApv; ++nApv)
139 oHSet.
histo(
dqm()->book1D( title, title,
141 nCM_BINS/2 * -1. - 0.5,
142 nCM_BINS/2 * 1. - 0.5 ) );
144 cm_.push_back( oHSet);
152 if( !pDBPedestals.get()) {
154 <<
"[NoiseTask::" << __func__ <<
"] " 155 <<
"Retrieving Pedestals from DB";
165 <<
"[NoiseTask::" << __func__ <<
"] " 166 <<
"Done Retrieving Pedestals from DB";
171 if( !pDBNoises.get()) {
173 <<
"[NoiseTask::" << __func__ <<
"] " 174 <<
"Retrieving Noises from DB";
184 <<
"[NoiseTask::" << __func__ <<
"] " 185 <<
"Done Retrieving Noises from DB";
194 pDBPedestals->getRange(
connection().detId() ) );
196 pDBNoises->getRange(
connection().detId() ) );
201 for( uint16_t nLclApv = 0; 2 > nLclApv; ++nLclApv) {
205 for( uint16_t nStrip = nAPV_PAIR * 256 + nLclApv * 128,
206 nMaxStrip = nStrip + 128;
210 pedestals.push_back( pDBPedestals->getPed( nStrip, pedestalsRange));
211 noises.push_back( pDBNoises->getNoise( nStrip, noisesRange));
217 apvAnalysisVector.at( nAPV_PAIR * 2 + nLclApv);
219 rApvAnalysis->pedestalCalculator().setPedestals( pedestals);
220 rApvAnalysis->pedestalCalculator().setNoise( noises);
232 }
catch( std::out_of_range) {
235 <<
"[NoiseTask::" << __func__ <<
"] " 236 <<
"Could not set Pedestals/Noises for DetId|Apv# -> " 238 <<
". !!! POSSIBLE BUG !!!";
263 nMaxLclApv = nLclApv + 2,
265 nMaxLclApv > nLclApv;
276 const uint16_t nSTART_BIN = 128 * ( nLclApv % 2);
278 for( uint16_t nBin = 0,
279 nAbsBin = nSTART_BIN + nBin + 1;
284 lclPedestals[nBin], lclNoises[nBin]);
292 for( ApvAnalysis::PedestalType::const_iterator cmIterator
293 = lclCommonMode.begin();
294 cmIterator != lclCommonMode.end();
300 float nCM =
static_cast<float>( *cmIterator );
304 std::stringstream
out;
306 <<
"[NoiseTask::" << __func__ <<
"] " 308 <<
"] has Common Mode size " << lclCommonMode.size() <<
" : " 309 << ( 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
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< HistoSet > peds_
int extract(std::vector< int > *output, const std::string &dati)
DQMStore *const dqm() const
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
std::vector< ApvAnalysis * > ApvAnalysisVector