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 Revision 1.1.1.1 2005/09/12 22:11:40 byordano
21 Revision 1.2 2005/08/29 21:15:47 byordano
27 // This class is the CDBPreProcessor interface,
28 // supposed to be implemented by any detector
29 // interested in immediate processing of data
30 // which is retrieved from DCS.
31 // For every particular run set of aliases and
32 // their corespoding value sets are returned.
34 // 1) virtual void Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
35 // This method is called at the begining of data retrieval.
37 // startTime: when the run started
38 // endTime: when the run finished
40 // 2) virtual void Process(const char* alias, TList& valueSet,
43 // This method is called for every particular alias which the detector
44 // is registered in the configuration (see AliShuttleConfig).
46 // valueSet: collection of AliDCSValue
47 // hasError: flag indicating if some error has happened during
48 // the retrieaval of the data for this alias.
50 // 3) virtual void Finalize()
51 // This method is called after the last alias has been processed.
55 #include "AliCDBPreProcessor.h"
57 #include "AliShuttle.h"
60 ClassImp(AliCDBPreProcessor)
62 AliCDBPreProcessor::AliCDBPreProcessor(const char* detector):
65 SetTitle(Form("AliCDBPreProcessor for %s subdetector.", detector));
68 AliCDBPreProcessor::~AliCDBPreProcessor() {
72 Int_t AliCDBPreProcessor::GetRun() const {
74 // Returns current run number.
78 AliError(Form("Not registered AliCDBPreProcessor: %s",
83 return fShuttle->GetCurrentRun();
86 UInt_t AliCDBPreProcessor::GetStartTime() const {
88 // Returns currernt run start time.
91 AliError(Form("Not registered AliCDBPreProcessor: %s",
96 return fShuttle->GetCurrentStartTime();
99 UInt_t AliCDBPreProcessor::GetEndTime() const {
101 // Returns current run end time.
104 AliError(Form("Not registered AliCDBPreProcessor: %s",
109 return fShuttle->GetCurrentEndTime();
112 Bool_t AliCDBPreProcessor::Store(const char* specType, TObject* object,
113 AliCDBMetaData* metaData)
116 // Store object and metaData into the default AliCDBStorage.
117 // Storage path: <detector>/DCS/<specType>
121 AliError(Form("Not registered AliCDBPreProcessor: %s",
126 return fShuttle->Store(GetName(), specType, object, metaData);