AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONVStore Class Referenceabstract

Base class for MUON data stores. More...

#include <AliMUONVStore.h>

Inheritance diagram for AliMUONVStore:

Public Member Functions

 AliMUONVStore ()
 
virtual ~AliMUONVStore ()
 
virtual Bool_t Add (TObject *object)=0
 Add an object to the store. More...
 
virtual void Clear (Option_t *opt="")=0
 Clear ourselves (i.e. Reset) More...
 
virtual AliMUONVStoreCreate () const =0
 Create an empty copy of this. More...
 
virtual TIterator * CreateIterator () const =0
 Return an iterator to loop over the whole store. More...
 
virtual Bool_t CanConnect () const =0
 Whether the Connect(TTree&) method is implemented. More...
 
virtual Bool_t Connect (TTree &tree, Bool_t alone=kTRUE) const
 Connect us to a TTree (only valid if CanConnect()==kTRUE) More...
 
virtual TObject * FindObject (const char *name) const
 Find an object by name. More...
 
virtual TObject * FindObject (const TObject *object) const
 Find an object. More...
 
virtual TObject * FindObject (UInt_t uniqueID) const
 Find an object using a single id. More...
 
virtual TObject * FindObject (Int_t i, Int_t j) const
 Find an object using 2 ids. More...
 
virtual Int_t GetSize () const =0
 The number of objects stored. More...
 
virtual Int_t GetSize (Int_t i) const
 The number of objects stored for firstid=i. Not implemented by default. More...
 
virtual Bool_t IsEmpty () const
 Whether we are empty or not. More...
 
virtual void Print (Option_t *wildcard="") const
 Print all objects whose name matches wildcard. More...
 
virtual void Print (Option_t *wildcard, Option_t *opt) const
 Print, with option, all objects whose name matches wildcard. More...
 

Static Public Member Functions

static AliMUONVStoreCreate (TTree &tree, const char *what)
 Create a store from a TTree. More...
 

Detailed Description

Base class for MUON data stores.

A store is a container, which can be searched for (using FindObject methods), iterated upon (using CreateIterator() method), and into which you can add objects (using Add)

In addition, a store can be connected to a TTree.

The general way of dealing with I/O for MUON is a two stage process :

1) first get a TTree pointer using the AliLoader mechanism (this is AliRoot general)

2) connect that TTree to a MUON (virtual) data container using the container's Connect(TTree&) method (this is MUON specific)

Example for reading digits for nevents

AliMUONVDigitStore* digitStore(0x0);
AliLoader* loader = ... ( get loader from somewhere, e.g. AliRunLoader::GetDetectorLoader());
loader->LoadDigits("READ"); // load digits
for ( Int_t i = 0; i < nevents; ++i )
{
TTree* treeD = loader->TreeD(); // get the tree
if (!digitStore) digitStore = static_cast<AliMUONVDigitStore*>
(AliMUONVDigitStore::CreateStore(*treeD,"Digit")); // creates a container for digits
(concrete class is given by the tree itself)
digitStore->Connect(*treeD);
treeD->GetEvent(0); // actual reading of the data
the digitStore is now filled and ready to be used
....
digitStore->Clear(); // reset once used
}

Please note that for reading data, you do not need to know the concrete container class, as it is given to you by the TTree

Example for writing digits

get the loader and do a loader->LoadDigits("RECREATE" or "UPDATE")
(generally done by the framework itself)
// for writing, must decide on the concrete store class to use
for ( Int_t i = 0; i < nevents; ++i )
{
TTree* treeD = loader->TreeD();
digitStore->Connect(*treeD);
... put some digits in the digitStore
treeD->Fill();
loader->WriteDigits("OVERWRITE");
}
delete digitStore;
loader->UnloadDigits();

In the write case, one must specify a concrete class for the container

Definition at line 22 of file AliMUONVStore.h.

Constructor & Destructor Documentation

AliMUONVStore::AliMUONVStore ( )

ctor

Definition at line 109 of file AliMUONVStore.cxx.

