10 using namespace sistrip;
35 <<
"[CalibrationHistosUsingDb::" << __func__ <<
"]"
36 <<
" Constructing object...";
39 for(SiStripConfigDb::DeviceDescriptionsV::const_iterator apv = apvDescriptions.begin();apv!=apvDescriptions.end();++apv) {
40 apvDescription* desc =
dynamic_cast<apvDescription*
>( *apv );
41 if ( !desc ) {
continue; }
44 std::stringstream
bin;
45 bin << std::setw(1) << std::setfill(
'0') << addr.
fecCrate_;
46 bin <<
"." << std::setw(2) << std::setfill(
'0') << addr.
fecSlot_;
47 bin <<
"." << std::setw(1) << std::setfill(
'0') << addr.
fecRing_;
48 bin <<
"." << std::setw(3) << std::setfill(
'0') << addr.
ccuAddr_;
49 bin <<
"." << std::setw(2) << std::setfill(
'0') << addr.
ccuChan_;
50 bin <<
"." << desc->getAddress();
53 <<
static_cast<uint16_t
>(desc->getIsha()) <<
" " << static_cast<uint16_t>(desc->getVfs());
58 ishaPath +=
"/ControlView/isha";
62 vfsPath +=
"/ControlView/vfs";
72 <<
"[CalibrationHistosUsingDb::" << __func__ <<
"]"
73 <<
" Destructing object...";
87 <<
"[CalibrationHistosUsingDb::" << __func__ <<
"]"
88 <<
" NULL pointer to SiStripConfigDb interface!"
89 <<
" Aborting upload...";
98 <<
"[CalibrationHistosUsingDb::" << __func__ <<
"]"
99 <<
" Uploading ISHA/VFS settings to DB...";
102 <<
"[CalibrationHistosUsingDb::" << __func__ <<
"]"
103 <<
" Uploaded ISHA/VFS settings to DB!";
106 <<
"[CalibrationHistosUsingDb::" << __func__ <<
"]"
107 <<
" TEST only! No ISHA/VFS settings will be uploaded to DB...";
111 <<
"[CalibrationHistosUsingDb::" << __func__ <<
"]"
112 <<
" Upload of ISHA/VFS settings to DB finished!";
123 SiStripConfigDb::DeviceDescriptionsV::const_iterator idevice;
124 for ( idevice = devices.begin(); idevice != devices.end(); idevice++ ) {
127 if ( (*idevice)->getDeviceType() != APV25 ) {
continue; }
130 apvDescription* desc =
dynamic_cast<apvDescription*
>( *idevice );
131 if ( !desc ) {
continue; }
137 std::stringstream
bin;
138 bin << std::setw(1) << std::setfill(
'0') << addr.
fecCrate_;
139 bin <<
"." << std::setw(2) << std::setfill(
'0') << addr.
fecSlot_;
140 bin <<
"." << std::setw(1) << std::setfill(
'0') << addr.
fecRing_;
141 bin <<
"." << std::setw(3) << std::setfill(
'0') << addr.
ccuAddr_;
142 bin <<
"." << std::setw(2) << std::setfill(
'0') << addr.
ccuChan_;
143 bin <<
"." << desc->getAddress();
148 if(label == bin.str()) {
155 if(label == bin.str()) {
171 if ( !anal ) {
return; }
176 std::ofstream
ofile(
"calibrationResults.txt",ios_base::app);
177 for ( uint16_t iapv = 0; iapv < 2; ++iapv ) {
180 CalibrationAnalysisDescription *
tmp;
181 tmp =
new CalibrationAnalysisDescription(anal->
amplitudeMean()[iapv],
214 <<
" " << fec_key.fecCrate()
215 <<
" " << fec_key.fecSlot()
216 <<
" " << fec_key.fecRing()
217 <<
" " << fec_key.ccuAddr()
218 <<
" " << fec_key.ccuChan()
222 <<
" " << fed_key.fedId()
223 <<
" " << fed_key.feUnit()
224 <<
" " << fed_key.feChan()
225 <<
" " << fed_key.fedApv()
228 <<
" " <<
vfs_ << std::endl;
231 typedef std::vector<std::string>
Strings;
233 Strings::const_iterator istr = errors.begin();
234 Strings::const_iterator jstr = errors.end();
235 for ( ; istr != jstr; ++istr ) { tmp->addComments( *istr ); }
238 desc.push_back( tmp );
const VFloat & smearingMean() const
virtual void uploadConfigurations()
const uint32_t & fedKey() const
Analyses::iterator Analysis
const VFloat & amplitudeMean() const
A container class for generic run and event-related info, information required by the commissioning a...
const VFloat & timeConstantMean() const
virtual bool isValid() const
static const char mlDqmClient_[]
const VFloat & riseTimeMean() const
const uint16_t & i2cAddr() const
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
const_iterator_range partitions() const
Analysis for calibration runs.
DeviceDescriptions::range DeviceDescriptionsRange
void create(SiStripConfigDb::AnalysisDescriptionsV &, Analysis)
An interface class to the DeviceFactory.
bool doUploadConf() const
const uint32_t & fecKey() const
DeviceAddress deviceAddress(const deviceDescription &)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
const VFloat & chi2Mean() const
int extract(std::vector< int > *output, const std::string &dati)
const SiStripDbParams & dbParams() const
std::vector< std::vector< double > > tmp
CalibrationHistosUsingDb(const edm::ParameterSet &pset, DQMStore *, SiStripConfigDb *const, const sistrip::RunType &task=sistrip::CALIBRATION)
std::vector< AnalysisDescription * > AnalysisDescriptionsV
static const char root_[]
void update(SiStripConfigDb::DeviceDescriptionsRange &)
const VFloat & tailMean() const
SiStripConfigDb *const db() const
DeviceDescriptionsRange getDeviceDescriptions(std::string partition="")
void uploadDeviceDescriptions(std::string partition="")
std::string getBasePath(const std::string &path)
const VString & getErrorCodes() const
const std::string & pwd(void) const
virtual ~CalibrationHistosUsingDb()