1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 //-----------------------------------------------------------------------------
19 /// \class AliMUONVClusterStore
21 /// An interface of a cluster container
23 /// The object stored are inherited from AliMUONVCluster
25 /// \author Laurent Aphecetche, Subatech
26 //-----------------------------------------------------------------------------
28 #include "AliMUONVClusterStore.h"
29 #include "AliMUONVCluster.h"
32 ClassImp(AliMUONVClusterStore)
35 //_____________________________________________________________________________
36 AliMUONVClusterStore::AliMUONVClusterStore()
41 //_____________________________________________________________________________
42 AliMUONVClusterStore::~AliMUONVClusterStore()
47 //_____________________________________________________________________________
49 AliMUONVClusterStore::Add(TObject* object)
51 /// Add an object, if it is of the right class
52 AliMUONVCluster* cluster = dynamic_cast<AliMUONVCluster*>(object);
55 return (Add(*cluster)) ? kTRUE : kFALSE;
60 //_____________________________________________________________________________
62 AliMUONVClusterStore::Create(TTree& tree)
64 /// Create a VClusterStore from the tree
65 return static_cast<AliMUONVClusterStore*>(AliMUONVStore::Create(tree,"Cluster"));
68 //______________________________________________________________________________
69 AliMUONVCluster* AliMUONVClusterStore::FindObject(const TObject *obj) const
71 /// Find an object, if of AliMUONVCluster type
72 const AliMUONVCluster* cluster = dynamic_cast<const AliMUONVCluster*>(obj);
74 return static_cast<AliMUONVCluster*>(AliMUONVStore::FindObject(obj));
78 //_____________________________________________________________________________
79 AliMUONVCluster* AliMUONVClusterStore::FindObject(UInt_t uniqueID) const
81 /// Find an object by its uniqueID (default is the same as in AliMUONVStore)
82 return static_cast<AliMUONVCluster*>(AliMUONVStore::FindObject(uniqueID));