51 if (
m_printOut ) std::cout <<
"Executing " << name() <<
" " <<
m_testSlot.get(context)->count << std::endl;
53 m_testSlot.get(context)->larContainer->eventNumber( context.evt() );
56 std::vector<const OFFLINE_FRAGMENTS_NAMESPACE::ROBFragment*> robFrags;
58 if (
m_printOut ) std::cout <<
"robFrags.size() : " << robFrags.size() << std::endl;
59 if (robFrags.size() < 1 ){
60 return StatusCode::SUCCESS;
62 std::vector<LArCellCollection*> coll_of_coll;
63 struct timeval t1, t2;
65 gettimeofday(&t1, NULL);
66 for(
auto rob : robFrags ){
67 if (
m_printOut ) std::cout <<
"Interpreting fragment" << std::endl;
69 const uint32_t* roddata = 0;
70 rob->rod_data( roddata );
71 const size_t roddatasize = rob->rod_ndata();
72 if (
m_printOut ) { std::cout <<
"roddatasize : " << roddatasize << std::endl;
73 if (roddatasize > 30){
74 for(
size_t i=0;i<30;i++){
75 std::cout <<
"0x" << std::hex << roddata[i] <<
" " << std::dec << roddata[i] << std::endl;
79 uint32_t sourceID = rob->source_id();
80 const auto it = larcell->
find( sourceID );
82 if ( it != larcell->end() && ( *it )->size() != 0 ) {
84 if (
m_printOut ) std::cout <<
"ROB of ID 0x" << std::hex << sourceID << std::dec <<
" to be decoded" << std::endl;
85 if ( !
m_larDecoder->check_valid(rob,
msg())) {std::cout <<
"Wrong Block" << std::endl;}
88 uint16_t rodMinorVersion = 0;
89 uint32_t robBlockType = 0;
90 m_larDecoder->fillCollectionHLT( *rob, roddata, roddatasize, *coll, larRodBlockStructure_per_slot, rodMinorVersion, robBlockType );
91 coll_of_coll.push_back(coll);
96 gettimeofday(&t2, NULL);
97 double delay = 1e6*(t2.tv_sec-t1.tv_sec) + (t2.tv_usec-t1.tv_usec);
99 std::cout <<
"TIME : " <<
delay <<
"; n unpacked : " << nunpacked <<
"; TIME/unpacked : " <<
delay/((double)nunpacked) << std::endl;
100 for(
auto coll : coll_of_coll )
101 for(
const auto& cell : *coll )
102 if ( cell && cell->caloDDE() ) std::cout <<
"Cell : 0x" << std::hex << cell->ID().get_identifier32().get_compact() << std::dec <<
" " << cell->energy() <<
" " << cell->eta() <<
" " << cell->phi() <<
" " << cell->caloDDE()->getSampling() << std::endl;
104 return StatusCode::SUCCESS;