]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/trigger/AliHLTGlobalTrigger.h
make generation of monitoring trigger an optional feature
[u/mrichter/AliRoot.git] / HLT / trigger / AliHLTGlobalTrigger.h
CommitLineData
c580e182 1//-*- Mode: C++ -*-
68099920 2// $Id$
e2bb8ddd 3#ifndef ALIHLTGLOBALTRIGGER_H
4#define ALIHLTGLOBALTRIGGER_H
5/* This file is property of and copyright by the ALICE HLT Project *
6 * ALICE Experiment at CERN, All rights reserved. *
7 * See cxx source for full Copyright notice */
8
9/// @file AliHLTGlobalTrigger.h
10/// @author Artur Szostak <artursz@iafrica.com>
11/// @date 19 Dec 2008
12/// @brief Declaration of the AliHLTGlobalTrigger base class.
13
14#include "TObject.h"
e2bb8ddd 15#include "AliHLTDataTypes.h"
e2bb8ddd 16
52f67e50 17class AliHLTTriggerDomain;
52f67e50 18class AliHLTTriggerMenu;
81d62bb4 19class TString;
20class TArrayL64;
e2bb8ddd 21
22/**
23 * \class AliHLTGlobalTrigger
24 * This class is an abstract class. Classes which derive from this class should
81d62bb4 25 * implement the logic for a particular trigger menu. The AliHLTGlobalTriggerComponent
26 * takes the AliHLTTriggerMenu class and creates a class deriving from AliHLTGlobalTrigger
27 * on the fly to implement the trigger logic for that particular trigger menu.
e2bb8ddd 28 */
81d62bb4 29class AliHLTGlobalTrigger
e2bb8ddd 30{
31 public:
32
81d62bb4 33 /// Default destructor.
34 virtual ~AliHLTGlobalTrigger() {}
e2bb8ddd 35
36 /**
52f67e50 37 * Abstract method to fill values from a trigger menu. Specifically, the description
38 * strings and domain entry values will be copied over.
39 * \param menu The trigger menu to fill from.
e2bb8ddd 40 */
52f67e50 41 virtual void FillFromMenu(const AliHLTTriggerMenu& menu) = 0;
e2bb8ddd 42
43 /**
52f67e50 44 * Abstract method to indicate that a new event is being processed and the
45 * internal buffers should be cleared or reset.
e2bb8ddd 46 */
52f67e50 47 virtual void NewEvent() = 0;
566a01d0 48
e2bb8ddd 49 /**
50 * Abstract method which should fill in the internal attributes from the given
51 * object.
52 * \param object The object to fill from.
53 * \param type The data block type the object was found in.
54 * \param spec The data block specification the object was found in.
55 */
56 virtual void Add(
57 const TObject* object,
58 const AliHLTComponentDataType& type,
59 AliHLTUInt32_t spec
60 ) = 0;
61
62 /**
63 * Abstract method that calculates the trigger decision
52f67e50 64 * \param domain The resultant trigger domain for the global HLT result.
65 * \param description The resultant description for the global HLT result.
e2bb8ddd 66 * \returns The global HLT trigger decision result.
67 */
52f67e50 68 virtual bool CalculateTriggerDecision(AliHLTTriggerDomain& domain, TString& description) = 0;
e2bb8ddd 69
70 /**
81d62bb4 71 * Returns the array of internal trigger counters.
52f67e50 72 */
81d62bb4 73 virtual const TArrayL64& GetCounters() const = 0;
52f67e50 74
75 /**
81d62bb4 76 * Sets the internal trigger counter values.
77 * \param counters The array of trigger counters to use.
52f67e50 78 */
81d62bb4 79 virtual void SetCounters(const TArrayL64& counters) = 0;
e2bb8ddd 80
325e5e42 81 /**
82 * Method for checking if the last call to one of the AliHLTGlobalTrigger
83 * methods failed. This is used by the AliHLTGlobalTriggerWrapper to indicate
84 * if the CINT interpreter had problems with the interpreted class.
85 * \returns true if there was a problem with the method call.
86 */
87 virtual bool CallFailed() const { return false; }
88
e2bb8ddd 89 /**
81d62bb4 90 * Creates a new instance of a particular global trigger class.
91 * \param name The name of the class to create.
92 * \returns the new trigger class instance which needs to be deleted by the
93 * caller with the delete operator.
52f67e50 94 */
81d62bb4 95 static AliHLTGlobalTrigger* CreateNew(const char* name);
e2bb8ddd 96
97 ClassDef(AliHLTGlobalTrigger, 0) // Global HLT trigger base class which implements logic for a particular trigger menu.
98};
99
100#endif // ALIHLTGLOBALTRIGGER_H