46 <<
"\nInput tag for the initial GT DAQ record: " 48 <<
"\nInput tag for the initial GMT readout collection: " 49 << m_initialMuGmtInputTag <<
" \n" 50 <<
"\nInput tag for the final GT DAQ and GMT records: " 51 << m_finalGtGmtInputTag <<
" \n" 77 std::ostringstream myCoutStream;
83 if (!gtReadoutRecordInitial.
isValid()) {
85 <<
"Initial L1GlobalTriggerReadoutRecord with input tag \n " 96 if (!gtReadoutRecordFinal.
isValid()) {
98 <<
"Final L1GlobalTriggerReadoutRecord with input tag \n " 109 if (gtfeWordInitial == gtfeWordFinal) {
110 myCoutStream <<
"\nInitial and final GTFE blocks: identical.\n";
111 gtfeWordInitial.
print(myCoutStream);
113 myCoutStream <<
"\nInitial and final GTFE blocks: different.\n";
115 myCoutStream <<
"\nInitial GTFE block\n";
116 gtfeWordInitial.
print(myCoutStream);
118 myCoutStream <<
"\nFinal GTFE block\n";
119 gtfeWordFinal.
print(myCoutStream);
124 << myCoutStream.str()
128 myCoutStream.str(
"");
129 myCoutStream.clear();
132 const std::vector<L1GtFdlWord>& gtFdlVectorInitial = gtReadoutRecordInitial->
gtFdlVector();
133 const std::vector<L1GtFdlWord>& gtFdlVectorFinal = gtReadoutRecordFinal->
gtFdlVector();
135 int gtFdlVectorInitialSize = gtFdlVectorInitial.size();
136 int gtFdlVectorFinalSize = gtFdlVectorFinal.size();
138 if (gtFdlVectorInitialSize == gtFdlVectorFinalSize) {
139 myCoutStream <<
"\nInitial and final FDL vector size: identical.\n";
140 myCoutStream <<
" Size: " << gtFdlVectorInitialSize << std::endl;
142 for (
int iFdl = 0; iFdl < gtFdlVectorInitialSize; ++iFdl) {
144 const L1GtFdlWord& fdlWordInitial = gtFdlVectorInitial[iFdl];
145 const L1GtFdlWord& fdlWordFinal = gtFdlVectorFinal[iFdl];
147 if (fdlWordInitial == fdlWordFinal) {
148 myCoutStream <<
"\nInitial and final FDL blocks: identical.\n";
149 fdlWordInitial.
print(myCoutStream);
152 myCoutStream <<
"\nInitial and final FDL blocks: different.\n";
154 myCoutStream <<
"\nInitial FDL block\n";
155 fdlWordInitial.
print(myCoutStream);
157 myCoutStream <<
"\nFinal FDL block\n";
158 fdlWordFinal.
print(myCoutStream);
165 myCoutStream <<
"\nInitial and final FDL vector size: different.\n";
166 myCoutStream <<
" Initial size: " << gtFdlVectorInitialSize << std::endl;
167 myCoutStream <<
" Final size: " << gtFdlVectorFinalSize << std::endl;
171 edm::LogInfo(
"L1GtPackUnpackAnalyzer") << myCoutStream.str() << std::endl;
173 myCoutStream.str(
"");
174 myCoutStream.clear();
178 const std::vector<L1GtPsbWord>& gtPsbVectorInitial = gtReadoutRecordInitial->
gtPsbVector();
179 const std::vector<L1GtPsbWord>& gtPsbVectorFinal = gtReadoutRecordFinal->
gtPsbVector();
181 int gtPsbVectorInitialSize = gtPsbVectorInitial.size();
182 int gtPsbVectorFinalSize = gtPsbVectorFinal.size();
184 if (gtPsbVectorInitialSize == gtPsbVectorFinalSize) {
185 myCoutStream <<
"\nInitial and final PSB vector size: identical.\n";
186 myCoutStream <<
" Size: " << gtPsbVectorInitialSize << std::endl;
190 for (
int iPsb = 0; iPsb < gtPsbVectorInitialSize; ++iPsb) {
192 const L1GtPsbWord& psbWordInitial = gtPsbVectorInitial[iPsb];
193 const boost::uint16_t boardIdInitial = psbWordInitial.
boardId();
194 const int bxInEventInitial = psbWordInitial.
bxInEvent();
199 bool foundPSB =
false;
201 for (
int iPsbF = 0; iPsbF < gtPsbVectorFinalSize; ++iPsbF) {
203 const L1GtPsbWord& psbWordFinal = gtPsbVectorFinal[iPsbF];
204 const boost::uint16_t boardIdFinal = psbWordFinal.
boardId();
205 const int bxInEventFinal = psbWordFinal.
bxInEvent();
207 if ((boardIdFinal == boardIdInitial) && (bxInEventInitial
208 == bxInEventFinal)) {
213 if (psbWordInitial == psbWordFinal) {
215 <<
"\nInitial and final PSB blocks: identical.\n";
216 psbWordInitial.
print(myCoutStream);
221 <<
"\nInitial and final PSB blocks: different.\n";
223 myCoutStream <<
"\nInitial PSB block\n";
224 psbWordInitial.
print(myCoutStream);
226 myCoutStream <<
"\nFinal PSB block\n";
227 psbWordFinal.
print(myCoutStream);
236 <<
"\nNo final PSB with boardID = " << boardIdInitial
237 <<
" and BxINEvent = " << bxInEventInitial <<
" was found" 238 <<
"\nInitial and final PSB vectors: different";
245 myCoutStream <<
"\nInitial and final PSB vector size: different.\n";
246 myCoutStream <<
" Initial size: " << gtPsbVectorInitialSize << std::endl;
247 myCoutStream <<
" Final size: " << gtPsbVectorFinalSize << std::endl;
251 edm::LogInfo(
"L1GtPackUnpackAnalyzer") << myCoutStream.str() << std::endl;
253 myCoutStream.str(
"");
254 myCoutStream.clear();
267 if (muCollRefProdInitial == muCollRefProdFinal) {
269 <<
"\nInitial and final RefProd<L1MuGMTReadoutCollection>: identical.\n";
273 <<
"\nInitial and final RefProd<L1MuGMTReadoutCollection>: different.\n";
278 << myCoutStream.str()
281 myCoutStream.str(
"");
282 myCoutStream.clear();
293 std::ostringstream myCoutStream;
301 <<
"Initial L1MuGMTReadoutCollection with input tag \n " 308 std::vector<L1MuGMTReadoutRecord> muRecordsInitial = gmtRcInitial->
getRecords();
316 <<
"Final L1MuGMTReadoutCollection with input tag \n " 323 std::vector<L1MuGMTReadoutRecord> muRecordsFinal = gmtRcFinal->
getRecords();
325 int muRecordsInitialSize = muRecordsInitial.size();
326 int muRecordsFinalSize = muRecordsFinal.size();
328 if (muRecordsInitialSize == muRecordsFinalSize) {
330 <<
"\nInitial and final L1MuGMTReadoutCollection record size: identical.\n";
331 myCoutStream <<
" Size: " << muRecordsInitialSize << std::endl;
335 <<
"\nInitial and final L1MuGMTReadoutCollection record size: different.\n";
336 myCoutStream <<
" Initial size: " << muRecordsInitialSize << std::endl;
337 myCoutStream <<
" Final size: " << muRecordsFinalSize << std::endl;
341 edm::LogInfo(
"L1GtPackUnpackAnalyzer") << myCoutStream.str() << std::endl;
343 myCoutStream.str(
"");
344 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.
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
const L1GtfeWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
const std::vector< L1GtPsbWord > gtPsbVector() const
get the vector of L1GtPsbWord
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
const edm::RefProd< L1MuGMTReadoutCollection > muCollectionRefProd() const
get / set reference to L1MuGMTReadoutCollection
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:
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
edm::InputTag m_finalGtGmtInputTag
input tag for the final GT DAQ and GMT records: