AliRoot Core  3dc7879 (3dc7879)
AliMUONVTriggerStore.cxx
Go to the documentation of this file.
1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 // $Id$
17 
18 //-----------------------------------------------------------------------------
25 //-----------------------------------------------------------------------------
26 
27 #include "AliMUONVTriggerStore.h"
28 #include "AliMUONLocalTrigger.h"
29 #include "AliMUONRegionalTrigger.h"
30 #include "AliMUONGlobalTrigger.h"
31 
33 ClassImp(AliMUONVTriggerStore)
35 
36 //_____________________________________________________________________________
38 {
40 }
41 
42 //_____________________________________________________________________________
44 {
46 }
47 
48 //_____________________________________________________________________________
51 {
53  return static_cast<AliMUONVTriggerStore*>(AliMUONVStore::Create(tree,"Trigger"));
54 }
55 
56 //_____________________________________________________________________________
57 TIterator*
59 {
61  return CreateLocalIterator();
62 }
63 
64 //_____________________________________________________________________________
65 Bool_t
66 AliMUONVTriggerStore::Add(TObject* object)
67 {
69  if (!object) return kFALSE;
70  AliMUONLocalTrigger* local = dynamic_cast<AliMUONLocalTrigger*>(object);
71  if (local)
72  {
73  Add(*local);
74  return kTRUE;
75  }
76  AliMUONRegionalTrigger* regional = dynamic_cast<AliMUONRegionalTrigger*>(object);
77  if (regional)
78  {
79  Add(*regional);
80  return kTRUE;
81  }
82  AliMUONGlobalTrigger* global = dynamic_cast<AliMUONGlobalTrigger*>(object);
83  if (global)
84  {
85  SetGlobal(*global);
86  return kTRUE;
87  }
88  return kFALSE;
89 }
virtual TIterator * CreateLocalIterator() const =0
Create iterator on local trigger.
virtual void SetGlobal(const AliMUONGlobalTrigger &globalTrigger)=0
Set global trigger.
Base class of a trigger information store.
virtual TIterator * CreateIterator() const
Create iterator (on local card)
Reconstructed regional Trigger object.
TTree * tree
Reconstructed Local Trigger object.
virtual AliMUONVStore * Create() const =0
Create an empty copy of this.
Global trigger object.
virtual Bool_t Add(TObject *object)
Add an object, if of the right type.