14 edm::LogInfo(
"SiStripSummaryBuilder") <<
"... creating dummy SiStripSummary Data for Run " << run <<
"\n " 22 std::vector<std::string> userDBContent;
23 typedef std::vector<edm::ParameterSet> VParameters;
25 VParameters::iterator ithistoList = histoList.begin();
26 VParameters::iterator ithistoListEnd = histoList.end();
28 for (; ithistoList != ithistoListEnd; ++ithistoList) {
30 std::vector<std::string> Quantities =
31 ithistoList->getUntrackedParameter<std::vector<std::string> >(
"quantitiesToExtract");
32 for (
size_t i = 0;
i < Quantities.size(); ++
i) {
33 if (Quantities[
i] ==
"landau") {
38 }
else if (Quantities[
i] ==
"gauss") {
42 }
else if (Quantities[
i] ==
"stat") {
48 <<
"Quantity " << Quantities[
i] <<
" cannot be handled\nAllowed quantities are" 49 <<
"\n 'stat' that includes: entries, mean, rms" 50 <<
"\n 'landau' that includes: landauPeak, landauPeakErr, landauSFWHM, landauChi2NDF" 51 <<
"\n 'gauss' that includes: gaussMean, gaussSigma, gaussChi2NDF" << std::endl;
57 std::stringstream ss1;
58 ss1 <<
"QUANTITIES TO BE INSERTED IN DB :" 61 for (
size_t i = 0;
i < userDBContentA.size(); ++
i)
62 ss1 << userDBContentA[
i] << std::endl;
67 std::stringstream ss2;
68 for (uint32_t detid = 0; detid < 430; detid++) {
70 for (
unsigned int i = 0;
i < userDBContent.size();
i++)
71 values.push_back((
float)CLHEP::RandGauss::shoot(50., 30.));
73 ss2 <<
"\n\tdetid " << detid;
74 for (
size_t j = 0;
j < values.size(); ++
j)
75 ss2 <<
"\n\t\t " << userDBContent[
j] <<
" " << values[
j];
77 obj->
put(detid, values, userDBContent);
113 edm::LogError(
"SiStripSummaryBuilder") <<
"Service is unavailable" << std::endl;
T getParameter(std::string const &) const
void setRunNr(int inputRunNr)
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
std::vector< float > InputVector
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
bool put(const uint32_t &detID, InputVector &input, std::vector< std::string > &userContent)
std::vector< std::string > getUserDBContent() const
edm::ParameterSet iConfig_
cond::Time_t endOfTime() const
cond::Time_t currentTime() const
void setUserDBContent(const std::vector< std::string > &userDBContent)