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

Go to the SVN repository for this file.

1 /* $Id: seqannot_splicer_stats.cpp 90014 2020-05-04 17:30:22Z ivanov $
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: David McElhany
27 *
28 * File Description:
29 * See main application file.
30 *
31 * ===========================================================================
32 */
33 
34 #include <ncbi_pch.hpp>
35 #include <stack>
36 
37 #include <corelib/ncbiexpt.hpp>
38 #include <corelib/ncbimisc.hpp>
39 #include <corelib/ncbiobj.hpp>
40 
42 
44 
45 
46 // Global pointer to access the application statistics singleton.
48 
49 typedef unsigned long TObjCtr;
50 
51 // Private data used by app stats class.
52 static TObjCtr s_NumSa = 0;
53 static TObjCtr s_NumSe = 0;
56 static bool s_Unchanged = false;
57 
58 
59 ///////////////////////////////////////////////////////////////////////////
60 // Singleton class for encapsulating application statistics
61 
63 {
64  static CSeqAnnotSplicerStats instance;
65  return &instance;
66 }
67 
69 {
70  cout << endl;
71  cout << "Number of Seq-annot's processed: " << s_NumSa << endl;
72  cout << "Number of Seq-annot's spliced: " << s_NumSaSpliced << endl;
73  cout << "Number of Seq-annot's unspliced: " << s_NumSa - s_NumSaSpliced << endl << endl;
74  cout << "Number of Seq-entry's processed: " << s_NumSe << endl;
75  cout << "Number of Seq-entry's expanded: " << s_NumSe - s_NumSeUnchanged << endl;
76  cout << "Number of Seq-entry's unchanged: " << s_NumSeUnchanged << endl;
77 }
78 
79 
81 {
82  if (s_NumSa % 10000 == 0) {
83  cout << "Preprocessing Seq-annot # " << s_NumSa << endl;
84  }
85 }
86 
87 
89 {
90  ++s_NumSa;
91 }
92 
93 
95 {
97 }
98 
99 
101 {
102  s_Unchanged = false;
103 }
104 
105 
107 {
108  ++s_NumSe;
109  if (s_Unchanged) {
111  }
112 }
113 
114 
116 {
117  s_Unchanged = true;
118 }
static CSeqAnnotSplicerStats * GetInstance(void)
Defines NCBI C++ exception handling.
Miscellaneous common-use basic types and functionality.
Portable reference counted smart and weak pointers using CWeakRef, CRef, CObject and CObjectEx.
unsigned long TObjCtr
static TObjCtr s_NumSaSpliced
CSeqAnnotSplicerStats * g_Stats
static TObjCtr s_NumSa
static TObjCtr s_NumSe
static bool s_Unchanged
static TObjCtr s_NumSeUnchanged
Modified on Wed Apr 17 13:08:49 2024 by modify_doxy.py rev. 669887