|
|
Go to the documentation of this file.
52 std::vector<int> listDefaults;
53 listDefaults.push_back(-1);
55 bool fedIsGiven =
false;
57 std::vector<std::string> ebDefaults;
58 ebDefaults.push_back(
"none");
62 edm::LogInfo(
"EcalDigiDisplay") <<
"FED id is given! Goining to beginRun! ";
76 for (
int i = 601;
i < 655; ++
i) {
88 std::vector<int>::iterator fedIter;
89 std::vector<int>::iterator intIter;
94 if ((*fedIter) < 601 || (*fedIter) > 655) {
95 edm::LogError(
"EcalDigiDisplay") <<
" FED value: " << (*fedIter) <<
" found in requetsedFeds. "
96 <<
" Valid range is 601-654. Returning.";
102 bool barrelSM =
false;
105 if ((*fedIter) > 609 && (*fedIter) < 646 &&
inputIsOk)
113 if (((*intIter) < 1) || (1700 < (*intIter))) {
114 edm::LogError(
"EcalDigiDisplay") <<
" ic value: " << (*intIter) <<
" found in listChannels. "
115 <<
" Valid range is 1-1700. Returning.";
124 if (((*intIter) < 1) || (70 < (*intIter))) {
125 edm::LogError(
"EcalDigiDisplay") <<
" TT value: " << (*intIter) <<
" found in listTowers. "
126 <<
" Valid range for EB SM is 1-70. Returning.";
136 if ((*intIter) > 34) {
137 edm::LogError(
"EcalDigiDisplay") <<
" TT value: " << (*intIter) <<
" found in listTowers. "
138 <<
" Valid range for EE DCC is 1-34. Returning.";
157 for (intIter =
listPns.begin(); intIter !=
listPns.end(); intIter++) {
158 if (((*intIter) < 1) || (10 < (*intIter))) {
159 edm::LogError(
"EcalDigiDisplay") <<
" Pn number : " << (*intIter) <<
" found in listPns. "
160 <<
" Valid range is 1-10. Returning.";
176 edm::LogInfo(
"EcalDigiDisplay") <<
"entering beginRun! ";
195 edm::LogError(
"EcalDigiUnpackerModule") <<
"Can't get DCC Headers!";
199 bool ebDigisFound =
false;
200 bool eeDigisFound =
false;
201 bool pnDigisFound =
false;
206 if (!eb_digis->
empty())
209 edm::LogError(
"EcalDigiUnpackerModule") <<
"EB Digis were not found!";
216 if (!ee_digis->
empty())
219 edm::LogError(
"EcalDigiUnpackerModule") <<
"EE Digis were not found!";
226 if (!pn_digis->
empty())
229 edm::LogError(
"EcalDigiUnpackerModule") <<
"PNs were not found!";
240 if (!(ebDigisFound || eeDigisFound)) {
241 edm::LogWarning(
"EcalDigiUnpackerModule") <<
"No Digis were found! Returning..";
260 int FEDid = elecId.
dccId() + 600;
265 int ic =
EBDetId((*digiItr).id()).ic();
270 edm::LogInfo(
"EcalDigiDisplay") <<
"\n\n^^^^^^^^^^^^^^^^^^ [EcalDigiDisplay] digi cry collection size "
277 }
else if (
Mode == 2) {
278 std::vector<int>::iterator icIterCh;
279 std::vector<int>::iterator icIterTt;
284 edm::LogInfo(
"EcalDigiDisplay") <<
"\n\n^^^^^^^^^^^^^^^^^^ [EcalDigiDisplay] digi cry collection size "
287 edm::LogInfo(
"EcalDigiDisplay") <<
"[EcalDigiDisplay] parameter mode set to: " <<
Mode
288 <<
". Only mode 1 and 2 are allowed. Returning...";
292 std::cout <<
"FEDID: " << FEDid << std::endl;
297 for (
unsigned int i = 0;
i < (*digiItr).size(); ++
i) {
311 std::cout <<
"For Endcap mode needs to be set to 2" << std::endl;
320 int FEDid = elecId.
dccId() + 600;
325 edm::LogInfo(
"EcalDigiDisplay") <<
"\n\n^^^^^^^^^^^^^^^^^^ [EcalDigiDisplay] digi cry collection size "
328 int crystalId = 10000 * FEDid + 100 * elecId.towerId() + 5 * (elecId.stripId() - 1) + elecId.xtalId();
329 int chId = elecId.towerId();
331 std::vector<int>::iterator icIterCh;
332 std::vector<int>::iterator icIterTt;
338 std::cout <<
"FEDID: " << FEDid << std::endl;
339 std::cout <<
"Tower: " << elecId.towerId() <<
"crystalId: " << crystalId
340 <<
" i-x: " <<
EEDetId((*digiItr).id()).ix() <<
" j-y: " <<
EEDetId((*digiItr).id()).iy() << std::endl;
343 for (
unsigned int i = 0;
i < (*digiItr).size(); ++
i) {
354 int pnDigiCounter = 0;
360 int FEDid = pnDetId.
iDCCId() + 600;
364 int pnNum = (*pnItr).id().iPnId();
367 edm::LogInfo(
"EcalDigiDisplay") <<
"\n\n^^^^^^^^^^^^^^^^^^ EcalDigiDisplay digi PN collection. Size: "
372 if ((pnDigiCounter++) >=
listPns[0])
374 }
else if (
Mode == 2) {
375 edm::LogInfo(
"EcalDigiDisplay") <<
"\n\n^^^^^^^^^^^^^^^^^^ EcalDigiDisplay digi PN collection. Size: "
379 std::vector<int>::iterator pnIter;
384 edm::LogError(
"EcalDigiDisplay") <<
"[EcalDigiDisplay] parameter mode set to: " <<
Mode
385 <<
". Only mode 1 and 2 are allowed. Returning...";
391 std::cout <<
"\nPN num: " << (*pnItr).id().iPnId();
392 for (
int samId = 0; samId < (*pnItr).size(); samId++) {
395 std::cout <<
"sId: " << (samId + 1) <<
" " << (*pnItr).sample(samId) <<
"\t";
T const * product() const
EcalMGPASample sample(int i) const
std::vector< T >::const_iterator const_iterator
std::vector< std::string > requestedEbs_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
std::string digiProducer_
void analyze(edm::Event const &e, edm::EventSetup const &c) override
void beginRun(edm::Run const &, edm::EventSetup const &c) override
T getUntrackedParameter(std::string const &, T const &) const
int dccId() const
get the DCC (Ecal Local DCC value not global one) id
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
EcalDigiDisplay(const edm::ParameterSet &ps)
std::vector< int > listPns
const EcalElectronicsMapping * ecalElectronicsMap_
std::vector< int > requestedFeds_
const_iterator begin() const
std::vector< int > listChannels
void readPNDigis(edm::Handle< EcalPnDiodeDigiCollection > PNs, int Mode)
EcalElectronicsId getElectronicsId(const DetId &id) const
Get the electronics id for this det id.
std::string ebDigiCollection_
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
int iDCCId() const
get the DCCId
std::string eeDigiCollection_
const_iterator end() const
void readEBDigis(edm::Handle< EBDigiCollection > digis, int Mode)
const_iterator begin() const
The iterator returned can not safely be used across threads.
T getParameter(std::string const &) const
int getFedFromSlice(std::string)
void readEEDigis(edm::Handle< EEDigiCollection > digis, int Mode)
~EcalDigiDisplay() override
std::vector< int > listTowers
const_iterator end() const