]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONVClusterStore.cxx
o add Reset function to CalPad and CalROC o Add functionality to AliTPCdataQA - Reset...
[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 {
7332f213 55 return (Add(*cluster)) ? kTRUE : kFALSE;
25819f29 56 }
57 return kFALSE;
58}
59
60//_____________________________________________________________________________
61AliMUONVClusterStore*
62AliMUONVClusterStore::Create(TTree& tree)
63{
64 /// Create a VClusterStore from the tree
65 return static_cast<AliMUONVClusterStore*>(AliMUONVStore::Create(tree,"Cluster"));
66}
2060b217 67
68//______________________________________________________________________________
69AliMUONVCluster* AliMUONVClusterStore::FindObject(const TObject *obj) const
70{
71 /// Find an object, if of AliMUONVCluster type
72 const AliMUONVCluster* cluster = dynamic_cast<const AliMUONVCluster*>(obj);
73 if (cluster)
74 return static_cast<AliMUONVCluster*>(AliMUONVStore::FindObject(obj));
75 return 0x0;
76}
77
78//_____________________________________________________________________________
79AliMUONVCluster* AliMUONVClusterStore::FindObject(UInt_t uniqueID) const
80{
81 /// Find an object by its uniqueID (default is the same as in AliMUONVStore)
82 return static_cast<AliMUONVCluster*>(AliMUONVStore::FindObject(uniqueID));
83}
84