NCBI C++ ToolKit
tse_split_info.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: tse_split_info.cpp 100138 2023-06-22 20:19:33Z vasilche $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Author: Eugene Vasilchenko
27 *
28 * File Description:
29 * Split TSE info
30 *
31 */
32 
33 
34 #include <ncbi_pch.hpp>
35 
37 #include <objmgr/impl/tse_info.hpp>
41 //#include <objmgr/impl/bioseq_info.hpp>
42 //#include <objmgr/impl/bioseq_set_info.hpp>
44 #include <objmgr/data_loader.hpp>
46 #include <objmgr/seq_map.hpp>
49 #include <common/ncbi_sanitizers.h>
50 
51 #include <algorithm>
52 
55 
56 
57 /////////////////////////////////////////////////////////////////////////////
58 // CTSE_Chunk_Info
59 /////////////////////////////////////////////////////////////////////////////
60 
61 
63  : m_DataLoader(0),
64  m_BlobVersion(-1),
65  m_SplitVersion(-1),
66  m_BioseqChunkId(-1),
67  m_SeqIdToChunksSorted(false),
68  m_ContainsBioseqs(false)
69 {
70 }
71 
73  : m_DataLoader(0),
74  m_BlobId(blob_id),
75  m_BlobVersion(blob_ver),
76  m_SplitVersion(-1),
77  m_BioseqChunkId(-1),
78  m_SeqIdToChunksSorted(false),
79  m_ContainsBioseqs(false)
80 {
81 }
82 
83 
85 {
88  it->second->x_DropAnnotObjects();
89  }
90 }
91 
92 
93 // TSE/DS attach
94 
96 {
100  it->second->x_TSEAttach(tse, *lsnr);
101  }
102 }
103 
105 {
106  m_TSE_Set.erase(&tse_info);
107 }
108 
109 
111 {
113  TTSE_Set::const_iterator it = m_TSE_Set.find(const_cast<CTSE_Info*>(&tse));
114  if( it != m_TSE_Set.end() )
115  return it->second;
116 
117  return CRef<ITSE_Assigner>();
118 }
119 
120 
122 {
123  if ( !m_DataLoader && ds.GetDataLoader() ) {
124  m_DataLoader = &ds;
126  if ( ds.x_IsTrackingSplitSeq() && ContainsBioseqs() ) {
127  vector<CSeq_id_Handle> ids;
128  {{
129  CMutexGuard guard(m_ChunksMutex);
130  for ( auto& chunk : m_Chunks ) {
131  chunk.second->GetBioseqsIds(ids);
132  }
133  }}
134  ds.x_IndexSplitInfo(ids, this);
135  }
136  }
137 }
138 
139 
141 {
142  if ( m_DataLoader == &ds ) {
143  if ( ds.x_IsTrackingSplitSeq() && ContainsBioseqs() ) {
144  vector<CSeq_id_Handle> ids;
145  {{
146  CMutexGuard guard(m_ChunksMutex);
147  for ( auto& chunk : m_Chunks ) {
148  chunk.second->GetBioseqsIds(ids);
149  }
150  }}
151  ds.x_UnindexSplitInfo(ids, this);
152  }
153  m_DataLoader = 0;
154  }
155 }
156 
157 
158 // identification
160 {
161  _ASSERT(m_BlobId);
162  return m_BlobId;
163 }
164 
165 
167 {
168  return m_BlobVersion;
169 }
170 
171 
173 {
174  _ASSERT(m_SplitVersion >= 0);
175  return m_SplitVersion;
176 }
177 
178 
180 {
181  _ASSERT(m_SplitVersion < 0);
182  _ASSERT(version >= 0);
184 }
185 
186 
188 {
189  return m_MutexPool;
190 }
191 
192 
194 {
197  _ASSERT(loader);
198  return *loader;
199 }
200 
201 
203 {
204  CMutexGuard guard(m_ChunksMutex);
205  TChunks::const_iterator iter = m_Chunks.end(), begin = m_Chunks.begin();
206  return iter != begin && (--iter)->first == CTSE_Chunk_Info::kDelayedMain_ChunkId;
207 }
208 
209 
211 {
212  CMutexGuard guard(m_ChunksMutex);
213  TChunks::const_iterator iter = m_Chunks.end(), begin = m_Chunks.begin();
214  if ( iter == begin || (--iter)->first != CTSE_Chunk_Info::kDelayedMain_ChunkId ) {
215  // no delayed main chunk
216  return false;
217  }
218  // no other chunks except maybe WGS master chunk
219  return iter == begin || ((--iter)->first == CTSE_Chunk_Info::kMasterWGS_ChunkId && iter == begin);
220 }
221 
222 
224 {
225  CRef<CTSE_Chunk_Info> delayed_chunk;
226  {{
227  CMutexGuard guard(m_ChunksMutex);
228  TChunks::const_iterator iter = m_Chunks.end(), begin = m_Chunks.begin();
229  while ( iter != begin && (--iter)->first >= kMax_Int-1 ) {
230  delayed_chunk = iter->second;
231  break;
232  }
233  }}
234  if ( delayed_chunk ) {
235  delayed_chunk->Load();
236  }
237 }
238 
239 
240 // chunk attach
242 {
243  _ASSERT(!chunk_info.IsLoaded());
244  {{
245  CMutexGuard guard(m_ChunksMutex);
246  _ASSERT(m_Chunks.find(chunk_info.GetChunkId()) == m_Chunks.end());
247  _ASSERT(m_Chunks.empty() || chunk_info.GetChunkId() != chunk_info.kDelayedMain_ChunkId);
248  m_Chunks[chunk_info.GetChunkId()].Reset(&chunk_info);
249  }}
250  {{
251  CMutexGuard guard(m_AttachMutex);
252  chunk_info.x_SplitAttach(*this);
253  }}
254 }
255 
256 
258 {
259  CMutexGuard guard(m_ChunksMutex);
260  TChunks::iterator iter = m_Chunks.find(chunk_id);
261  if ( iter == m_Chunks.end() ) {
262  NCBI_THROW(CObjMgrException, eAddDataError,
263  "invalid chunk id: "+NStr::IntToString(chunk_id));
264  }
265  return *iter->second;
266 }
267 
268 
270 {
271  CMutexGuard guard(m_ChunksMutex);
272  TChunks::const_iterator iter = m_Chunks.find(chunk_id);
273  if ( iter == m_Chunks.end() ) {
274  NCBI_THROW(CObjMgrException, eAddDataError,
275  "invalid chunk id: "+NStr::IntToString(chunk_id));
276  }
277  return *iter->second;
278 }
279 
280 
282 {
283  CMutexGuard guard(m_ChunksMutex);
284  TChunks::iterator iter = m_Chunks.find(0);
285  if ( iter != m_Chunks.end() ) {
286  return *iter->second;
287  }
288 
290  AddChunk(*chunk);
291  _ASSERT(chunk == &GetChunk(0));
292 
293  return *chunk;
294 }
295 
296 
297 // split info
299 {
301  CTSE_Info& tse = *it->first;
302  ITSE_Assigner& listener = *it->second;
303  listener.AddDescInfo(tse, info, chunk_id);
304  }
305 }
306 
308  TChunkId chunk_id)
309 {
311  CTSE_Info& tse = *it->first;
312  ITSE_Assigner& listener = *it->second;
313  listener.AddAssemblyInfo(tse, info, chunk_id);
314  }
315 }
316 
318 {
320  CTSE_Info& tse = *it->first;
321  ITSE_Assigner& listener = *it->second;
322  listener.AddAnnotPlace(tse, place, chunk_id);
323  }
324 }
325 
327  TChunkId chunk_id)
328 {
329  if ( place_id == kTSE_Place_id ) {
331  _ASSERT(chunk_id >= 0);
332  m_BioseqChunkId = chunk_id;
333  }
335  CTSE_Info& tse = *it->first;
336  ITSE_Assigner& listener = *it->second;
337  listener.AddBioseqPlace(tse, place_id, chunk_id);
338  }
339 }
340 
342  CTSE_Chunk_Info& chunk)
343 {
345  CTSE_Info& tse = *it->first;
346  ITSE_Assigner& listener = *it->second;
347  listener.AddSeq_data(tse, location, chunk);
348  }
349 }
350 
352  TChunkId chunk_id,
353  bool bioseq)
354 {
356  m_SeqIdToChunksSorted = false;
357  if ( bioseq && !ContainsBioseqs() ) {
358  m_ContainsBioseqs.store(true, memory_order_relaxed);
359  }
360  m_SeqIdToChunks.push_back(pair<CSeq_id_Handle, TChunkId>(id, chunk_id));
361  if ( bioseq && m_DataLoader ) {
362  m_DataLoader->x_IndexSplitInfo(id, this);
363  }
364 }
365 
366 
367 void CTSE_Split_Info::x_SetContainedSeqIds(const vector<TBioseqId>& seq_ids,
368  const set<TBioseqId>& annot_ids,
369  TChunkId chunk_id)
370 {
371  if ( seq_ids.empty() && annot_ids.empty() ) {
372  return;
373  }
375  m_SeqIdToChunksSorted = false;
376  if ( !seq_ids.empty() && !ContainsBioseqs() ) {
377  m_ContainsBioseqs.store(true, memory_order_relaxed);
378  }
379  for ( auto& id : seq_ids ) {
380  m_SeqIdToChunks.push_back(pair<CSeq_id_Handle, TChunkId>(id, chunk_id));
381  }
382  for ( auto& id : annot_ids ) {
383  m_SeqIdToChunks.push_back(pair<CSeq_id_Handle, TChunkId>(id, chunk_id));
384  }
385  if ( m_DataLoader && !seq_ids.empty() ) {
386  m_DataLoader->x_IndexSplitInfo(seq_ids, this);
387  }
388 }
389 
390 
392 {
393  ITERATE ( TTSE_Set, it, m_TSE_Set ) {
394  if ( it->first->ContainsBioseq(id) ) {
395  return false;
396  }
397  }
398  return true;
399 }
400 
401 
402 // annot index
404  EFeatIdType id_type)
405 {
406 }
407 
408 
410  EFeatIdType id_type)
411 {
412 }
413 
414 
416 {
417 }
418 
419 
421 {
422  ITERATE ( TTSE_Set, it, m_TSE_Set ) {
423  chunk.x_UpdateAnnotIndex(*it->first);
424  }
425 }
426 
427 
428 CTSE_Split_Info::TSeqIdToChunks::const_iterator
430 {
431  if ( !m_SeqIdToChunksSorted ) {
433  sort(m_SeqIdToChunks.begin(), m_SeqIdToChunks.end());
434  m_SeqIdToChunksSorted = true;
435  }
436  return lower_bound(m_SeqIdToChunks.begin(),
437  m_SeqIdToChunks.end(),
438  pair<CSeq_id_Handle, TChunkId>(id, -1));
439 }
440 
441 // load requests
442 void CTSE_Split_Info::x_GetRecords(const CSeq_id_Handle& id, bool bioseq) const
443 {
444  if ( bioseq && !ContainsBioseqs() ) {
445  // shortcut - this TSE doesn't contain any Bioseqs
446  return;
447  }
448  vector<TChunkId> chunk_ids;
449  {{
451  for ( TSeqIdToChunks::const_iterator iter = x_FindChunk(id);
452  iter != m_SeqIdToChunks.end() && iter->first == id; ++iter ) {
453  chunk_ids.push_back(iter->second);
454  }
455  }}
456  for ( auto& chunk_id : chunk_ids ) {
457  const CTSE_Chunk_Info& chunk = GetChunk(chunk_id);
458  if ( !chunk.IsLoaded() ) {
459  chunk.x_GetRecords(id, bioseq);
460  }
461  }
462 }
463 
464 
465 // load requests
467  const CSeq_id_Handle& id) const
468 {
469  if ( !ContainsBioseqs() ) {
470  // shortcut - this TSE doesn't contain any Bioseqs
471  return;
472  }
473  {{
475  for ( TSeqIdToChunks::const_iterator iter = x_FindChunk(id);
476  iter != m_SeqIdToChunks.end() && iter->first == id; ++iter ) {
477  const CTSE_Chunk_Info& chunk = GetChunk(iter->second);
478  if ( !chunk.IsLoaded() && chunk.ContainsBioseq(id) ) {
479  chunks.push_back(ConstRef(&chunk));
480  }
481  }
482  }}
483 }
484 
485 
487 {
488  CMutexGuard guard(m_ChunksMutex);
489  ITERATE ( TChunks, it, m_Chunks ) {
490  it->second->GetBioseqsIds(ids);
491  }
492 }
493 
494 
496 {
497  if ( !ContainsBioseqs() ) {
498  // shortcut - this TSE doesn't contain any Bioseqs
499  return false;
500  }
502  for ( TSeqIdToChunks::const_iterator iter = x_FindChunk(id);
503  iter != m_SeqIdToChunks.end() && iter->first == id; ++iter ) {
504  if ( GetChunk(iter->second).ContainsBioseq(id) ) {
505  return true;
506  }
507  }
508  return false;
509 }
510 
511 
513 {
515  GetChunk(chunk_id).Load();
516 }
517 
518 
519 void CTSE_Split_Info::x_LoadChunks(const TChunkIds& chunk_ids) const
520 {
521  if ( CPrefetchManager::IsActive() ) {
522  ITERATE ( TChunkIds, it, chunk_ids ) {
523  LoadChunk(*it);
524  }
525  return;
526  }
527 
528  CTSE_Split_Info& info_nc = const_cast<CTSE_Split_Info&>(*this);
529  typedef vector< CRef<CTSE_Chunk_Info> > TChunkRefs;
530  typedef vector< AutoPtr<CInitGuard> > TInitGuards;
531  TChunkIds sorted_ids = chunk_ids;
532  sort(sorted_ids.begin(), sorted_ids.end());
533  sorted_ids.erase(unique(sorted_ids.begin(), sorted_ids.end()),
534  sorted_ids.end());
535 #ifdef NCBI_USE_TSAN
536  const size_t limit_chunks_request = 15;
537 #else
538  const size_t limit_chunks_request = 200;
539 #endif
540  size_t reserve_size = min(sorted_ids.size(), limit_chunks_request);
541  TChunkRefs chunks;
542  chunks.reserve(reserve_size);
543  TInitGuards guards;
544  guards.reserve(reserve_size);
545  // Collect and lock all chunks to be loaded
546  ITERATE(TChunkIds, id, sorted_ids) {
547  CRef<CTSE_Chunk_Info> chunk(&info_nc.GetChunk(*id));
548  AutoPtr<CInitGuard> guard(
549  new CInitGuard(chunk->m_LoadLock, info_nc.GetMutexPool()));
550  if ( !(*guard.get()) ) {
551  continue;
552  }
553  chunks.push_back(chunk);
554  guards.push_back(guard);
555  if ( guards.size() >= limit_chunks_request ) {
556  // Load chunks
557  info_nc.GetDataLoader().GetChunks(chunks);
558  guards.clear();
559  chunks.clear();
560  }
561  }
562  if ( !guards.empty() ) {
563  // Load chunks
564  info_nc.GetDataLoader().GetChunks(chunks);
565  guards.clear();
566  chunks.clear();
567  }
568 }
569 
570 
572  const vector<CConstRef<CTSE_Chunk_Info>>& src_chunks)
573 {
574  vector<CRef<CTSE_Chunk_Info>> sorted_chunks;
575  sorted_chunks.reserve(src_chunks.size());
576  for ( auto& chunk : src_chunks ) {
577  _ASSERT(&chunk->GetSplitInfo().GetDataLoader() == loader);
578  sorted_chunks.push_back(Ref(const_cast<CTSE_Chunk_Info*>(chunk.GetPointer())));
579  }
580  sort(sorted_chunks.begin(), sorted_chunks.end(),
581  [](const CRef<CTSE_Chunk_Info>& a,
582  const CRef<CTSE_Chunk_Info>& b) -> bool
583  {
584  auto blob_id_a = a->GetBlobId();
585  auto blob_id_b = b->GetBlobId();
586  return ((blob_id_a < blob_id_b) ||
587  (!(blob_id_b < blob_id_a) && a->GetChunkId() < b->GetChunkId()));
588  });
589  sorted_chunks.erase(unique(sorted_chunks.begin(), sorted_chunks.end(),
590  [](const CRef<CTSE_Chunk_Info>& a,
591  const CRef<CTSE_Chunk_Info>& b) -> bool
592  {
593  return ((&a->GetSplitInfo() == &b->GetSplitInfo()) &&
594  (a->GetChunkId() == b->GetChunkId()));
595  }),
596  sorted_chunks.end());
597 #ifdef NCBI_USE_TSAN
598  const size_t limit_chunks_request = 15;
599 #else
600  const size_t limit_chunks_request = 200;
601 #endif
602  size_t reserve_size = min(sorted_chunks.size(), limit_chunks_request);
603  CDataLoader::TChunkSet chunks;
604  chunks.reserve(reserve_size);
605  vector< AutoPtr<CInitGuard> > guards;
606  guards.reserve(reserve_size);
607  // Collect and lock all chunks to be loaded
608  for ( auto& chunk : sorted_chunks ) {
609  AutoPtr<CInitGuard> guard = chunk->GetLoadInitGuard();
610  if ( !guard.get() || !*guard.get() ) {
611  continue;
612  }
613  chunks.push_back(chunk);
614  guards.push_back(guard);
615  if ( guards.size() >= limit_chunks_request ) {
616  // Load chunks
617  loader->GetChunks(chunks);
618  guards.clear();
619  chunks.clear();
620  }
621  }
622  if ( !guards.empty() ) {
623  // Load chunks
624  loader->GetChunks(chunks);
625  guards.clear();
626  chunks.clear();
627  }
628 }
629 
630 
632 {
633  if ( m_BioseqChunkId >= 0 ) {
635  }
636 }
637 
638 
639 // load results
641  const CSeq_descr& descr)
642 {
644  CTSE_Info& tse = *it->first;
645  ITSE_Assigner& listener = *it->second;
646  listener.LoadDescr(tse, place, descr);
647  }
648 }
649 
650 
652  const CSeq_annot& annot,
653  int chunk_id)
654 {
655  CRef<CSeq_annot> add;
657  CTSE_Info& tse = *it->first;
658  ITSE_Assigner& listener = *it->second;
659  if ( !add ) {
660  add.Reset(const_cast<CSeq_annot*>(&annot));
661  }
662  else {
663  CRef<CSeq_annot> tmp(add);
664  add.Reset(new CSeq_annot);
665  add->Assign(*tmp);
666  }
667  listener.LoadAnnot(tse, place, add, chunk_id);
668  }
669 }
670 
671 void CTSE_Split_Info::x_LoadBioseqs(const TPlace& place, const list< CRef<CBioseq> >& bioseqs, int chunk_id)
672 {
674  CTSE_Info& tse = *it->first;
675  ITSE_Assigner& listener = *it->second;
676  listener.LoadChunkBioseqs(tse, place, bioseqs, chunk_id);
677  }
678 }
679 
680 
682  const TSequence& sequence)
683 {
685  CTSE_Info& tse = *it->first;
686  ITSE_Assigner& listener = *it->second;
687  listener.LoadSequence(tse, place, pos, sequence);
688  }
689 }
690 
691 
693  const TAssembly& assembly)
694 {
696  CTSE_Info& tse = *it->first;
697  ITSE_Assigner& listener = *it->second;
698  listener.LoadAssembly(tse, seq_id, assembly);
699  }
700 }
701 
702 
704  CTSE_SetObjectInfo* set_info)
705 {
706  CRef<CSeq_entry> add;
708  CTSE_Info& tse = *it->first;
709  ITSE_Assigner& listener = *it->second;
710  if ( !add ) {
711  add = &entry;
712  }
713  else {
714  add = new CSeq_entry;
715  add->Assign(entry);
716  set_info = 0;
717  }
718  listener.LoadSeq_entry(tse, *add, set_info);
719  }
720 }
721 
722 
724 {
726  CTSE_Info& tse = *it->first;
727  tse.AddUsedMemory(size);
728  }
729 }
730 
731 
733 {
735  CTSE_Info& tse = *it->first;
736  tse.SetBioseqUpdater(updater);
737  }
738 }
739 
740 
743 
User-defined methods of the data storage class.
#define false
Definition: bool.h:36
bool x_IsTrackingSplitSeq() const
CDataLoader * GetDataLoader(void) const
void x_UnindexSplitInfo(TSeq_id2SplitInfoSet &split_map, const CSeq_id_Handle &id, CTSE_Split_Info *split_info)
void x_IndexSplitInfo(TSeq_id2SplitInfoSet &split_map, const CSeq_id_Handle &id, CTSE_Split_Info *split_info)
Base class for all object manager exceptions.
@Seq_descr.hpp User-defined methods of the data storage class.
Definition: Seq_descr.hpp:55
Definition: Seq_entry.hpp:56
bool x_GetRecords(const CSeq_id_Handle &id, bool bioseq) const
void x_UpdateAnnotIndex(CTSE_Info &tse)
void x_SplitAttach(CTSE_Split_Info &split_info)
void Load(void) const
CInitMutex< CObject > m_LoadLock
TChunkId GetChunkId(void) const
bool ContainsBioseq(const CSeq_id_Handle &id) const
bool IsLoaded(void) const
void AddUsedMemory(size_t size)
Definition: tse_info.cpp:345
void SetBioseqUpdater(CRef< CBioseqUpdater > updater)
Definition: tse_info.cpp:2036
TSeqIdToChunks::const_iterator x_FindChunk(const CSeq_id_Handle &id) const
CTSE_Chunk_Info::TBioseq_setId TBioseq_setId
void x_UpdateCore(void)
CTSE_Chunk_Info::TChunkId TChunkId
void x_LoadBioseqs(const TPlace &place, const list< CRef< CBioseq > > &bioseqs, int chunk_id)
CDataSource * m_DataLoader
TBlobId GetBlobId(void) const
CTSE_Chunk_Info & GetChunk(TChunkId chunk_id)
void x_AddAssemblyInfo(const TAssemblyInfo &info, TChunkId chunk_id)
void x_LoadChunks(const TChunkIds &chunk_ids) const
void x_TSEAttach(CTSE_Info &tse_info, CRef< ITSE_Assigner > &assigner)
CTSE_Chunk_Info::TAssembly TAssembly
void x_LoadDescr(const TPlace &place, const CSeq_descr &descr)
TBlobVersion m_BlobVersion
CInitMutexPool & GetMutexPool(void)
CInitMutexPool m_MutexPool
void x_AddSeq_data(const TLocationSet &location, CTSE_Chunk_Info &chunk)
void x_SetBioseqUpdater(CRef< CBioseqUpdater > updater)
void x_SetContainedId(const TBioseqId &id, TChunkId chunk_id, bool bioseq)
TBlobVersion GetBlobVersion(void) const
void AddChunk(CTSE_Chunk_Info &chunk_info)
CTSE_Chunk_Info & GetSkeletonChunk(void)
bool x_HasDelayedMainChunk(void) const
void x_AddUsedMemory(size_t size)
TSeqIdToChunks m_SeqIdToChunks
bool ContainsBioseq(const CSeq_id_Handle &id) const
void x_DSDetach(CDataSource &ds)
TSplitVersion m_SplitVersion
CTSE_Chunk_Info::TDescInfo TDescInfo
void SetSplitVersion(TSplitVersion version)
void x_TSEDetach(CTSE_Info &tse_info)
void x_LoadDelayedMainChunk(void) const
void GetBioseqsIds(TSeqIds &ids) const
void LoadChunk(TChunkId id) const
TSplitVersion GetSplitVersion(void) const
void x_UpdateAnnotIndex(void)
atomic< bool > m_ContainsBioseqs
CTSE_Chunk_Info::TLocationSet TLocationSet
void x_AddBioseqPlace(TBioseq_setId place_id, TChunkId chunk_id)
void x_AddChunksForGetRecords(vector< CConstRef< CTSE_Chunk_Info >> &chunks, const CSeq_id_Handle &id) const
TChunkId m_BioseqChunkId
void x_LoadChunk(TChunkId chunk_id) const
void x_UpdateFeatIdIndex(CSeqFeatData::E_Choice type, EFeatIdType id_type)
CDataLoader & GetDataLoader(void) const
void x_DSAttach(CDataSource &ds)
void x_GetRecords(const CSeq_id_Handle &id, bool bioseq) const
bool ContainsBioseqs() const
vector< TChunkId > TChunkIds
void x_AddAnnotPlace(const TPlace &place, TChunkId chunk_id)
void x_LoadAssembly(const TBioseqId &seq_id, const TAssembly &assembly)
void x_LoadSequence(const TPlace &place, TSeqPos pos, const TSequence &sequence)
CTSE_Chunk_Info::TSequence TSequence
vector< CSeq_id_Handle > TSeqIds
bool x_CanAddBioseq(const TBioseqId &id) const
void x_LoadSeq_entry(CSeq_entry &entry, CTSE_SetObjectInfo *set_info=0)
CTSE_Chunk_Info::TPlace TPlace
void x_LoadAnnot(const TPlace &place, const CSeq_annot &annot, int chunk_id)
CRef< ITSE_Assigner > GetAssigner(const CTSE_Info &tse)
vector< pair< CSeq_id_Handle, TChunkId > > TSeqIdToChunks
bool x_NeedsDelayedMainChunk(void) const
void x_AddDescInfo(const TDescInfo &info, TChunkId chunk_id)
void x_SetContainedSeqIds(const vector< TBioseqId > &seq_ids, const set< TBioseqId > &annot_ids, TChunkId chunk_id)
virtual void AddDescInfo(CTSE_Info &, const TDescInfo &info, TChunkId chunk_id)=0
virtual void LoadSeq_entry(CTSE_Info &, CSeq_entry &entry, CTSE_SetObjectInfo *set_info)=0
virtual void LoadAssembly(CTSE_Info &, const TBioseqId &seq_id, const TAssembly &assembly)=0
virtual void LoadDescr(CTSE_Info &, const TPlace &place, const CSeq_descr &descr)=0
virtual void AddAnnotPlace(CTSE_Info &, const TPlace &place, TChunkId chunk_id)=0
virtual void LoadSequence(CTSE_Info &, const TPlace &place, TSeqPos pos, const TSequence &sequence)=0
virtual void AddAssemblyInfo(CTSE_Info &, const TAssemblyInfo &info, TChunkId chunk_id)=0
virtual void AddSeq_data(CTSE_Info &, const TLocationSet &location, CTSE_Chunk_Info &chunk)=0
virtual void LoadAnnot(CTSE_Info &, const TPlace &place, CRef< CSeq_annot > annot, int chunk_id)=0
virtual void LoadChunkBioseqs(CTSE_Info &, const TPlace &place, const list< CRef< CBioseq > > &bioseqs, int chunk_id)=0
virtual void AddBioseqPlace(CTSE_Info &, TBioseq_setId place_id, TChunkId chunk_id)=0
void erase(iterator pos)
Definition: map.hpp:167
const_iterator begin() const
Definition: map.hpp:151
const_iterator end() const
Definition: map.hpp:152
iterator_bool insert(const value_type &val)
Definition: map.hpp:165
bool empty() const
Definition: map.hpp:149
const_iterator find(const key_type &key) const
Definition: map.hpp:153
Definition: set.hpp:45
bool empty() const
Definition: set.hpp:133
static const char location[]
Definition: config.c:97
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
element_type * get(void) const
Get pointer.
Definition: ncbimisc.hpp:469
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
static bool IsActive(void)
virtual void GetChunks(const TChunkSet &chunks)
vector< TChunk > TChunkSet
CConstRef< C > ConstRef(const C *object)
Template function for conversion of const object pointer to CConstRef.
Definition: ncbiobj.hpp:2024
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
Definition: ncbiobj.hpp:2015
void Reset(void)
Reset reference object.
Definition: ncbiobj.hpp:773
#define kMax_Int
Definition: ncbi_limits.h:184
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
Definition: ncbistr.hpp:5083
E_Choice
Choice variants.
static MDB_envinfo info
Definition: mdb_load.c:37
static int version
Definition: mdb_load.c:29
constexpr auto sort(_Init &&init)
const struct ncbi::grid::netcache::search::fields::SIZE size
unsigned int a
Definition: ncbi_localip.c:102
Common macro to detect used sanitizers and suppress memory leaks if run under LeakSanitizer.
T min(T x_, T y_)
static char tmp[2048]
Definition: utf8.c:42
Definition: type.c:6
#define _ASSERT
static const int kTSE_Place_id
Modified on Mon Dec 11 02:38:38 2023 by modify_doxy.py rev. 669887