77 typedef std::vector<edm::ParameterSet>
Parameters;
79 for (
const auto& iparam : toGet) {
80 container = iparam.getParameter<
std::string>(
"container");
81 record = iparam.getParameter<
std::string>(
"record");
106 if (container ==
"EcalLaserAPDPNRatios") {
124 if (hi < static_cast<int>(laserRatiosMap.
size())) {
125 apdpnpair = laserRatiosMap[hi];
126 edm::LogInfo(
"EcalGetLaserData") <<
"A sample value of APDPN pair EB : " << hi <<
" : " << apdpnpair.
p1
127 <<
" , " << apdpnpair.
p2 << std::endl;
129 edm::LogError(
"EcalGetLaserData") <<
"error with laserRatiosMap!" << std::endl;
143 if (hi < static_cast<int>(laserRatiosMap.
size())) {
144 apdpnpair = laserRatiosMap[hi];
145 edm::LogInfo(
"EcalGetLaserData") <<
"A sample value of APDPN pair EE+ : " << hi <<
" : " << apdpnpair.
p1
146 <<
" , " << apdpnpair.
p2 << std::endl;
148 edm::LogError(
"EcalGetLaserData") <<
"error with laserRatiosMap!" << std::endl;
156 if (hi < static_cast<int>(laserRatiosMap.
size())) {
157 apdpnpair = laserRatiosMap[hi];
158 edm::LogInfo(
"EcalGetLaserData") <<
"A sample value of APDPN pair EE- : " << hi <<
" : " << apdpnpair.
p1
159 <<
" , " << apdpnpair.
p2 << std::endl;
161 edm::LogError(
"EcalGetLaserData") <<
"error with laserRatiosMap!" << std::endl;
166 for (
int i = 0;
i < 92;
i++) {
167 timestamp = laserTimeMap[
i];
168 edm::LogInfo(
"EcalGetLaserData") <<
"A value of timestamp pair : " <<
i <<
" " << timestamp.
t1.
value() <<
" , "
169 << timestamp.
t2.
value() << std::endl;
172 edm::LogInfo(
"EcalGetLaserData") <<
".. just retrieved the last valid record from DB " << std::endl;
174 }
else if (container ==
"EcalLaserAPDPNRatiosRef") {
187 if (hi < static_cast<int>(laserRefMap.
size())) {
188 apdpnref = laserRefMap[hi];
190 <<
"A sample value of APDPN Reference value EB : " << hi <<
" : " << apdpnref << std::endl;
192 edm::LogError(
"EcalGetLaserData") <<
"error with laserRefMap!" << std::endl;
206 if (hi < static_cast<int>(laserRefMap.
size())) {
207 apdpnref = laserRefMap[hi];
209 <<
"A sample value of APDPN Reference value EE+ : " << hi <<
" : " << apdpnref << std::endl;
212 edm::LogError(
"EcalGetLaserData") <<
"error with laserRefMap!" << std::endl;
217 EEDetId eedetidneg(iX, iY, -1);
220 if (hi < static_cast<int>(laserRefMap.
size())) {
221 apdpnref = laserRefMap[hi];
223 <<
"A sample value of APDPN Reference value EE- : " << hi <<
" : " << apdpnref << std::endl;
225 edm::LogError(
"EcalGetLaserData") <<
"error with laserRefMap!" << std::endl;
230 edm::LogInfo(
"EcalGetLaserData") <<
"... just retrieved the last valid record from DB " << std::endl;
232 }
else if (container ==
"EcalLaserAlphas") {
246 if (hi < static_cast<int>(laserAlphaMap.
size())) {
247 alpha = laserAlphaMap[hi];
249 <<
" A sample value of Alpha value EB : " << hi <<
" : " << alpha << std::endl;
251 edm::LogError(
"EcalGetLaserData") <<
"error with laserAlphaMap!" << std::endl;
265 if (hi < static_cast<int>(laserAlphaMap.
size())) {
266 alpha = laserAlphaMap[hi];
268 <<
" A sample value of Alpha value EE+ : " << hi <<
" : " << alpha << std::endl;
270 edm::LogError(
"EcalGetLaserData") <<
"error with laserAlphaMap!" << std::endl;
275 EEDetId eedetidneg(iX, iY, -1);
278 if (hi < static_cast<int>(laserAlphaMap.
size())) {
279 alpha = laserAlphaMap[hi];
281 <<
" A sample value of Alpha value EE- : " << hi <<
" : " << alpha << std::endl;
283 edm::LogError(
"EcalGetLaserData") <<
"error with laserAlphaMap!" << std::endl;
288 edm::LogInfo(
"EcalGetLaserData") <<
"... just retrieved the last valid record from DB " << std::endl;
291 edm::LogError(
"EcalGetLaserData") <<
"Cannot retrieve for container: " << container << std::endl;
~EcalGetLaserData() override
int hashedIndex() const
get a compact index for arrays
static const int MIN_IPHI
std::map< std::string, std::string > m_records
EcalGetLaserData(const edm::ParameterSet &iConfig)
Log< level::Error, false > LogError
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
bool getData(T &iHolder) const
const EcalLaserAPDPNRatiosMap & getLaserMap() const
vector< ParameterSet > Parameters
std::map< std::string, unsigned long long > m_cacheIDs
Log< level::Info, false > LogInfo
edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcd > ecalLaserAlphasToken_
static const int MAX_IPHI
const EcalLaserTimeStampMap & getTimeMap() const
std::vector< EcalLaserTimeStamp > EcalLaserTimeStampMap
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
T getParameter(std::string const &) const
static const int MAX_IETA
edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd > ecalLaserAPDPNRatiosToken_
edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd > ecalLaserAPDPNRatiosRefToken_
TimeValue_t value() const