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 102224 2024-04-09 17:23:36Z 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  CRef<CTSE_Chunk_Info> delayed_chunk;
213  {{
214  CMutexGuard guard(m_ChunksMutex);
215  TChunks::const_iterator iter = m_Chunks.end(), begin = m_Chunks.begin();
216  if ( iter == begin || (--iter)->first != CTSE_Chunk_Info::kDelayedMain_ChunkId ) {
217  // no delayed main chunk
218  return false;
219  }
220  delayed_chunk = iter->second;
221  // check for other chunks except maybe WGS master chunk
222  if ( iter != begin ) {
223  --iter;
224  // skip WGS master chunk if any
225  if ( iter->first == CTSE_Chunk_Info::kMasterWGS_ChunkId && iter != begin ) {
226  --iter;
227  }
228  if ( iter != begin ) {
229  // there are other chunks -> delayed main chunk was loaded already
230  return false;
231  }
232  }
233  }}
234  return delayed_chunk->NotLoaded();
235 }
236 
237 
239 {
240  CRef<CTSE_Chunk_Info> delayed_chunk;
241  {{
242  CMutexGuard guard(m_ChunksMutex);
243  TChunks::const_iterator iter = m_Chunks.end(), begin = m_Chunks.begin();
244  while ( iter != begin && (--iter)->first >= kMax_Int-1 ) {
245  delayed_chunk = iter->second;
246  break;
247  }
248  }}
249  if ( delayed_chunk ) {
250  delayed_chunk->Load();
251  }
252 }
253 
254 
255 // chunk attach
257 {
258  _ASSERT(!chunk_info.IsLoaded());
259  {{
260  CMutexGuard guard(m_ChunksMutex);
261  _ASSERT(m_Chunks.find(chunk_info.GetChunkId()) == m_Chunks.end());
262  _ASSERT(m_Chunks.empty() || chunk_info.GetChunkId() != chunk_info.kDelayedMain_ChunkId);
263  m_Chunks[chunk_info.GetChunkId()].Reset(&chunk_info);
264  }}
265  {{
266  CMutexGuard guard(m_AttachMutex);
267  chunk_info.x_SplitAttach(*this);
268  }}
269 }
270 
271 
273 {
274  CMutexGuard guard(m_ChunksMutex);
275  TChunks::iterator iter = m_Chunks.find(chunk_id);
276  if ( iter == m_Chunks.end() ) {
277  NCBI_THROW(CObjMgrException, eAddDataError,
278  "invalid chunk id: "+NStr::IntToString(chunk_id));
279  }
280  return *iter->second;
281 }
282 
283 
285 {
286  CMutexGuard guard(m_ChunksMutex);
287  TChunks::const_iterator iter = m_Chunks.find(chunk_id);
288  if ( iter == m_Chunks.end() ) {
289  NCBI_THROW(CObjMgrException, eAddDataError,
290  "invalid chunk id: "+NStr::IntToString(chunk_id));
291  }
292  return *iter->second;
293 }
294 
295 
297 {
298  CMutexGuard guard(m_ChunksMutex);
299  TChunks::iterator iter = m_Chunks.find(0);
300  if ( iter != m_Chunks.end() ) {
301  return *iter->second;
302  }
303 
305  AddChunk(*chunk);
306  _ASSERT(chunk == &GetChunk(0));
307 
308  return *chunk;
309 }
310 
311 
312 // split info
314 {
316  CTSE_Info& tse = *it->first;
317  ITSE_Assigner& listener = *it->second;
318  listener.AddDescInfo(tse, info, chunk_id);
319  }
320 }
321 
323  TChunkId chunk_id)
324 {
326  CTSE_Info& tse = *it->first;
327  ITSE_Assigner& listener = *it->second;
328  listener.AddAssemblyInfo(tse, info, chunk_id);
329  }
330 }
331 
333 {
335  CTSE_Info& tse = *it->first;
336  ITSE_Assigner& listener = *it->second;
337  listener.AddAnnotPlace(tse, place, chunk_id);
338  }
339 }
340 
342  TChunkId chunk_id)
343 {
344  if ( place_id == kTSE_Place_id ) {
346  _ASSERT(chunk_id >= 0);
347  m_BioseqChunkId = chunk_id;
348  }
350  CTSE_Info& tse = *it->first;
351  ITSE_Assigner& listener = *it->second;
352  listener.AddBioseqPlace(tse, place_id, chunk_id);
353  }
354 }
355 
357  CTSE_Chunk_Info& chunk)
358 {
360  CTSE_Info& tse = *it->first;
361  ITSE_Assigner& listener = *it->second;
362  listener.AddSeq_data(tse, location, chunk);
363  }
364 }
365 
367  TChunkId chunk_id,
368  bool bioseq)
369 {
371  m_SeqIdToChunksSorted = false;
372  if ( bioseq && !ContainsBioseqs() ) {
373  m_ContainsBioseqs.store(true, memory_order_relaxed);
374  }
375  m_SeqIdToChunks.push_back(pair<CSeq_id_Handle, TChunkId>(id, chunk_id));
376  if ( bioseq && m_DataLoader ) {
377  m_DataLoader->x_IndexSplitInfo(id, this);
378  }
379 }
380 
381 
382 void CTSE_Split_Info::x_SetContainedSeqIds(const vector<TBioseqId>& seq_ids,
383  const set<TBioseqId>& annot_ids,
384  TChunkId chunk_id)
385 {
386  if ( seq_ids.empty() && annot_ids.empty() ) {
387  return;
388  }
390  m_SeqIdToChunksSorted = false;
391  if ( !seq_ids.empty() && !ContainsBioseqs() ) {
392  m_ContainsBioseqs.store(true, memory_order_relaxed);
393  }
394  for ( auto& id : seq_ids ) {
395  m_SeqIdToChunks.push_back(pair<CSeq_id_Handle, TChunkId>(id, chunk_id));
396  }
397  for ( auto& id : annot_ids ) {
398  m_SeqIdToChunks.push_back(pair<CSeq_id_Handle, TChunkId>(id, chunk_id));
399  }
400  if ( m_DataLoader && !seq_ids.empty() ) {
401  m_DataLoader->x_IndexSplitInfo(seq_ids, this);
402  }
403 }
404 
405 
407 {
408  ITERATE ( TTSE_Set, it, m_TSE_Set ) {
409  if ( it->first->ContainsBioseq(id) ) {
410  return false;
411  }
412  }
413  return true;
414 }
415 
416 
417 // annot index
419  EFeatIdType id_type)
420 {
421 }
422 
423 
425  EFeatIdType id_type)
426 {
427 }
428 
429 
431 {
432 }
433 
434 
436 {
437  ITERATE ( TTSE_Set, it, m_TSE_Set ) {
438  chunk.x_UpdateAnnotIndex(*it->first);
439  }
440 }
441 
442 
443 CTSE_Split_Info::TSeqIdToChunks::const_iterator
445 {
446  if ( !m_SeqIdToChunksSorted ) {
448  sort(m_SeqIdToChunks.begin(), m_SeqIdToChunks.end());
449  m_SeqIdToChunksSorted = true;
450  }
451  return lower_bound(m_SeqIdToChunks.begin(),
452  m_SeqIdToChunks.end(),
453  pair<CSeq_id_Handle, TChunkId>(id, -1));
454 }
455 
456 // load requests
457 void CTSE_Split_Info::x_GetRecords(const CSeq_id_Handle& id, bool bioseq) const
458 {
459  if ( bioseq && !ContainsBioseqs() ) {
460  // shortcut - this TSE doesn't contain any Bioseqs
461  return;
462  }
463  vector<TChunkId> chunk_ids;
464  {{
466  for ( TSeqIdToChunks::const_iterator iter = x_FindChunk(id);
467  iter != m_SeqIdToChunks.end() && iter->first == id; ++iter ) {
468  chunk_ids.push_back(iter->second);
469  }
470  }}
471  for ( auto& chunk_id : chunk_ids ) {
472  const CTSE_Chunk_Info& chunk = GetChunk(chunk_id);
473  if ( !chunk.IsLoaded() ) {
474  chunk.x_GetRecords(id, bioseq);
475  }
476  }
477 }
478 
479 
480 // load requests
482  const CSeq_id_Handle& id) const
483 {
484  if ( !ContainsBioseqs() ) {
485  // shortcut - this TSE doesn't contain any Bioseqs
486  return;
487  }
488  {{
490  for ( TSeqIdToChunks::const_iterator iter = x_FindChunk(id);
491  iter != m_SeqIdToChunks.end() && iter->first == id; ++iter ) {
492  const CTSE_Chunk_Info& chunk = GetChunk(iter->second);
493  if ( !chunk.IsLoaded() && chunk.ContainsBioseq(id) ) {
494  chunks.push_back(ConstRef(&chunk));
495  }
496  }
497  }}
498 }
499 
500 
502 {
503  CMutexGuard guard(m_ChunksMutex);
504  ITERATE ( TChunks, it, m_Chunks ) {
505  it->second->GetBioseqsIds(ids);
506  }
507 }
508 
509 
511 {
512  if ( !ContainsBioseqs() ) {
513  // shortcut - this TSE doesn't contain any Bioseqs
514  return false;
515  }
517  for ( TSeqIdToChunks::const_iterator iter = x_FindChunk(id);
518  iter != m_SeqIdToChunks.end() && iter->first == id; ++iter ) {
519  if ( GetChunk(iter->second).ContainsBioseq(id) ) {
520  return true;
521  }
522  }
523  return false;
524 }
525 
526 
528 {
530  GetChunk(chunk_id).Load();
531 }
532 
533 
534 void CTSE_Split_Info::x_LoadChunks(const TChunkIds& chunk_ids) const
535 {
536  if ( CPrefetchManager::IsActive() ) {
537  ITERATE ( TChunkIds, it, chunk_ids ) {
538  LoadChunk(*it);
539  }
540  return;
541  }
542 
543  CTSE_Split_Info& info_nc = const_cast<CTSE_Split_Info&>(*this);
544  typedef vector< CRef<CTSE_Chunk_Info> > TChunkRefs;
545  typedef vector< AutoPtr<CInitGuard> > TInitGuards;
546  TChunkIds sorted_ids = chunk_ids;
547  sort(sorted_ids.begin(), sorted_ids.end());
548  sorted_ids.erase(unique(sorted_ids.begin(), sorted_ids.end()),
549  sorted_ids.end());
550 #ifdef NCBI_USE_TSAN
551  const size_t limit_chunks_request = 15;
552 #else
553  const size_t limit_chunks_request = 200;
554 #endif
555  size_t reserve_size = min(sorted_ids.size(), limit_chunks_request);
556  TChunkRefs chunks;
557  chunks.reserve(reserve_size);
558  TInitGuards guards;
559  guards.reserve(reserve_size);
560  // Collect and lock all chunks to be loaded
561  ITERATE(TChunkIds, id, sorted_ids) {
562  CRef<CTSE_Chunk_Info> chunk(&info_nc.GetChunk(*id));
563  AutoPtr<CInitGuard> guard(
564  new CInitGuard(chunk->m_LoadLock, info_nc.GetMutexPool()));
565  if ( !(*guard.get()) ) {
566  continue;
567  }
568  chunks.push_back(chunk);
569  guards.push_back(guard);
570  if ( guards.size() >= limit_chunks_request ) {
571  // Load chunks
572  info_nc.GetDataLoader().GetChunks(chunks);
573  guards.clear();
574  chunks.clear();
575  }
576  }
577  if ( !guards.empty() ) {
578  // Load chunks
579  info_nc.GetDataLoader().GetChunks(chunks);
580  guards.clear();
581  chunks.clear();
582  }
583 }
584 
585 
587  const vector<CConstRef<CTSE_Chunk_Info>>& src_chunks)
588 {
589  vector<CRef<CTSE_Chunk_Info>> sorted_chunks;
590  sorted_chunks.reserve(src_chunks.size());
591  for ( auto& chunk : src_chunks ) {
592  _ASSERT(&chunk->GetSplitInfo().GetDataLoader() == loader);
593  sorted_chunks.push_back(Ref(const_cast<CTSE_Chunk_Info*>(chunk.GetPointer())));
594  }
595  sort(sorted_chunks.begin(), sorted_chunks.end(),
596  [](const CRef<CTSE_Chunk_Info>& a,
597  const CRef<CTSE_Chunk_Info>& b) -> bool
598  {
599  auto blob_id_a = a->GetBlobId();
600  auto blob_id_b = b->GetBlobId();
601  return ((blob_id_a < blob_id_b) ||
602  (!(blob_id_b < blob_id_a) && a->GetChunkId() < b->GetChunkId()));
603  });
604  sorted_chunks.erase(unique(sorted_chunks.begin(), sorted_chunks.end(),
605  [](const CRef<CTSE_Chunk_Info>& a,
606  const CRef<CTSE_Chunk_Info>& b) -> bool
607  {
608  return ((&a->GetSplitInfo() == &b->GetSplitInfo()) &&
609  (a->GetChunkId() == b->GetChunkId()));
610  }),
611  sorted_chunks.end());
612 #ifdef NCBI_USE_TSAN
613  const size_t limit_chunks_request = 15;
614 #else
615  const size_t limit_chunks_request = 200;
616 #endif
617  size_t reserve_size = min(sorted_chunks.size(), limit_chunks_request);
618  CDataLoader::TChunkSet chunks;
619  chunks.reserve(reserve_size);
620  vector< AutoPtr<CInitGuard> > guards;
621  guards.reserve(reserve_size);
622  // Collect and lock all chunks to be loaded
623  for ( auto& chunk : sorted_chunks ) {
624  AutoPtr<CInitGuard> guard = chunk->GetLoadInitGuard();
625  if ( !guard.get() || !*guard.get() ) {
626  continue;
627  }
628  chunks.push_back(chunk);
629  guards.push_back(guard);
630  if ( guards.size() >= limit_chunks_request ) {
631  // Load chunks
632  loader->GetChunks(chunks);
633  guards.clear();
634  chunks.clear();
635  }
636  }
637  if ( !guards.empty() ) {
638  // Load chunks
639  loader->GetChunks(chunks);
640  guards.clear();
641  chunks.clear();
642  }
643 }
644 
645 
647 {
648  if ( m_BioseqChunkId >= 0 ) {
650  }
651 }
652 
653 
654 // load results
656  const CSeq_descr& descr)
657 {
659  CTSE_Info& tse = *it->first;
660  ITSE_Assigner& listener = *it->second;
661  listener.LoadDescr(tse, place, descr);
662  }
663 }
664 
665 
667  const CSeq_annot& annot,
668  int chunk_id)
669 {
670  CRef<CSeq_annot> add;
672  CTSE_Info& tse = *it->first;
673  ITSE_Assigner& listener = *it->second;
674  if ( !add ) {
675  add.Reset(const_cast<CSeq_annot*>(&annot));
676  }
677  else {
678  CRef<CSeq_annot> tmp(add);
679  add.Reset(new CSeq_annot);
680  add->Assign(*tmp);
681  }
682  listener.LoadAnnot(tse, place, add, chunk_id);
683  }
684 }
685 
686 void CTSE_Split_Info::x_LoadBioseqs(const TPlace& place, const list< CRef<CBioseq> >& bioseqs, int chunk_id)
687 {
689  CTSE_Info& tse = *it->first;
690  ITSE_Assigner& listener = *it->second;
691  listener.LoadChunkBioseqs(tse, place, bioseqs, chunk_id);
692  }
693 }
694 
695 
697  const TSequence& sequence)
698 {
700  CTSE_Info& tse = *it->first;
701  ITSE_Assigner& listener = *it->second;
702  listener.LoadSequence(tse, place, pos, sequence);
703  }
704 }
705 
706 
708  const TAssembly& assembly)
709 {
711  CTSE_Info& tse = *it->first;
712  ITSE_Assigner& listener = *it->second;
713  listener.LoadAssembly(tse, seq_id, assembly);
714  }
715 }
716 
717 
719  CTSE_SetObjectInfo* set_info)
720 {
721  CRef<CSeq_entry> add;
723  CTSE_Info& tse = *it->first;
724  ITSE_Assigner& listener = *it->second;
725  if ( !add ) {
726  add = &entry;
727  }
728  else {
729  add = new CSeq_entry;
730  add->Assign(entry);
731  set_info = 0;
732  }
733  listener.LoadSeq_entry(tse, *add, set_info);
734  }
735 }
736 
737 
739 {
741  CTSE_Info& tse = *it->first;
742  tse.AddUsedMemory(size);
743  }
744 }
745 
746 
748 {
750  CTSE_Info& tse = *it->first;
751  tse.SetBioseqUpdater(updater);
752  }
753 }
754 
755 
758 
User-defined methods of the data storage class.
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 NotLoaded(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
#define false
Definition: bool.h:36
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
Definition: dlist.tmpl.h:46
static char tmp[3200]
Definition: utf8.c:42
static const char location[]
Definition: config.c:97
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:5078
E_Choice
Choice variants.
static MDB_envinfo info
Definition: mdb_load.c:37
constexpr auto sort(_Init &&init)
const string version
version string
Definition: variables.hpp:66
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_)
Definition: type.c:6
#define _ASSERT
static const int kTSE_Place_id
Modified on Fri Sep 20 14:58:25 2024 by modify_doxy.py rev. 669887