]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveBase/AliEveMacro.cxx
CMake: removing qpythia from the depedencies
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveMacro.cxx
index 23d8ffcf86276fdcd9b234446b3d5891979dea10..34c011c64e1b55b626f2abbbc25255bafaadf53d 100644 (file)
 #include "AliEveMacro.h"
 
 //______________________________________________________________________________
-// Full description of AliEveMacro
 //
-// !!! Eventually, fSources should be a bitfield, but we need a widget
-// that can show/edit this. Like combo-box with a check-box for each
-// entry.
+// Member fSources is a bitfield, but we do not have a widget
+// that can show/edit this (a combo-box with a check-box for each
+// entry). So ... use a single value for now,
 
 ClassImp(AliEveMacro)
 
@@ -23,13 +22,59 @@ AliEveMacro::AliEveMacro(Int_t src, const TString& tags, const TString& mac,
                         const TString& foo, const TString& args, Bool_t act) :
   TObject(),
   fSources(src), fTags(tags), fMacro (mac),
-  fFunc   (foo), fArgs(args), fActive(act)
+  fFunc   (foo), fArgs(args), fActive(act),
+  fExecStatus(kNotRun), 
+  fExecExcString(), 
+  fExecResult(0)
 {
   // Constructor.
 }
 
 /******************************************************************************/
 
+void AliEveMacro::ResetExecState()
+{
+  // Reset exec variables into state as if the macro has not been run.
+
+  fExecStatus      = kNotRun;
+  fExecExcString = "";
+  fExecResult      = 0;
+}
+
+void AliEveMacro::SetExecNoData()
+{
+  // Set last execution state to 'NoData'.
+
+  fExecStatus = kNoData;
+}
+
+
+void AliEveMacro::SetExecOK(TEveElement* result)
+{
+  // Set last execution state to 'OK' and register result.
+
+  fExecStatus = kOK;
+  fExecResult = result;
+}
+
+
+void AliEveMacro::SetExecException(const TString& exception)
+{
+  // Set last execution state to 'Exception' and store the exception string.
+
+  fExecStatus    = kException;
+  fExecExcString = exception;
+}
+
+void AliEveMacro::SetExecError()
+{
+  // Set last execution state to 'Error'.
+
+  fExecStatus = kError;
+}
+
+/******************************************************************************/
+
 TString AliEveMacro::FormForExec() const
 {
   // Return string suitable for execution.
@@ -42,6 +87,6 @@ TString AliEveMacro::FormForDisplay() const
   // Return string suitable for display.
 
   return TString::Format
-    (" %c %-20s  %-20s  %-30s  %-s", fActive ? 'x' : ' ',
+    (" %c %-22s  %-30s  %-30s  %-s", fActive ? 'x' : ' ',
      fMacro.Data(), fFunc.Data(), fArgs.Data(), fTags.Data());
 }