46 usesResource(
"PoolDBOutputService");
51 throw cms::Exception(
"Inconsistent Data") <<
" expected input file name is null\n";
61 edm::LogPrint(
"BeamSpotWrite2DB") <<
" please see plugins/BeamSpotWrite2DB.cc for format of text file.";
64 <<
" Content of the file is expected to have this format with the first column as a keyword:";
65 edm::LogInfo(
"BeamSpotWrite2DB") <<
" x\n y\n z\n sigmaZ\n dxdz\n dydz\n beamWidthX\n beamWidthY";
66 for (
int i = 0;
i < 7;
i++) {
67 for (
int j = 0;
j < 7;
j++) {
68 edm::LogInfo(
"BeamSpotWrite2DB") <<
" cov[" <<
i <<
"][" <<
j <<
"] cov[" <<
i <<
"][" <<
j <<
"] cov[" <<
i 69 <<
"][" <<
j <<
"] cov[" <<
i <<
"][" <<
j <<
"] cov[" <<
i <<
"][" <<
j 70 <<
"] cov[" <<
j <<
"][" <<
j <<
"] cov[" <<
i <<
"][" <<
j <<
"]";
75 double x,
y,
z,
sigmaZ,
dxdz,
dydz, beamWidthX, beamWidthY,
emittanceX,
emittanceY, betastar;
89 fasciiFile >>
tag >> cov[0][0] >> cov[0][1] >> cov[0][2] >> cov[0][3] >> cov[0][4] >> cov[0][5] >> cov[0][6];
90 fasciiFile >>
tag >> cov[1][0] >> cov[1][1] >> cov[1][2] >> cov[1][3] >> cov[1][4] >> cov[1][5] >> cov[1][6];
91 fasciiFile >>
tag >> cov[2][0] >> cov[2][1] >> cov[2][2] >> cov[2][3] >> cov[2][4] >> cov[2][5] >> cov[2][6];
92 fasciiFile >>
tag >> cov[3][0] >> cov[3][1] >> cov[3][2] >> cov[3][3] >> cov[3][4] >> cov[3][5] >> cov[3][6];
93 fasciiFile >>
tag >> cov[4][0] >> cov[4][1] >> cov[4][2] >> cov[4][3] >> cov[4][4] >> cov[4][5] >> cov[4][6];
94 fasciiFile >>
tag >> cov[5][0] >> cov[5][1] >> cov[5][2] >> cov[5][3] >> cov[5][4] >> cov[5][5] >> cov[5][6];
95 fasciiFile >>
tag >> cov[6][0] >> cov[6][1] >> cov[6][2] >> cov[6][3] >> cov[6][4] >> cov[6][5] >> cov[6][6];
113 for (
int i = 0;
i < 7; ++
i) {
114 for (
int j = 0;
j < 7; ++
j) {
119 edm::LogPrint(
"BeamSpotWrite2DB") <<
" write results to DB...";
123 edm::LogPrint(
"BeamSpotWrite2DB") <<
"poolDBService available";
132 edm::LogPrint(
"BeamSpotWrite2DB") <<
"[BeamSpotWrite2DB] endJob done \n";
138 "Writes out a DB file containing a BeamSpotObjects payload, according to parameters defined in ASCII file");
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
void setCovariance(int i, int j, double val)
set i,j element of the full covariance matrix 7x7
void setEmittanceY(double val)
set emittance
cond::Time_t beginOfTime() const
std::string fasciiFileName
void setBetaStar(double val)
set beta star
~BeamSpotWrite2DB() override
void setType(int type)
set beam type
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
T getUntrackedParameter(std::string const &, T const &) const
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
void setEmittanceX(double val)
set emittance
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
void setdydz(double val)
set dydz slope, crossing angle in XZ
#define DEFINE_FWK_MODULE(type)
Log< level::Warning, true > LogPrint
void setdxdz(double val)
set dxdz slope, crossing angle
Log< level::Info, false > LogInfo
void setSigmaZ(double val)
set sigma Z, RMS bunch length
static void fillDescriptions(edm::ConfigurationDescriptions &)
void analyze(const edm::Event &, const edm::EventSetup &) override
void setPosition(double x, double y, double z)
set XYZ position
void setBeamWidthX(double val)
set average transverse beam width X
BeamSpotWrite2DB(const edm::ParameterSet &)
void setBeamWidthY(double val)
set average transverse beam width Y