10 using namespace sistrip;
26 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
27 <<
" Constructing object...";
31 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
32 <<
" Set FED zero suppression high/low threshold to "
38 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
47 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
48 <<
" Destructing object...";
55 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]";
59 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
60 <<
" NULL pointer to SiStripConfigDb interface!"
61 <<
" Aborting upload...";
70 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
71 <<
" Uploading pedestals/noise to DB...";
74 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
75 <<
" Completed database upload of " << feds.size()
76 <<
" FED descriptions!";
79 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
80 <<
" TEST! No pedestals/noise values will be uploaded to DB...";
91 SiStripConfigDb::FedDescriptionsV::const_iterator ifed;
92 for ( ifed = feds.begin(); ifed != feds.end(); ifed++ ) {
116 Analyses::const_iterator
iter =
data().find( fec_key.key() );
117 if ( iter !=
data().end() ) {
122 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
123 <<
" NULL pointer to analysis object!";
128 uint32_t pedshift = 127;
130 uint32_t pedmin = (uint32_t) anal->
pedsMin()[iapv];
131 pedshift = pedmin < pedshift ? pedmin : pedshift;
136 for ( uint16_t istr = 0; istr < anal->
peds()[iapv].size(); istr++ ) {
139 Fed9U::Fed9UAddress addr( ichan, iapv, istr );
140 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip( addr );
141 if(temp.getDisable()) {
148 <<
" "<<iapv*128+istr<<std::endl;
151 bool disableStrip =
false;
153 disableStrip = temp.getDisable();
157 if (
find( dead.begin(), dead.end(), istr ) != dead.end() ) {
165 <<
" "<<iapv*128+istr<<std::endl;
168 if (
find( noisy.begin(), noisy.end(), istr ) != noisy.end() ) {
176 <<
" "<<iapv*128+istr<<std::endl;
180 disableStrip = temp.getDisable();
183 if (
find( dead.begin(), dead.end(), istr ) != dead.end() ) {
191 <<
" "<<iapv*128+istr<<std::endl;
194 if (
find( noisy.begin(), noisy.end(), istr ) != noisy.end() ) {
202 <<
" "<<iapv*128+istr<<std::endl;
206 Fed9U::Fed9UStripDescription
data( static_cast<uint32_t>( anal->
peds()[iapv][istr]-pedshift ),
209 anal->
noise()[iapv][istr],
212 std::stringstream
ss;
214 ss <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
215 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
216 <<
" for FED id/channel and APV/strip : "
217 << fed_key.
fedId() <<
"/"
221 <<
" and crate/FEC/ring/CCU/module : "
222 << fec_key.fecCrate() <<
"/"
223 << fec_key.fecSlot() <<
"/"
224 << fec_key.fecRing() <<
"/"
225 << fec_key.ccuAddr() <<
"/"
226 << fec_key.ccuChan() << std::endl
227 <<
" from ped/noise/high/low/disable : "
228 <<
static_cast<uint16_t
>( temp.getPedestal() ) <<
"/"
229 << static_cast<uint16_t>( temp.getHighThreshold() ) <<
"/"
230 << static_cast<uint16_t>( temp.getLowThreshold() ) <<
"/"
231 << static_cast<uint16_t>( temp.getNoise() ) <<
"/"
232 << static_cast<uint16_t>( temp.getDisable() ) << std::endl;
234 (*ifed)->getFedStrips().setStrip( addr,
data );
236 ss <<
" to ped/noise/high/low/disable : "
237 <<
static_cast<uint16_t
>(
data.getPedestal() ) <<
"/"
238 << static_cast<uint16_t>(
data.getHighThreshold() ) <<
"/"
239 << static_cast<uint16_t>(
data.getLowThreshold() ) <<
"/"
240 << static_cast<uint16_t>(
data.getNoise() ) <<
"/"
241 << static_cast<uint16_t>(
data.getDisable() ) << std::endl;
252 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
253 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: "
254 << hex << setw(8) << setfill(
'0') << fed_key.
key() << dec <<
"/"
255 << (*ifed)->getFedId() <<
"/"
257 <<
" and device with FEC/slot/ring/CCU/LLD "
258 << fec_key.fecCrate() <<
"/"
259 << fec_key.fecSlot() <<
"/"
260 << fec_key.fecRing() <<
"/"
261 << fec_key.ccuAddr() <<
"/"
262 << fec_key.ccuChan() <<
"/"
263 << fec_key.channel();
270 <<
"[PedsFullNoiseHistosUsingDb::" << __func__ <<
"]"
271 <<
" Updated FED pedestals/noise for "
272 << updated <<
" channels";
281 if ( !anal ) {
return; }
286 for ( uint16_t iapv = 0; iapv < 2; ++iapv ) {
289 PedestalsAnalysisDescription*
tmp;
290 tmp =
new PedestalsAnalysisDescription(
322 typedef std::vector<std::string>
Strings;
324 Strings::const_iterator istr = errors.begin();
325 Strings::const_iterator jstr = errors.end();
326 for ( ; istr != jstr; ++istr ) { tmp->addComments( *istr ); }
329 desc.push_back( tmp );
const uint16_t & fecSlot() const
T getParameter(std::string const &) const
const VFloat & rawMean() const
const uint16_t & fecCrate() const
void update(SiStripConfigDb::FedDescriptionsRange)
const uint32_t & fedKey() const
Analyses::iterator Analysis
PedsFullNoiseHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const )
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
A container class for generic run and event-related info, information required by the commissioning a...
const uint16_t & fedCh() const
const edm::ParameterSet & pset() const
bool deviceIsPresent(const SiStripFecKey &)
FedDescriptionsRange getFedDescriptions(std::string partition="")
FedDescriptions::range FedDescriptionsRange
static const char mlDqmClient_[]
const VVFloat & peds() const
const VFloat & noiseMax() const
uint16_t lldChannel() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const uint16_t & i2cAddr() const
const uint16_t & fedId() const
virtual ~PedsFullNoiseHistosUsingDb()
Histogram-based analysis for pedestal run.
const uint32_t & key() const
const VVInt & noisy() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
const VFloat & noiseMin() const
const_iterator_range partitions() const
const VFloat & pedsSpread() const
const uint16_t & fecRing() const
Class containning control, module, detector and connection information, at the level of a FED channel...
const VFloat & pedsMax() const
An interface class to the DeviceFactory.
const uint16_t & ccuChan() const
bool doUploadConf() const
const VFloat & pedsMean() const
const VFloat & pedsMin() const
const uint32_t & fecKey() const
const VFloat & rawMin() const
const VFloat & rawSpread() const
uint16_t fedChannel() const
const uint16_t & ccuAddr() const
std::vector< uint16_t > VInt
const VFloat & rawMax() const
const VVFloat & noise() const
const uint16_t & feUnit() const
const SiStripDbParams & dbParams() const
void uploadFedDescriptions(std::string partition="")
static const uint16_t invalid_
std::vector< std::vector< double > > tmp
static const uint16_t FEDCH_PER_FED
std::vector< AnalysisDescription * > AnalysisDescriptionsV
const uint16_t & feChan() const
const uint16_t & fedId() const
SiStripConfigDb *const db() const
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis)
const VFloat & noiseSpread() const
SiStripFedCabling *const cabling() const
const VString & getErrorCodes() const
const VVInt & dead() const
const VFloat & noiseMean() const
static const uint16_t APVS_PER_FEDCH
virtual void uploadConfigurations()