Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
87da4377
Commit
87da4377
authored
12 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
print diagnostics when running process
parent
fdff0243
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/conop/pymod/export_processor.cc
+2
-1
2 additions, 1 deletion
modules/conop/pymod/export_processor.cc
modules/conop/src/processor.cc
+9
-1
9 additions, 1 deletion
modules/conop/src/processor.cc
modules/conop/src/processor.hh
+1
-1
1 addition, 1 deletion
modules/conop/src/processor.hh
with
12 additions
and
3 deletions
modules/conop/pymod/export_processor.cc
+
2
−
1
View file @
87da4377
...
...
@@ -67,7 +67,8 @@ void export_processor() {
&
Processor
::
SetUnkResidueTreatment
)
.
add_property
(
"unk_atom_treatment"
,
&
Processor
::
GetUnkAtomTreatment
,
&
Processor
::
SetUnkAtomTreatment
)
.
def
(
"Process"
,
&
Processor
::
Process
)
.
def
(
"Process"
,
&
Processor
::
Process
,
(
arg
(
"ent"
),
arg
(
"log_diags"
)
=
true
))
;
class_
<
PyProcessor
,
boost
::
noncopyable
,
boost
::
shared_ptr
<
WrappedProcessor
>
,
...
...
This diff is collapsed.
Click to expand it.
modules/conop/src/processor.cc
+
9
−
1
View file @
87da4377
...
...
@@ -16,6 +16,7 @@
// along with this library; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//------------------------------------------------------------------------------
#include
<ost/log.hh>
#include
<ost/mol/xcs_editor.hh>
#include
<ost/mol/bond_handle.hh>
#include
<ost/mol/torsion_handle.hh>
...
...
@@ -23,7 +24,8 @@
namespace
ost
{
namespace
conop
{
DiagnosticsPtr
Processor
::
Process
(
mol
::
EntityHandle
ent
)
const
DiagnosticsPtr
Processor
::
Process
(
mol
::
EntityHandle
ent
,
bool
log_diags
)
const
{
DiagnosticsPtr
diags
(
new
Diagnostics
);
if
(
!
this
->
BeginProcessing
(
diags
,
ent
))
{
...
...
@@ -32,6 +34,12 @@ DiagnosticsPtr Processor::Process(mol::EntityHandle ent) const
this
->
DoProcess
(
diags
,
ent
);
this
->
EndProcessing
(
diags
,
ent
);
if
(
log_diags
)
{
for
(
Diagnostics
::
diag_iterator
i
=
diags
->
diags_begin
(),
e
=
diags
->
diags_end
();
i
!=
e
;
++
i
)
{
LOG_WARNING
((
*
i
)
->
Format
(
false
));
}
}
return
diags
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/conop/src/processor.hh
+
1
−
1
View file @
87da4377
...
...
@@ -44,7 +44,7 @@ typedef boost::shared_ptr<Processor> ProcessorPtr;
// the base class for all options
class
DLLEXPORT_OST_CONOP
Processor
{
public:
DiagnosticsPtr
Process
(
mol
::
EntityHandle
ent
)
const
;
DiagnosticsPtr
Process
(
mol
::
EntityHandle
ent
,
bool
log_diags
=
true
)
const
;
virtual
ProcessorPtr
Copy
()
const
=
0
;
protected:
virtual
void
DoProcess
(
DiagnosticsPtr
diags
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment