11 using namespace sistrip;
27 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
28 <<
" Constructing object...";
32 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
33 <<
" Set FED zero suppression high/low threshold to "
38 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
47 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
48 <<
" Destructing object...";
55 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]";
59 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
60 <<
" NULL pointer to SiStripConfigDb interface!"
61 <<
" Aborting upload...";
70 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
71 <<
" Uploading pedestals/noise to DB...";
74 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
75 <<
" Completed database upload of " << feds.size()
76 <<
" FED descriptions!";
79 <<
"[PedestalsHistosUsingDb::" << __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++ ) {
115 Analyses::const_iterator iter =
data().find( fec_key.key() );
116 if ( iter !=
data().end() ) {
121 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
122 <<
" NULL pointer to analysis object!";
127 uint32_t pedshift = 127;
129 uint32_t pedmin = (uint32_t) anal->
pedsMin()[iapv];
130 pedshift = pedmin < pedshift ? pedmin : pedshift;
135 for ( uint16_t istr = 0; istr < anal->
peds()[iapv].size(); istr++ ) {
138 Fed9U::Fed9UAddress addr( ichan, iapv, istr );
139 Fed9U::Fed9UStripDescription
temp = (*ifed)->getFedStrips().getStrip( addr );
142 bool disableStrip =
false;
144 disableStrip = temp.getDisable();
147 if (
find( dead.begin(), dead.end(), istr ) != dead.end() ) disableStrip =
true;
149 if (
find( noisy.begin(), noisy.end(), istr ) != noisy.end() ) disableStrip =
true;
152 Fed9U::Fed9UStripDescription
data( static_cast<uint32_t>( anal->
peds()[iapv][istr]-pedshift ),
155 anal->
noise()[iapv][istr],
158 std::stringstream ss;
160 ss <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
161 <<
" Disabling strip in Fed9UStripDescription object..." << std::endl
162 <<
" for FED id/channel and APV/strip : "
163 << fed_key.
fedId() <<
"/"
167 <<
" and crate/FEC/ring/CCU/module : "
168 << fec_key.fecCrate() <<
"/"
169 << fec_key.fecSlot() <<
"/"
170 << fec_key.fecRing() <<
"/"
171 << fec_key.ccuAddr() <<
"/"
172 << fec_key.ccuChan() << std::endl
173 <<
" from ped/noise/high/low/disable : "
174 <<
static_cast<uint16_t
>( temp.getPedestal() ) <<
"/"
175 << static_cast<uint16_t>( temp.getHighThreshold() ) <<
"/"
176 << static_cast<uint16_t>( temp.getLowThreshold() ) <<
"/"
177 << static_cast<uint16_t>( temp.getNoise() ) <<
"/"
178 << static_cast<uint16_t>( temp.getDisable() ) << std::endl;
180 (*ifed)->getFedStrips().setStrip( addr,
data );
182 ss <<
" to ped/noise/high/low/disable : "
183 <<
static_cast<uint16_t
>(
data.getPedestal() ) <<
"/"
184 << static_cast<uint16_t>(
data.getHighThreshold() ) <<
"/"
185 << static_cast<uint16_t>(
data.getLowThreshold() ) <<
"/"
186 << static_cast<uint16_t>(
data.getNoise() ) <<
"/"
187 << static_cast<uint16_t>(
data.getDisable() ) << std::endl;
198 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
199 <<
" Unable to find pedestals/noise for FedKey/Id/Ch: "
200 << hex << setw(8) << setfill(
'0') << fed_key.
key() << dec <<
"/"
201 << (*ifed)->getFedId() <<
"/"
203 <<
" and device with FEC/slot/ring/CCU/LLD "
204 << fec_key.fecCrate() <<
"/"
205 << fec_key.fecSlot() <<
"/"
206 << fec_key.fecRing() <<
"/"
207 << fec_key.ccuAddr() <<
"/"
208 << fec_key.ccuChan() <<
"/"
209 << fec_key.channel();
216 <<
"[PedestalsHistosUsingDb::" << __func__ <<
"]"
217 <<
" Updated FED pedestals/noise for "
218 << updated <<
" channels";
228 if ( !anal ) {
return; }
233 for ( uint16_t iapv = 0; iapv < 2; ++iapv ) {
236 PedestalsAnalysisDescription*
tmp;
237 tmp =
new PedestalsAnalysisDescription(
269 typedef std::vector<std::string>
Strings;
271 Strings::const_iterator istr = errors.begin();
272 Strings::const_iterator jstr = errors.end();
273 for ( ; istr != jstr; ++istr ) { tmp->addComments( *istr ); }
276 desc.push_back( tmp );
const uint16_t & fecSlot() const
T getParameter(std::string const &) const
const VFloat & rawMax() const
void update(SiStripConfigDb::FedDescriptionsRange)
const VFloat & pedsMean() const
const uint16_t & fecCrate() const
const uint32_t & fedKey() const
Analyses::iterator Analysis
PedestalsHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const )
const VVInt & noisy() const
const VVFloat & peds() 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 FedChannelConnection & connection(uint16_t fed_id, uint16_t fed_ch) 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
const uint32_t & key() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
const VFloat & noiseMean() const
const_iterator_range partitions() const
const uint16_t & fecRing() const
const VFloat & pedsMin() const
Class containning control, module, detector and connection information, at the level of a FED channel...
const VVFloat & noise() const
An interface class to the DeviceFactory.
const uint16_t & ccuChan() const
Histogram-based analysis for pedestal run.
bool doUploadConf() const
const uint32_t & fecKey() const
const VVInt & dead() const
uint16_t fedChannel() const
const VFloat & rawMin() const
const uint16_t & ccuAddr() const
const VFloat & rawSpread() const
std::vector< uint16_t > VInt
const VFloat & rawMean() const
const uint16_t & feUnit() const
const SiStripDbParams & dbParams() const
void uploadFedDescriptions(std::string partition="")
static const uint16_t invalid_
const VFloat & pedsSpread() const
const VFloat & pedsMax() const
virtual void uploadConfigurations()
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
const VFloat & noiseSpread() const
SiStripConfigDb *const db() const
const VFloat & noiseMax() const
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis)
SiStripFedCabling *const cabling() const
const VString & getErrorCodes() const
static const uint16_t APVS_PER_FEDCH
virtual ~PedestalsHistosUsingDb()
const VFloat & noiseMin() const