62 std::string container;
69 typedef std::vector< edm::ParameterSet >
Parameters;
71 for(Parameters::iterator
i = toGet.begin();
i != toGet.end(); ++
i) {
72 container =
i->getParameter<std::string>(
"container");
73 record =
i->getParameter<std::string>(
"record");
74 m_cacheIDs.insert( std::make_pair(container, 0) );
75 m_records.insert( std::make_pair(container, record) );
102 std::string container;
104 typedef std::map<std::string, std::string>::const_iterator recordIter;
106 container = (*i).first;
112 if (container ==
"EcalLaserAPDPNRatios") {
127 if(iEta==0)
continue;
133 if (hi<static_cast<int>(laserRatiosMap.
size())) {
134 apdpnpair = laserRatiosMap[hi];
135 std::cout <<
"A sample value of APDPN pair EB : "
136 << hi <<
" : " << apdpnpair.
p1 <<
" , " << apdpnpair.
p2 << std::endl;
138 edm::LogError(
"EcalGetLaserData") <<
"error with laserRatiosMap!" << std::endl;
154 if (hi< static_cast<int>(laserRatiosMap.
size())) {
155 apdpnpair = laserRatiosMap[hi];
156 std::cout <<
"A sample value of APDPN pair EE+ : "
157 << hi <<
" : " << apdpnpair.
p1 <<
" , " << apdpnpair.
p2 << std::endl;
159 edm::LogError(
"EcalGetLaserData") <<
"error with laserRatiosMap!" << std::endl;
167 if (hi< static_cast<int>(laserRatiosMap.
size())) {
168 apdpnpair = laserRatiosMap[hi];
169 std::cout <<
"A sample value of APDPN pair EE- : "
170 << hi <<
" : " << apdpnpair.
p1 <<
" , " << apdpnpair.
p2 << std::endl;
172 edm::LogError(
"EcalGetLaserData") <<
"error with laserRatiosMap!" << std::endl;
177 for(
int i=0;
i<92;
i++){
178 timestamp = laserTimeMap[
i];
179 std::cout <<
"A value of timestamp pair : "
180 <<
i <<
" " << timestamp.
t1.
value() <<
" , " << timestamp.
t2.
value() << std::endl;
183 std::cout <<
".. just retrieved the last valid record from DB "<< std::endl;
185 }
else if(container ==
"EcalLaserAPDPNRatiosRef") {
196 if(iEta==0)
continue;
202 if (hi< static_cast<int>(laserRefMap.
size())) {
203 apdpnref = laserRefMap[hi];
204 std::cout <<
"A sample value of APDPN Reference value EB : "
205 << hi <<
" : " << apdpnref << std::endl;
207 edm::LogError(
"EcalGetLaserData") <<
"error with laserRefMap!" << std::endl;
222 if (hi< static_cast<int>(laserRefMap.
size())) {
223 apdpnref = laserRefMap[hi];
224 std::cout <<
"A sample value of APDPN Reference value EE+ : "
225 << hi <<
" : " << apdpnref << std::endl;
228 edm::LogError(
"EcalGetLaserData") <<
"error with laserRefMap!" << std::endl;
236 if (hi< static_cast<int>(laserRefMap.
size())) {
237 apdpnref = laserRefMap[hi];
238 std::cout <<
"A sample value of APDPN Reference value EE- : "
239 << hi <<
" : " << apdpnref << std::endl;
241 edm::LogError(
"EcalGetLaserData") <<
"error with laserRefMap!" << std::endl;
246 std::cout <<
"... just retrieved the last valid record from DB "<< std::endl;
248 }
else if (container ==
"EcalLaserAlphas") {
260 if(iEta==0)
continue;
266 if (hi< static_cast<int>(laserAlphaMap.
size())) {
267 alpha = laserAlphaMap[hi];
268 std::cout <<
" A sample value of Alpha value EB : " << hi <<
" : " << alpha << std::endl;
270 edm::LogError(
"EcalGetLaserData") <<
"error with laserAlphaMap!" << std::endl;
285 if (hi< static_cast<int>(laserAlphaMap.
size())) {
286 alpha = laserAlphaMap[hi];
287 std::cout <<
" A sample value of Alpha value EE+ : " << hi <<
" : " << alpha << std::endl;
289 edm::LogError(
"EcalGetLaserData") <<
"error with laserAlphaMap!" << std::endl;
298 if (hi< static_cast<int>(laserAlphaMap.
size())) {
299 alpha = laserAlphaMap[hi];
300 std::cout <<
" A sample value of Alpha value EE- : " << hi <<
" : " << alpha << std::endl;
302 edm::LogError(
"EcalGetLaserData") <<
"error with laserAlphaMap!" << std::endl;
307 std::cout <<
"... just retrieved the last valid record from DB "<< std::endl;
310 edm::LogError(
"EcalGetLaserData") <<
"Cannot retrieve for container: "
311 << container << std::endl;
T getParameter(std::string const &) const
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)
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
vector< ParameterSet > Parameters
std::map< std::string, unsigned long long > m_cacheIDs
TimeValue_t value() const
static const int MAX_IPHI
std::vector< EcalLaserTimeStamp > EcalLaserTimeStampMap
T const * product() const
static const int MAX_IETA
virtual void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup)