Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CamShiftEvaluatorCreator.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file protocols/simple_filters/CamShiftEvaluatorCreator.hh
11 /// @brief Header for CamShiftEvaluatorCreator
12 /// @author Matthew O'Meara
13 
14 // Unit Headers
16 
17 // Package Headers
19 
20 // Package Headers
23 
25 
27 
28 // ObjexxFCL Headers
29 #include <ObjexxFCL/string.functions.hh>
30 
31 // Utility headers
32 #include <utility/pointer/ReferenceCount.hh>
33 #include <utility/vector1.hh>
34 #include <utility/file/FileName.hh>
35 
36 #include <basic/options/option.hh>
37 #include <basic/Tracer.hh>
38 //// C++ headers
39 
40 // due to template function
42 
43 
44 // option key includes
45 #include <basic/options/option_macros.hh>
46 #include <basic/options/keys/evaluation.OptionKeys.gen.hh>
47 
48 #include <utility/vector0.hh>
49 
50 //Auto Headers
51 
52 
53 #ifdef WIN32
55 #endif
56 
57 
58 static basic::Tracer tr("protocols.evalution.CamShiftEvaluatorCreator");
59 
60 namespace protocols {
61 namespace simple_filters {
62 
64 
66  using namespace basic::options;
67  if ( options_registered_ ) return;
68  options_registered_ = true;
69 
70  OPT( evaluation::cam_shifts );
71 
72 }
73 
75  using namespace core;
76  using namespace basic::options;
77  using namespace basic::options::OptionKeys;
78 
79 
80  if ( option[ OptionKeys::evaluation::cam_shifts ].user() ) {
81  typedef utility::vector1< std::string > CSVector;
82  CSVector const& cs_shifts( option[ OptionKeys::evaluation::cam_shifts ]() );
83 
84  for ( CSVector::const_iterator it=cs_shifts.begin(); it!=cs_shifts.end(); ++it ) {
85  std::string fname( *it );
86  std::string column;
87  ++it;
88  if ( it != cs_shifts.end() ) {
89  column = *it;
90  } else {
91  utility_exit_with_message(
92  "need to specify dupletss <cs_shifts> <column> with option -evaluation:cam_shifts last read: "+fname );
93  }
94  eval.add_evaluation( new CamShiftEvaluator( column, fname ) );
95  }
96  }
97 
98 }
99 
101  return "CamShiftEvaluatorCreator";
102 }
103 
104 } //namespace
105 } //namespace