]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONVClusterStore.cxx
Added switch as new member for DA (Christian)
[u/mrichter/AliRoot.git] / MUON / AliMUONVClusterStore.cxx
CommitLineData
25819f29 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
3d1463c8 18//-----------------------------------------------------------------------------
25819f29 19/// \class AliMUONVClusterStore
20///
21/// An interface of a cluster container
22///
2060b217 23/// The object stored are inherited from AliMUONVCluster
25819f29 24///
25/// \author Laurent Aphecetche, Subatech
3d1463c8 26//-----------------------------------------------------------------------------
25819f29 27
28#include "AliMUONVClusterStore.h"
2060b217 29#include "AliMUONVCluster.h"
25819f29 30
31/// \cond CLASSIMP
32ClassImp(AliMUONVClusterStore)
33/// \endcond
34
35//_____________________________________________________________________________
36AliMUONVClusterStore::AliMUONVClusterStore()
37{
38 /// ctor
39}
40
41//_____________________________________________________________________________
42AliMUONVClusterStore::~AliMUONVClusterStore()
43{
44 /// dtor
45}
46
47//_____________________________________________________________________________
48Bool_t
49AliMUONVClusterStore::Add(TObject* object)
50{
51 /// Add an object, if it is of the right class
2060b217 52 AliMUONVCluster* cluster = dynamic_cast<AliMUONVCluster*>(object);
25819f29 53 if (cluster)
54 {
55 Add(*cluster);
56 return kTRUE;
57 }
58 return kFALSE;
59}
60
61//_____________________________________________________________________________
62AliMUONVClusterStore*
63AliMUONVClusterStore::Create(TTree& tree)
64{
65 /// Create a VClusterStore from the tree
66 return static_cast<AliMUONVClusterStore*>(AliMUONVStore::Create(tree,"Cluster"));
67}
2060b217 68
69//______________________________________________________________________________
70AliMUONVCluster* AliMUONVClusterStore::FindObject(const TObject *obj) const
71{
72 /// Find an object, if of AliMUONVCluster type
73 const AliMUONVCluster* cluster = dynamic_cast<const AliMUONVCluster*>(obj);
74 if (cluster)
75 return static_cast<AliMUONVCluster*>(AliMUONVStore::FindObject(obj));
76 return 0x0;
77}
78
79//_____________________________________________________________________________
80AliMUONVCluster* AliMUONVClusterStore::FindObject(UInt_t uniqueID) const
81{
82 /// Find an object by its uniqueID (default is the same as in AliMUONVStore)
83 return static_cast<AliMUONVCluster*>(AliMUONVStore::FindObject(uniqueID));
84}
85