AliMUONVStore::~AliMUONVStore ( )
virtual

dtor

Definition at line 115 of file AliMUONVStore.cxx.

Member Function Documentation

virtual Bool_t AliMUONVStore::Add ( TObject *  object)
pure virtual

Add an object to the store.

Implemented in AliMUONVDigitStore, AliMUON1DArray, AliMUONVClusterStore, AliMUON1DMap, AliMUONVTriggerStore, AliMUONVHitStore, AliMUON2DMap, AliMUONVTrackStore, and AliMUONVTriggerTrackStore.

Referenced by AliMUONTrackerData::Add(), Add(), AliMUONTrackerData::Add1D(), AliMUONTrackerData::Add2D(), AliMUONQAMappingCheck::AddClusterLocation(), AliDAConfig::AliDAConfig(), AliMUONTrackerData::AliMUONTrackerData(), AliMUONTrackerData::BusPatchParam(), AliMUONTrackerData::ChamberParam(), AliMUONTrackerData::ChannelParam(), AliMUONTrackerData::CompareData(), AliMUONPadStatusMaker::ComputeStatus(), AliMUONPadStatusMapMaker::ComputeStatusMap(), AliMUONTrackerConditionDataMaker::CreateHVStore(), AliMUONTrackerConditionDataMaker::CreateStatusMapStore(), AliMUONTrackerConditionDataMaker::CreateStatusStore(), AliMUONTrackerIO::DecodeCapacitances(), AliMUONTrackerIO::DecodeConfig(), AliMUONTrackerIO::DecodeGains(), AliMUONTrackerIO::DecodeOccupancy(), AliMUONTrackerIO::DecodePedestals(), AliMUONTrackerData::DetectionElementParam(), AliMUONTrackerConditionDataMaker::ExpandConfig(), AliMUONPainterPadStore::Get(), AliMUONTrackerData::GetChannelSparseHisto(), AliMUONTrackerData::GetManuSparseHisto(), AliMUONPedestal::LoadConfig(), main(), AliMUONCDB::MakeCapacitanceStore(), AliMUONCDB::MakeGainStore(), AliMUONCDB::MakeLocalTriggerMaskStore(), AliMUONCDB::MakeOccupancyMapStore(), MakePattern(), AliMUONPedestal::MakePed(), AliMUONCDB::MakePedestalStore(), AliMUONTrackerData::ManuParam(), AliMUONTrackerConditionDataMaker::PatchGainStore(), AliMUONTrackerData::PCBParam(), AliMUONTrackerDataMaker::ProcessEvent(), AliMUONTriggerIO::ReadLocalMasks(), AliMUONPadStatusMapMaker::RefreshRejectProbabilities(), and AliMUONRejectList::SetChannelProbability().

virtual Bool_t AliMUONVStore::CanConnect ( ) const
pure virtual
AliMUONVStore * AliMUONVStore::Create ( TTree &  tree,
const char *  what 
)
static

Create a store from a TTree.

Create a store from a tree. Forwarded to AliMUONTreeManager::CreateStore

Definition at line 131 of file AliMUONVStore.cxx.

virtual TIterator* AliMUONVStore::CreateIterator ( ) const
pure virtual
TObject * AliMUONVStore::FindObject ( const char *  name) const
virtual

Find an object by name.

Definition at line 161 of file AliMUONVStore.cxx.

Referenced by AliMUONTrackerData::Add(), Add(), AliMUONESDInterface::Add(), AliMUONTrackerData::Add1D(), AliMUONTrackerData::Add2D(), AliMUONQAMappingCheck::AddClusterLocation(), AliMUONTrackerData::BusPatchParam(), AliMUONDigitCalibrator::CalibrateDigit(), AliMUONTrackerData::ChamberParam(), AliMUONTrackerData::ChannelParam(), AliMUONRejectList::ChannelProbability(), AliMUONTrackerData::CompareData(), AliMUONPadStatusMaker::ComputeStatus(), AliMUONTrackerConditionDataMaker::CreateHVStore(), AliMUONTrackerIO::DecodeCapacitances(), AliMUONTrackerIO::DecodeConfig(), AliMUONTrackerIO::DecodeGains(), AliMUONTrackerIO::DecodeOccupancy(), AliMUONTrackerIO::DecodePedestals(), DecodeRecoCocktail(), AliMUONTrackerData::DetectionElementParam(), AliMUONCDB::Diff(), DIMUONFakes(), AliMUONPedestal::Finalize(), AliMUONRecoCheck::FindCompatibleTrack(), AliMUONVClusterStore::FindObject(), AliMUONESDInterface::FindTrack(), AliMUONCalibrationData::Gains(), AliMUONGainEventGenerator::GeneratePedestals(), AliMUONPainterPadStore::Get(), AliMUONTrackerData::GetChannelSparseHisto(), AliMUONTrackerData::GetManuSparseHisto(), AliMUONPainterPadStore::GetPadGeometry(), AliMUONPedestalSubprocessor::HasConfigChanged(), AliMUONTrackerQADataMakerRec::InitCommon(), AliMUONPedestal::LoadConfig(), AliMUONCalibrationData::LocalTriggerBoardMasks(), main(), AliMUONPedestal::MakeASCIIoutput(), AliMUONCDB::MakeCapacitanceStore(), AliMUONPedestal::MakeControlHistos(), MakePattern(), MakePatternStore(), AliMUONPedestal::MakePed(), AliMUONTrackerData::ManuParam(), MUONFakes(), MUONRefit(), AliMUONPadStatusMaker::Neighbours(), AliMUONPadStatusMaker::PadStatus(), AliMUONTrackerData::PCBParam(), AliMUONCalibrationData::Pedestals(), AliMUONTrackerDataMaker::ProcessEvent(), AliMUONRejectList::SetChannelProbability(), AliMUONCDB::ShowCapacitances(), AliMUONPadStatusMapMaker::StatusMap(), UpdateLocalMask(), AliMUON2DStoreValidator::Validate(), and AliMUONTriggerIO::WriteLocalMasks().

TObject * AliMUONVStore::FindObject ( const TObject *  object) const
virtual

Find an object.

Reimplemented in AliMUONVDigitStore, AliMUONVClusterStore, and AliMUONClusterStoreV2.

Definition at line 177 of file AliMUONVStore.cxx.

TObject * AliMUONVStore::FindObject ( UInt_t  uniqueID) const
virtual

Find an object using a single id.

Generic find method. Should be overriden by derived class if it can be made more efficient there.

Reimplemented in AliMUONVDigitStore, AliMUONVClusterStore, AliMUONClusterStoreV2, AliMUONDigitStoreVImpl, AliMUON2DMap, AliMUON1DArray, and AliMUON1DMap.

Definition at line 195 of file AliMUONVStore.cxx.

TObject * AliMUONVStore::FindObject ( Int_t  i,
Int_t  j 
) const
virtual

Find an object using 2 ids.

Find an object using 2 identifiers

Reimplemented in AliMUON2DMap, and AliMUON1DMap.

Definition at line 152 of file AliMUONVStore.cxx.

Int_t AliMUONVStore::GetSize ( Int_t  i) const
virtual

The number of objects stored for firstid=i. Not implemented by default.

Number of objects store for "i", whatever that can means

Reimplemented in AliMUONVDigitStore, and AliMUON2DMap.

Definition at line 213 of file AliMUONVStore.cxx.

virtual Bool_t AliMUONVStore::IsEmpty ( ) const
inlinevirtual

Whether we are empty or not.

Definition at line 68 of file AliMUONVStore.h.

void AliMUONVStore::Print ( Option_t *  wildcard,
Option_t *  opt 
) const
virtual

Print, with option, all objects whose name matches wildcard.

Reimplemented in AliMUONTriggerStoreV1.

Definition at line 243 of file AliMUONVStore.cxx.


The documentation for this class was generated from the following files: