7 fp_(iConfig.getUntrackedParameter<
edm::
FileInPath>(
"file",
edm::
FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))),
8 printdebug_(iConfig.getUntrackedParameter<uint32_t>(
"printDebug",1)),
14 edm::LogInfo(
"SiStripSummaryBuilder") <<
"... creating dummy SiStripSummary Data for Run " << run <<
"\n " << std::endl;
23 std::vector<std::string> userDBContent;
24 typedef std::vector<edm::ParameterSet> VParameters;
26 VParameters::iterator ithistoList = histoList.begin();
27 VParameters::iterator ithistoListEnd = histoList.end();
29 for(; ithistoList != ithistoListEnd; ++ithistoList ) {
31 std::vector<std::string> Quantities = ithistoList->getUntrackedParameter<std::vector<std::string> >(
"quantitiesToExtract");
32 for (
size_t i=0;
i<Quantities.size();++
i){
34 if ( Quantities[
i] ==
"landau" ){
40 else if ( Quantities[
i] ==
"gauss" ){
45 else if ( Quantities[
i] ==
"stat" ){
52 <<
"Quantity " << Quantities[
i]
53 <<
" cannot be handled\nAllowed quantities are" 54 <<
"\n 'stat' that includes: entries, mean, rms" 55 <<
"\n 'landau' that includes: landauPeak, landauPeakErr, landauSFWHM, landauChi2NDF" 56 <<
"\n 'gauss' that includes: gaussMean, gaussSigma, gaussChi2NDF" 63 std::stringstream ss1;
64 ss1 <<
"QUANTITIES TO BE INSERTED IN DB :" <<
" \n";
66 for (
size_t i=0;
i<userDBContentA.size();++
i) ss1 << userDBContentA[
i]<< std::endl;
73 std::stringstream ss2;
74 for (uint32_t detid=0; detid<430; detid++)
78 for (
unsigned int i=0;
i<userDBContent.size();
i++) values.push_back((
float) CLHEP::RandGauss::shoot(50.,30.));
80 ss2<<
"\n\tdetid " << detid;
81 for(
size_t j=0;j<values.size();++j) ss2 <<
"\n\t\t "<< userDBContent[j] <<
" "<< values[j];
83 obj->
put(detid,values,userDBContent);
87 if (detid == 4) detid = 10;
88 if (detid == 14) detid = 20;
89 if (detid == 26) detid = 30;
90 if (detid == 32) detid = 40;
91 if (detid == 42) detid = 310;
92 if (detid == 313) detid = 320;
93 if (detid == 323) detid = 410;
94 if (detid == 419) detid = 420;
113 edm::LogError(
"SiStripSummaryBuilder")<<
"Service is unavailable"<<std::endl;
T getParameter(std::string const &) const
void setRunNr(int inputRunNr)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
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
SiStripSummaryBuilder(const edm::ParameterSet &iConfig)
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)