70 typedef std::vector<edm::ParameterSet>
Parameters;
72 for (
const auto& iparam :
toGet) {
73 container = iparam.getParameter<
std::string>(
"container");
99 if (container ==
"EcalLaserAPDPNRatios") {
117 if (
hi < static_cast<int>(laserRatiosMap.
size())) {
118 apdpnpair = laserRatiosMap[
hi];
119 edm::LogInfo(
"EcalGetLaserData") <<
"A sample value of APDPN pair EB : " <<
hi <<
" : " << apdpnpair.
p1 120 <<
" , " << apdpnpair.
p2 << std::endl;
122 edm::LogError(
"EcalGetLaserData") <<
"error with laserRatiosMap!" << std::endl;
136 if (
hi < static_cast<int>(laserRatiosMap.
size())) {
137 apdpnpair = laserRatiosMap[
hi];
138 edm::LogInfo(
"EcalGetLaserData") <<
"A sample value of APDPN pair EE+ : " <<
hi <<
" : " << apdpnpair.
p1 139 <<
" , " << apdpnpair.
p2 << std::endl;
141 edm::LogError(
"EcalGetLaserData") <<
"error with laserRatiosMap!" << std::endl;
149 if (
hi < static_cast<int>(laserRatiosMap.
size())) {
150 apdpnpair = laserRatiosMap[
hi];
151 edm::LogInfo(
"EcalGetLaserData") <<
"A sample value of APDPN pair EE- : " <<
hi <<
" : " << apdpnpair.
p1 152 <<
" , " << apdpnpair.
p2 << std::endl;
154 edm::LogError(
"EcalGetLaserData") <<
"error with laserRatiosMap!" << std::endl;
159 for (
int i = 0;
i < 92;
i++) {
161 edm::LogInfo(
"EcalGetLaserData") <<
"A value of timestamp pair : " <<
i <<
" " <<
timestamp.t1.value() <<
" , " 165 edm::LogInfo(
"EcalGetLaserData") <<
".. just retrieved the last valid record from DB " << std::endl;
167 }
else if (container ==
"EcalLaserAPDPNRatiosRef") {
180 if (
hi < static_cast<int>(laserRefMap.
size())) {
181 apdpnref = laserRefMap[
hi];
183 <<
"A sample value of APDPN Reference value EB : " <<
hi <<
" : " << apdpnref << std::endl;
185 edm::LogError(
"EcalGetLaserData") <<
"error with laserRefMap!" << std::endl;
199 if (
hi < static_cast<int>(laserRefMap.
size())) {
200 apdpnref = laserRefMap[
hi];
202 <<
"A sample value of APDPN Reference value EE+ : " <<
hi <<
" : " << apdpnref << std::endl;
205 edm::LogError(
"EcalGetLaserData") <<
"error with laserRefMap!" << std::endl;
210 EEDetId eedetidneg(iX, iY, -1);
213 if (
hi < static_cast<int>(laserRefMap.
size())) {
214 apdpnref = laserRefMap[
hi];
216 <<
"A sample value of APDPN Reference value EE- : " <<
hi <<
" : " << apdpnref << std::endl;
218 edm::LogError(
"EcalGetLaserData") <<
"error with laserRefMap!" << std::endl;
223 edm::LogInfo(
"EcalGetLaserData") <<
"... just retrieved the last valid record from DB " << std::endl;
225 }
else if (container ==
"EcalLaserAlphas") {
239 if (
hi < static_cast<int>(laserAlphaMap.
size())) {
242 <<
" A sample value of Alpha value EB : " <<
hi <<
" : " <<
alpha << std::endl;
244 edm::LogError(
"EcalGetLaserData") <<
"error with laserAlphaMap!" << std::endl;
258 if (
hi < static_cast<int>(laserAlphaMap.
size())) {
261 <<
" A sample value of Alpha value EE+ : " <<
hi <<
" : " <<
alpha << std::endl;
263 edm::LogError(
"EcalGetLaserData") <<
"error with laserAlphaMap!" << std::endl;
268 EEDetId eedetidneg(iX, iY, -1);
271 if (
hi < static_cast<int>(laserAlphaMap.
size())) {
274 <<
" A sample value of Alpha value EE- : " <<
hi <<
" : " <<
alpha << std::endl;
276 edm::LogError(
"EcalGetLaserData") <<
"error with laserAlphaMap!" << std::endl;
281 edm::LogInfo(
"EcalGetLaserData") <<
"... just retrieved the last valid record from DB " << std::endl;
284 edm::LogError(
"EcalGetLaserData") <<
"Cannot retrieve for container: " << container << std::endl;
const EcalLaserAPDPNRatiosMap & getLaserMap() const
~EcalGetLaserData() override
T getParameter(std::string const &) const
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
vector< ParameterSet > Parameters
const EcalLaserTimeStampMap & getTimeMap() const
bool getData(T &iHolder) const
std::map< std::string, unsigned long long > m_cacheIDs
Log< level::Info, false > LogInfo
edm::ESGetToken< EcalLaserAlphas, EcalLaserAlphasRcd > ecalLaserAlphasToken_
static const int MAX_IPHI
std::vector< EcalLaserTimeStamp > EcalLaserTimeStampMap
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
static const int MAX_IETA
edm::ESGetToken< EcalLaserAPDPNRatios, EcalLaserAPDPNRatiosRcd > ecalLaserAPDPNRatiosToken_
int hashedIndex() const
get a compact index for arrays
edm::ESGetToken< EcalLaserAPDPNRatiosRef, EcalLaserAPDPNRatiosRefRcd > ecalLaserAPDPNRatiosRefToken_