]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG/EMCAL/AliEmcalTriggerDecisionContainer.cxx
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWG / EMCAL / AliEmcalTriggerDecisionContainer.cxx
CommitLineData
d77d1945 1/**************************************************************************
2 * Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15/*
16 * Container storing all trigger decisions by the trigger selection task
17 *
18 * Author: Markus Fasel
19 */
20#include "AliEmcalTriggerDecision.h"
21#include "AliEmcalTriggerDecisionContainer.h"
22
23ClassImp(AliEmcalTriggerDecisionContainer)
24
25//______________________________________________________________________________
26AliEmcalTriggerDecisionContainer::AliEmcalTriggerDecisionContainer():
27 TNamed(),
28 fContainer()
29{
30 /*
31 * Dummy constructor, for I/O, not to be called by the user
32 */
33 fContainer.SetOwner();
34}
35
36//______________________________________________________________________________
37AliEmcalTriggerDecisionContainer::AliEmcalTriggerDecisionContainer(const char* name):
38 TNamed(name, ""),
39 fContainer()
40{
41 /*
42 * Main constructor, called by the user
43 */
44 fContainer.SetOwner();
45}
46
47//______________________________________________________________________________
48void AliEmcalTriggerDecisionContainer::Reset() {
49 /*
50 * Clear container with trigger decisions
51 */
52 fContainer.Clear();
53}
54
55//______________________________________________________________________________
56void AliEmcalTriggerDecisionContainer::AddTriggerDecision(AliEmcalTriggerDecision* const decision) {
57 /*
58 * Add trigger decision to the container
59 *
60 * @param decision: Trigger decision, created by the trigger selection task
61 */
62 fContainer.Add(decision);
63}
64
65//______________________________________________________________________________
66const AliEmcalTriggerDecision* AliEmcalTriggerDecisionContainer::FindTriggerDecision(const char* decname) const {
67 /*
68 * Find a trigger decision with a given name in the trigger decision container
69 *
70 * @param decname: the name of the trigger decision object
71 * @return: the trigger decision (NULL if not found)
72 */
73 return dynamic_cast<const AliEmcalTriggerDecision *>(fContainer.FindObject(decname));
74}