Line data Source code
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 : //-----------------------------------------------------------------------------
19 : /// \class AliMUONVTriggerStore
20 : ///
21 : /// Base class of a trigger container, which holds local, regional and
22 : /// global information for one event.
23 : ///
24 : /// \author Laurent Aphecetche, Subatech
25 : //-----------------------------------------------------------------------------
26 :
27 : #include "AliMUONVTriggerStore.h"
28 : #include "AliMUONLocalTrigger.h"
29 : #include "AliMUONRegionalTrigger.h"
30 : #include "AliMUONGlobalTrigger.h"
31 :
32 : /// \cond CLASSIMP
33 18 : ClassImp(AliMUONVTriggerStore)
34 : /// \endcond
35 :
36 : //_____________________________________________________________________________
37 19 : AliMUONVTriggerStore::AliMUONVTriggerStore()
38 57 : {
39 : /// ctor
40 19 : }
41 :
42 : //_____________________________________________________________________________
43 : AliMUONVTriggerStore::~AliMUONVTriggerStore()
44 0 : {
45 : /// dtor
46 38 : }
47 :
48 : //_____________________________________________________________________________
49 : AliMUONVTriggerStore*
50 : AliMUONVTriggerStore::Create(TTree& tree)
51 : {
52 : /// Create a VTriggerStore from the tree (if possible).
53 22 : return static_cast<AliMUONVTriggerStore*>(AliMUONVStore::Create(tree,"Trigger"));
54 : }
55 :
56 : //_____________________________________________________________________________
57 : TIterator*
58 : AliMUONVTriggerStore::CreateIterator() const
59 : {
60 : /// Return local iterator
61 16 : return CreateLocalIterator();
62 : }
63 :
64 : //_____________________________________________________________________________
65 : Bool_t
66 : AliMUONVTriggerStore::Add(TObject* object)
67 : {
68 : /// Add an object, if object of type local, regional or global
69 0 : if (!object) return kFALSE;
70 0 : AliMUONLocalTrigger* local = dynamic_cast<AliMUONLocalTrigger*>(object);
71 0 : if (local)
72 : {
73 0 : Add(*local);
74 0 : return kTRUE;
75 : }
76 0 : AliMUONRegionalTrigger* regional = dynamic_cast<AliMUONRegionalTrigger*>(object);
77 0 : if (regional)
78 : {
79 0 : Add(*regional);
80 0 : return kTRUE;
81 : }
82 0 : AliMUONGlobalTrigger* global = dynamic_cast<AliMUONGlobalTrigger*>(object);
83 0 : if (global)
84 : {
85 0 : SetGlobal(*global);
86 0 : return kTRUE;
87 : }
88 0 : return kFALSE;
89 0 : }
|