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 ///////////////////////////////////////////////////////////////////////////////
20 /// class for VZERO reconstruction //
22 ///////////////////////////////////////////////////////////////////////////////
25 #include "AliVZEROReconstructor.h"
27 ClassImp(AliVZEROReconstructor)
29 //_____________________________________________________________________________
30 AliVZEROReconstructor:: AliVZEROReconstructor()
32 // Default constructor
34 // Get calibration data
36 fCalibData = GetCalibData();
40 //_____________________________________________________________________________
41 AliVZEROReconstructor& AliVZEROReconstructor::operator =
42 (const AliVZEROReconstructor& /*reconstructor*/)
44 // assignment operator
46 Fatal("operator =", "assignment operator not implemented");
50 //_____________________________________________________________________________
51 AliVZEROReconstructor::~AliVZEROReconstructor()
58 //_____________________________________________________________________________
59 AliCDBStorage* AliVZEROReconstructor::SetStorage(const char *uri)
62 Bool_t deleteManager = kFALSE;
64 AliCDBManager *manager = AliCDBManager::Instance();
65 AliCDBStorage *defstorage = manager->GetDefaultStorage();
67 if(!defstorage || !(defstorage->Contains("VZERO"))){
68 AliWarning("No default storage set or default storage doesn't contain VZERO!");
69 manager->SetDefaultStorage(uri);
70 deleteManager = kTRUE;
73 AliCDBStorage *storage = manager->GetDefaultStorage();
76 AliCDBManager::Instance()->UnsetDefaultStorage();
77 defstorage = 0; // the storage is killed by AliCDBManager::Instance()->Destroy()
83 //_____________________________________________________________________________
84 AliVZEROCalibData* AliVZEROReconstructor::GetCalibData() const
87 // Getting calibration object for VZERO set
89 AliCDBEntry *entry = AliCDBManager::Instance()->Get("VZERO/Calib/Data");
90 AliVZEROCalibData *calibdata = (AliVZEROCalibData*) entry->GetObject();
92 if (!calibdata) AliWarning("No calibration data from calibration database !");