22 std::string shortPrint(
const TRT_RDO_Container *main_input_TRT,
unsigned maxprint=25) {
23 std::ostringstream
os;
25 for(
unsigned i=0;
i<maxprint;
i++) {
27 if(p != main_input_TRT->
end()) {
28 os<<
" "<< (*p)->size();
36 os<<
" [TRT_RDO_Container==NULL]";
43 std::string persistentTRT_ToString(
const TRT_RDO_colvector& rdoV,
unsigned maxprint = 20) {
44 std::ostringstream
os;
45 os<<
"TRT_RDO_colvector = ["<<rdoV.
size()<<
"] ";
48 if(++
count>maxprint)
break;
50 os<<(*it)->size()<<
" ";
64 unsigned null_count(0);
69 MSG_DEBUG(log,
"[p1] using container iterators");
89 MSG_DEBUG(log,
"[p1]: No RDO collections found !");
92 MSG_DEBUG(log,
"[p1] using collections found in the StoreGate");
94 for (; it != last; ++it) {
102 log<<MSG::WARNING<<
"[p1] transToPers(): got "<< null_count<<
" NULLs in IdentifiableContainer"<<
endmsg;
105 MSG_DEBUG(log,
"[p1] transToPers(): PERS = "<<persistentTRT_ToString(*pers));
111 MSG_DEBUG(log,
"[p1] persToTrans(): PERS = "<<persistentTRT_ToString(*pers));
115 for (; it != last; ++it) {
119 if (
sc.isFailure()) {
120 log << MSG::FATAL <<
"[p1] persToTrans(): TRT RDOs could not be added to the container!" <<
endmsg;
121 throw std::runtime_error(
"TRT_RDO_ContainerCnv_p1::persToTrans(): TRT RDOs could not be added to the container!");
128 std::unique_ptr<TRT_RDO_Container> trans(std::make_unique<TRT_RDO_Container>(
m_trtId->straw_layer_hash_max()));
130 return(trans.release());
135 std::unique_ptr<TRT_RDO_Container_p1> pers(std::make_unique<TRT_RDO_Container_p1>(
SG::VIEW_ELEMENTS));
137 return(pers.release());
#define MSG_DEBUG(log, x)
This is an Identifier helper class for the TRT subdetector.
InDetRawDataCollection< TRT_RDORawData > TRT_RDO_Collection
TRT_RDO_colvector TRT_RDO_Container_p1
ConstDataVector< DataVector< InDetRawDataCollection< TRT_RDORawData > > > TRT_RDO_colvector
InDetRawDataContainer< InDetRawDataCollection< TRT_RDORawData > > TRT_RDO_Container
value_type push_back(value_type pElem)
Add an element to the end of the collection.
iterator begin() noexcept
Return an iterator pointing at the beginning of the collection.
iterator end() noexcept
Return an iterator pointing past the end of the collection.
DataVector< InDetRawDataCollection< TRT_RDORawData > >::const_iterator const_iterator
size_type size() const noexcept
Returns the number of elements in the collection.
const_iterator end() const
return const_iterator for end of container
const_iterator indexFind(IdentifierHash hashId) const
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
const_iterator begin() const
return const_iterator for first entry
This is a "hash" representation of an Identifier.
a const_iterator facade to DataHandle.
virtual void persToTrans(const TRT_RDO_Container_p1 *persObj, TRT_RDO_Container *transObj, MsgStream &log)
virtual TRT_RDO_Container_p1 * createPersistent(const TRT_RDO_Container *persObj, MsgStream &log)
StoreGateSvc * m_storeGate
virtual void transToPers(const TRT_RDO_Container *transObj, TRT_RDO_Container_p1 *persObj, MsgStream &log)
virtual TRT_RDO_Container * createTransient(const TRT_RDO_Container_p1 *persObj, MsgStream &log)
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts