]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/trigger/AliHLTGlobalTrigger.h
correcting the documentation of run-compression.C
[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
f925a066 64 * \param triggerResult The resultant decision bit of the global HLT trigger decision.
52f67e50 65 * \param domain The resultant trigger domain for the global HLT result.
66 * \param description The resultant description for the global HLT result.
f925a066 67 * \returns true if any of the triggers in the trigger menu were matched.
e2bb8ddd 68 */
f925a066 69 virtual bool CalculateTriggerDecision(bool& triggerResult, AliHLTTriggerDomain& domain, TString& description) = 0;
e2bb8ddd 70
71 /**
81d62bb4 72 * Returns the array of internal trigger counters.
52f67e50 73 */
81d62bb4 74 virtual const TArrayL64& GetCounters() const = 0;
52f67e50 75
76 /**
81d62bb4 77 * Sets the internal trigger counter values.
78 * \param counters The array of trigger counters to use.
52f67e50 79 */
81d62bb4 80 virtual void SetCounters(const TArrayL64& counters) = 0;
e2bb8ddd 81
325e5e42 82 /**
83 * Method for checking if the last call to one of the AliHLTGlobalTrigger
84 * methods failed. This is used by the AliHLTGlobalTriggerWrapper to indicate
85 * if the CINT interpreter had problems with the interpreted class.
86 * \returns true if there was a problem with the method call.
87 */
88 virtual bool CallFailed() const { return false; }
89
e2bb8ddd 90 /**
81d62bb4 91 * Creates a new instance of a particular global trigger class.
92 * \param name The name of the class to create.
93 * \returns the new trigger class instance which needs to be deleted by the
94 * caller with the delete operator.
52f67e50 95 */
81d62bb4 96 static AliHLTGlobalTrigger* CreateNew(const char* name);
e2bb8ddd 97
98 ClassDef(AliHLTGlobalTrigger, 0) // Global HLT trigger base class which implements logic for a particular trigger menu.
99};
100
101#endif // ALIHLTGLOBALTRIGGER_H