48 <<
"\nInput tag for the initial GT DAQ record: "
50 <<
"\nInput tag for the initial GMT readout collection: "
51 << m_initialMuGmtInputTag <<
" \n"
52 <<
"\nInput tag for the final GT DAQ and GMT records: "
53 << m_finalGtGmtInputTag <<
" \n"
79 std::ostringstream myCoutStream;
85 if (!gtReadoutRecordInitial.
isValid()) {
87 <<
"Initial L1GlobalTriggerReadoutRecord with input tag \n "
98 if (!gtReadoutRecordFinal.
isValid()) {
100 <<
"Final L1GlobalTriggerReadoutRecord with input tag \n "
108 const L1GtfeWord& gtfeWordInitial = gtReadoutRecordInitial->gtfeWord();
109 const L1GtfeWord& gtfeWordFinal = gtReadoutRecordFinal->gtfeWord();
111 if (gtfeWordInitial == gtfeWordFinal) {
112 myCoutStream <<
"\nInitial and final GTFE blocks: identical.\n";
113 gtfeWordInitial.
print(myCoutStream);
115 myCoutStream <<
"\nInitial and final GTFE blocks: different.\n";
117 myCoutStream <<
"\nInitial GTFE block\n";
118 gtfeWordInitial.
print(myCoutStream);
120 myCoutStream <<
"\nFinal GTFE block\n";
121 gtfeWordFinal.
print(myCoutStream);
126 << myCoutStream.str()
130 myCoutStream.str(
"");
131 myCoutStream.clear();
134 const std::vector<L1GtFdlWord>& gtFdlVectorInitial = gtReadoutRecordInitial->gtFdlVector();
135 const std::vector<L1GtFdlWord>& gtFdlVectorFinal = gtReadoutRecordFinal->gtFdlVector();
137 int gtFdlVectorInitialSize = gtFdlVectorInitial.size();
138 int gtFdlVectorFinalSize = gtFdlVectorFinal.size();
140 if (gtFdlVectorInitialSize == gtFdlVectorFinalSize) {
141 myCoutStream <<
"\nInitial and final FDL vector size: identical.\n";
142 myCoutStream <<
" Size: " << gtFdlVectorInitialSize << std::endl;
144 for (
int iFdl = 0; iFdl < gtFdlVectorInitialSize; ++iFdl) {
146 const L1GtFdlWord& fdlWordInitial = gtFdlVectorInitial[iFdl];
147 const L1GtFdlWord& fdlWordFinal = gtFdlVectorFinal[iFdl];
149 if (fdlWordInitial == fdlWordFinal) {
150 myCoutStream <<
"\nInitial and final FDL blocks: identical.\n";
151 fdlWordInitial.
print(myCoutStream);
154 myCoutStream <<
"\nInitial and final FDL blocks: different.\n";
156 myCoutStream <<
"\nInitial FDL block\n";
157 fdlWordInitial.
print(myCoutStream);
159 myCoutStream <<
"\nFinal FDL block\n";
160 fdlWordFinal.
print(myCoutStream);
167 myCoutStream <<
"\nInitial and final FDL vector size: different.\n";
168 myCoutStream <<
" Initial size: " << gtFdlVectorInitialSize << std::endl;
169 myCoutStream <<
" Final size: " << gtFdlVectorFinalSize << std::endl;
173 edm::LogInfo(
"L1GtPackUnpackAnalyzer") << myCoutStream.str() << std::endl;
175 myCoutStream.str(
"");
176 myCoutStream.clear();
180 const std::vector<L1GtPsbWord>& gtPsbVectorInitial = gtReadoutRecordInitial->gtPsbVector();
181 const std::vector<L1GtPsbWord>& gtPsbVectorFinal = gtReadoutRecordFinal->gtPsbVector();
183 int gtPsbVectorInitialSize = gtPsbVectorInitial.size();
184 int gtPsbVectorFinalSize = gtPsbVectorFinal.size();
186 if (gtPsbVectorInitialSize == gtPsbVectorFinalSize) {
187 myCoutStream <<
"\nInitial and final PSB vector size: identical.\n";
188 myCoutStream <<
" Size: " << gtPsbVectorInitialSize << std::endl;
192 for (
int iPsb = 0; iPsb < gtPsbVectorInitialSize; ++iPsb) {
194 const L1GtPsbWord& psbWordInitial = gtPsbVectorInitial[iPsb];
195 const boost::uint16_t boardIdInitial = psbWordInitial.
boardId();
196 const int bxInEventInitial = psbWordInitial.
bxInEvent();
201 bool foundPSB =
false;
203 for (
int iPsbF = 0; iPsbF < gtPsbVectorFinalSize; ++iPsbF) {
205 const L1GtPsbWord& psbWordFinal = gtPsbVectorFinal[iPsbF];
206 const boost::uint16_t boardIdFinal = psbWordFinal.
boardId();
207 const int bxInEventFinal = psbWordFinal.
bxInEvent();
209 if ((boardIdFinal == boardIdInitial) && (bxInEventInitial
210 == bxInEventFinal)) {
215 if (psbWordInitial == psbWordFinal) {
217 <<
"\nInitial and final PSB blocks: identical.\n";
218 psbWordInitial.
print(myCoutStream);
223 <<
"\nInitial and final PSB blocks: different.\n";
225 myCoutStream <<
"\nInitial PSB block\n";
226 psbWordInitial.
print(myCoutStream);
228 myCoutStream <<
"\nFinal PSB block\n";
229 psbWordFinal.
print(myCoutStream);
238 <<
"\nNo final PSB with boardID = " << boardIdInitial
239 <<
" and BxINEvent = " << bxInEventInitial <<
" was found"
240 <<
"\nInitial and final PSB vectors: different";
247 myCoutStream <<
"\nInitial and final PSB vector size: different.\n";
248 myCoutStream <<
" Initial size: " << gtPsbVectorInitialSize << std::endl;
249 myCoutStream <<
" Final size: " << gtPsbVectorFinalSize << std::endl;
253 edm::LogInfo(
"L1GtPackUnpackAnalyzer") << myCoutStream.str() << std::endl;
255 myCoutStream.str(
"");
256 myCoutStream.clear();
264 gtReadoutRecordInitial->muCollectionRefProd();
267 gtReadoutRecordFinal->muCollectionRefProd();
269 if (muCollRefProdInitial == muCollRefProdFinal) {
271 <<
"\nInitial and final RefProd<L1MuGMTReadoutCollection>: identical.\n";
275 <<
"\nInitial and final RefProd<L1MuGMTReadoutCollection>: different.\n";
280 << myCoutStream.str()
283 myCoutStream.str(
"");
284 myCoutStream.clear();
295 std::ostringstream myCoutStream;
303 <<
"Initial L1MuGMTReadoutCollection with input tag \n "
310 std::vector<L1MuGMTReadoutRecord> muRecordsInitial = gmtRcInitial->getRecords();
318 <<
"Final L1MuGMTReadoutCollection with input tag \n "
325 std::vector<L1MuGMTReadoutRecord> muRecordsFinal = gmtRcFinal->getRecords();
327 int muRecordsInitialSize = muRecordsInitial.size();
328 int muRecordsFinalSize = muRecordsFinal.size();
330 if (muRecordsInitialSize == muRecordsFinalSize) {
332 <<
"\nInitial and final L1MuGMTReadoutCollection record size: identical.\n";
333 myCoutStream <<
" Size: " << muRecordsInitialSize << std::endl;
337 <<
"\nInitial and final L1MuGMTReadoutCollection record size: different.\n";
338 myCoutStream <<
" Initial size: " << muRecordsInitialSize << std::endl;
339 myCoutStream <<
" Final size: " << muRecordsFinalSize << std::endl;
343 edm::LogInfo(
"L1GtPackUnpackAnalyzer") << myCoutStream.str() << std::endl;
345 myCoutStream.str(
"");
346 myCoutStream.clear();
T getParameter(std::string const &) const
const cms_uint16_t boardId() const
get/set board ID
virtual void print(std::ostream &myCout) const
pretty print the content of a L1GtfeWord
L1GtPackUnpackAnalyzer(const edm::ParameterSet &)
virtual void analyzeGMT(const edm::Event &, const edm::EventSetup &)
GMT comparison.
edm::InputTag m_initialMuGmtInputTag
input tag for the initial GMT readout collection:
~L1GtPackUnpackAnalyzer()
virtual void analyze(const edm::Event &, const edm::EventSetup &)
analyze each event
virtual void endJob()
end of job
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void print(std::ostream &myCout) const
pretty print the content of a L1GtFdlWord
void print(std::ostream &myCout) const
pretty print
const int bxInEvent() const
get/set bunch cross in the GT event record
virtual void analyzeGT(const edm::Event &, const edm::EventSetup &)
GT comparison.
edm::InputTag m_initialDaqGtInputTag
input tag for the initial GT DAQ record:
edm::InputTag m_finalGtGmtInputTag
input tag for the final GT DAQ and GMT records: