25 if ( nam ==
"" || nam ==
"." )
return nullptr;
26 Name::size_type ipos = nam.rfind(
"/");
27 if ( ipos != Name::npos ) {
29 if ( pdat ==
nullptr )
return nullptr;
30 return pdat->
addTpcData(nam.substr(ipos+1), copyAdcData);
33 if (
m_dat.count(nam) )
return nullptr;
43 if ( nam ==
"" || nam ==
"." )
return this;
44 Name::size_type ipos = nam.find(
"/");
45 if ( ipos == Name::npos )
return m_dat.count(nam) ? &
m_dat[nam] :
nullptr;
47 if ( pdat ==
nullptr )
return nullptr;
56 if ( nam ==
"" || nam ==
"." ) {
61 for ( TpcDataMap::value_type& idat :
m_dat ) {
62 out.push_back(&idat.second);
67 Name::size_type ipos = nam.find(
"/");
68 if ( ipos == Name::npos ) {
70 if ( pdat ==
nullptr ) ++nerr;
71 else out.push_back(pdat);
73 Name dnam = nam.substr(0,ipos);
74 Name rnam = ipos == Name::npos ?
"" : nam.substr(ipos+1);
77 for (
TpcData* pdat : dirs ) nerr += pdat->getTpcData(rnam, out);
85 if ( nam ==
"" || nam ==
"." )
return this;
86 Name::size_type ipos = nam.find(
"/");
87 if ( ipos == Name::npos ) {
89 if ( idat ==
m_dat.end() )
return nullptr;
93 if ( pdat ==
nullptr )
return nullptr;
121 cout << prefix <<
"ADC Channel map count is " << nmap;
122 if ( nmap ) cout <<
":";
125 if ( ! pacm ) cout <<
"NULL" <<
endl;
127 cout << prefix <<
" " <<
"Channel count " << pacm->size();
128 if ( pacm->size() ) {
129 cout <<
" in range [" << pacm->begin()->first <<
", " << pacm->rbegin()->first <<
"]";
134 cout << prefix <<
"2D ROI count is " <<
get2dRois().size() <<
endl;
135 cout << prefix <<
"TPC data count is " <<
getData().size();
139 for (
const TpcDataMap::value_type& itpd :
getData() ) {
140 cout << prefix << itpd.first <<
":" <<
endl;
141 itpd.second.print(prefix +
" ", depth - 1);
AdcDataPtr addAdcData(AdcDataPtr padc, bool updateParent=true)
std::ostream & print(Name prefix, Index depth=10) const
std::shared_ptr< AdcChannelDataMap > AdcDataPtr
TpcData * addTpcData(Name nam, bool copyAdcData=true)
std::vector< TpcData * > TpcDataVector
AdcDataVector & getAdcData()
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
QTextStream & reset(QTextStream &s)
TpcData * getTpcData(Name nam)
std::vector< AdcDataPtr > AdcDataVector
AdcDataPtr createAdcData(bool updateParent=true)
std::map< AdcChannel, AdcChannelData > AdcChannelDataMap
Tpc2dRoiVector & get2dRois()
QTextStream & endl(QTextStream &s)