THaCutList Class to manage dynamically-defined cuts (tests).
THaCutList() | |
THaCutList(const THaVarList* lst) | |
THaCutList(const THaCutList&) | |
virtual | ~THaCutList() |
static TClass* | Class() |
virtual void | Clear(Option_t* opt = "") |
virtual void | ClearAll(Option_t* opt = "") |
virtual void | ClearBlock(const char* block = kDefaultBlockName, Option_t* opt = "") |
virtual void | Compile() |
virtual Int_t | Define(const char* cutname, const char* expr, const char* block = kDefaultBlockName) |
virtual Int_t | Define(const char* cutname, const char* expr, const THaVarList* lst, const char* block = kDefaultBlockName) |
virtual Int_t | Eval() |
virtual Int_t | EvalBlock(const char* block = kDefaultBlockName) |
virtual Int_t | EvalBlock(const TList* plist) |
THaNamedList* | FindBlock(const char* block) const |
THaCut* | FindCut(const char* name) const |
const THashList* | GetBlockList() const |
const THashList* | GetCutList() const |
Int_t | GetNblocks() const |
Int_t | GetSize() const |
virtual TClass* | IsA() const |
virtual Int_t | Load(const char* filename = kDefaultCutFile) |
virtual void | Print(Option_t* option = "") const |
virtual void | PrintBlock(const char* block = kDefaultBlockName, Option_t* option = "") const |
virtual void | PrintCut(const char* cutname, Option_t* option = "") const |
virtual Int_t | Remove(const char* cutname) |
virtual Int_t | RemoveBlock(const char* block = kDefaultBlockName) |
virtual void | Reset() |
virtual Int_t | Result(const char* cutname = "", THaCutList::EWarnMode mode = kWarn) |
virtual void | SetList(THaVarList* lst) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
static void | MakePrintOption(THaPrintOption& opt, const TList* plist) |
virtual void | PrintHeader(const THaPrintOption& opt) const |
THaHashList* | fBlocks | Hash list holding blocks of cuts. |
THaHashList* | fCuts | Hash list holding all cuts |
const THaVarList* | fVarList | Pointer to list of variables |
Inheritance Chart: | |||||
|
Normal constructor. Create the main lists and set the variable list.
Clear the results of the defined cuts in the named block
Define a new cut with given name in given block. If the block does not exist, it is created. This is the normal way to define a cut since there is usually just one variable list. Cut names MUST be unique and cannot be empty. Quotes and whitespace are illegal in cut names; any other characters are allowed. Symbolic variables in expressions must only refer to variables defined in the variable list OR to previously defined cuts. It is possible to use cut names from one block in definitions for a different block. This should be done with care, however, since such "external" cuts are not necessarily updated with the same frequency as the current block, depending on the design of the application. A return value of 0 indicates success, negative numbers indicate error.
Evaluate all tests in all blocks. Because of possible dependences between blocks, each block is evaluated separately in the order in which the blocks were defined.
Evaluate all cuts in the given list in the order in which they were defined.
Evaluate all tests in the given block in the order in which they were defined. If no argument is given, the default block is evaluated.
Read cut definitions from a file and create the cuts. If no filename is given, the file ./cutdef.dat is used. Lines starting with # or "//" are treated as comments. Blank lines and leading spaces are ignored. A valid cut definition consists of two fields, a cut name and the corresponding expression. The fields are separated by whitespace. Comments following the cut expression are ignored. Block names can be set using "Block:" as the cut name (without quotes) followed by the name of the block. Cuts are defined via the Define() method; see the description of Define() for more details. Examples: # This is a comment. Blank lines are ignored, so are leading spaces. xcut x>1 cut1 x+y<10 Block: Target_cuts cut2 x<10 || x>20 // Comment goes here zcut (z^2-2)>0 # This text is ignored A return value of 0 indicates success. Negative values indicate severe errors (e.g. file not found, read error). Positive numbers indicate the number of unprocessable lines (e.g. illegal expression, bad cutname) for which no cuts were defined.
If the print option is either "LINE" or "STATS", determine the widths of the text fields of all the cuts in the given list and append them to the print option. This is an internal utility function used by Print() and PrintBlock().
Print all cuts in the named block.
Print the definition of a single cut
Print header for Print() and PrintBlock(). This is an internal function.
Remove all cuts contained in the named block.
Set the pointer to the list of global variables to be used by default. Other variable lists can be used for individual cut definitions.
{ return reinterpret_cast<THaCut*>(fCuts->FindObject( name )); }
{ return reinterpret_cast<THaNamedList*>(fBlocks->FindObject( block )); }