17 uint32_t wordEventOffset,
18 uint32_t expectedTowerID
21 , dccBlock_(dccBlock), expectedTowerID_(expectedTowerID)
27 errors_[
"FE::BLOCK LENGTH"] = 0;
47 uint32_t numbOfXtalBlocks = 0 ;
49 if( length > 0 ){ numbOfXtalBlocks = (length-1)/numbDWInXtalBlock; }
50 uint32_t xtalBlockSize = numbDWInXtalBlock*8;
61 if( !zs && numbOfXtalBlocks != 25 ){
64 (
errors_[
"FE::BLOCK LENGTH"])++;
65 errorString_ +=
"\n ======================================================================\n";
70 errorString_ +=
"\n ======================================================================";
73 if( numbOfXtalBlocks > 25 ){
74 if (
errors_[
"FE::BLOCK LENGTH"]==0)(
errors_[
"FE::BLOCK LENGTH"])++;
75 errorString_ +=
"\n ======================================================================\n";
79 errorString_ +=
"\n Action -> data after the xtal 25 is ignored... ";
80 errorString_ +=
"\n ======================================================================";
89 uint32_t stripID, xtalID;
92 for(uint32_t numbXtal=1; numbXtal <= numbOfXtalBlocks && numbXtal <=25 ; numbXtal++){
96 stripID =( numbXtal-1)/5 + 1;
97 xtalID = numbXtal - (stripID-1)*5;
119 std::vector<DCCTBXtalBlock *>::iterator it;
130 std::pair <bool,std::string>
res;
140 if(!res.first){ checkErrors += res.second; (
errors_[
"FE::HEADER"])++; }
145 if(!res.first){ checkErrors += res.second; (
errors_[
"FE::HEADER"])++; }
148 if( checkErrors !=
"" ){
151 errorString_ +=
"\n ======================================================================\n";
154 errorString_ +=
"\n ======================================================================";
161 std::vector<DCCTBXtalBlock *> myVector;
162 std::vector<DCCTBXtalBlock *>::iterator it;
167 std::pair<bool,std::string> stripIdCheck = (*it)->checkDataField(
"STRIP ID",stripId);
168 std::pair<bool,std::string> xtalIdCheck = (*it)->checkDataField(
"XTAL ID",xtalId);
170 if(xtalIdCheck.first && stripIdCheck.first ){ myVector.push_back( (*it) ); }
181 for(std::set<DCCTBDataField *,DCCTBDataFieldComparator>::iterator it =
mapperFields_->begin(); it!=
mapperFields_->end(); it++){
182 if ( (*it)->name() ==
"TT/SC ID" )
virtual std::pair< bool, std::string > checkDataField(std::string name, uint32_t data)
virtual uint32_t getDataField(std::string name)
std::set< DCCTBDataField *, DCCTBDataFieldComparator > * mapperFields_
virtual void increment(uint32_t numb, std::string msg="")
DCCTBDataParser * parser_
~DCCTBTowerBlock() override
std::string getDecString(uint32_t data)
uint32_t numbXtalSamples()
uint32_t wordEventOffset_
std::set< DCCTBDataField *, DCCTBDataFieldComparator > * towerFields()
DCCTBDataMapper * mapper()
std::map< std::string, uint32_t > errors_
std::vector< DCCTBXtalBlock * > xtalBlocks_
uint32_t expectedTowerID_
DCCTBEventBlock * dccBlock_
uint32_t wordsToEndOfEvent_
std::vector< DCCTBXtalBlock * > xtalBlocksById(uint32_t stripId, uint32_t xtalId)
DCCTBTowerBlock(DCCTBEventBlock *dccBlock, DCCTBDataParser *parser, const uint32_t *buffer, uint32_t numbBytes, uint32_t wordsToEnd, uint32_t wordEventOffset, uint32_t expectedTowerID)