Main Page | Namespace List | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

IValsTool.h

Go to the documentation of this file.
00001 
00008 #ifndef _H_IValsTool
00009 #define _H_IValsTool
00010 
00011 #include "GaudiKernel/IAlgTool.h"
00012 #include "GaudiKernel/MsgStream.h"
00013 
00014 // Declaration of the interface ID ( interface id, major version, minor version) 
00015 static const InterfaceID IID_IValsTool("IValsTool", 6 , 0); 
00016 
00024 namespace {
00025     enum check { NOCALC = -1, CALC = 0, CHECK = 1};
00026     }
00027 
00028 class   IValsTool : virtual public IAlgTool
00029 {
00030 public:
00031     
00033     static const InterfaceID& interfaceID() { return IID_IValsTool; }
00034 
00035 // LSR 14-Jul-08 code for ntuple types
00036     
00038     virtual StatusCode getVal(std::string varName, double& value, int check = CALC) = 0;
00039     virtual StatusCode getVal(std::string varName, float& value, int check = CALC) = 0;
00040     virtual StatusCode getVal(std::string varName, int& value, int check = CALC) = 0;
00041     virtual StatusCode getVal(std::string varName, unsigned int& value, int check = CALC) = 0;
00042     virtual StatusCode getVal(std::string varName, unsigned long long& value, int check = CALC) = 0;
00043  
00044 // LSR 14-Jul-08 code for ntuple types
00046     virtual StatusCode getValCheck(std::string varName, double& value) =0;
00047     virtual StatusCode getValCheck(std::string varName, float& value) =0;
00048     virtual StatusCode getValCheck(std::string varName, int& value) =0;
00049     virtual StatusCode getValCheck(std::string varName, unsigned int& value) =0;
00050     virtual StatusCode getValCheck(std::string varName, unsigned long long& value) =0;
00051 
00053     virtual StatusCode browse(MsgStream log, const std::string varName = "") =0;
00055     virtual StatusCode doCalcIfNotDone() = 0;
00057     virtual void zeroVals() = 0;
00059     virtual int getCalcCount() = 0;
00061     virtual StatusCode getVal(std::string varName, std::string& value, int check = CALC) = 0;
00062     virtual StatusCode getValCheck(std::string varName, std::string& value) =0;
00063     virtual void setLoadOrder(int index) = 0;
00064     virtual int  getLoadOrder() = 0;
00065     virtual bool isLoaded() = 0;
00066     
00072     class Visitor 
00073     {
00074     public:
00076     enum eVisitorRet {
00078         CONT,        
00080         USER_DONE, 
00082         ERROR,
00084         DONE  
00085     };
00086  
00087 // LSR 14-Jul-08 code for ntuple types       
00089         virtual Visitor::eVisitorRet analysisValue(std::string varName,
00090             const double& value) const =0;
00091         virtual Visitor::eVisitorRet analysisValue(std::string varName,
00092             const float& value) const =0;
00093         virtual Visitor::eVisitorRet analysisValue(std::string varName,
00094             const int& value) const =0;
00095         virtual Visitor::eVisitorRet analysisValue(std::string varName,
00096             const unsigned int& value) const =0;
00097         virtual Visitor::eVisitorRet analysisValue(std::string varName,
00098             const unsigned long long& value) const =0;
00099         virtual Visitor::eVisitorRet analysisValue(std::string varName,
00100             const char* value) const =0;
00101     }; 
00102     
00103     
00105     virtual Visitor::eVisitorRet traverse(IValsTool::Visitor* v, 
00106         const bool checkCalc=true) = 0;   
00107 };
00108 
00109 #endif  // _H_IValsTool

Generated on Mon Dec 1 20:09:05 2008 by doxygen 1.3.3