20 #include "AliCDBMetaData.h"
21 #include "AliCDBEntry.h"
31 #include "TObjString.h"
32 #include <Riostream.h>
34 #include <TObjString.h>
59 "Upload MUON Tracker readout configuration to OCDB"),
61 fConfigChanged(kFALSE)
83 AliError(
"Could not get MUON/Calib/Config entry for current run ! That's not OK !");
89 AliError(
"Could not get MUON/Calib/Config object for current run (wrong type ?) ! That's not OK !");
101 while ( ( old = static_cast<AliMUONVCalibParam*>(next()) ) )
103 Int_t detElemId = old->
ID0();
104 Int_t manuId = old->ID1();
106 if ( ! newConfig.
FindObject(detElemId,manuId) )
124 const Int_t kSystem = AliMUONPreprocessor::kDAQ;
125 const char* kIdConf =
"CONFIG";
131 TIter nextConf(sources);
136 while ( ( o = static_cast<TObjString*>(nextConf()) ) )
138 TString fileName(
Master()->GetFile(kSystem,kIdConf,o->GetName()));
149 if ( nconfFiles == 0 )
154 AliInfo(
"No configuration files found for this run. That might be fine. Moving on...");
162 AliInfo(
"Will not upload the Configuration as it has not changed");
185 Master()->
Log(
"Storing readout configuration, as it has changed");
187 AliCDBMetaData metaData;
188 metaData.SetBeamPeriod(0);
189 metaData.SetResponsible(
"MUON TRK");
190 TString
comment(
"Computed by AliMUONConfigSubprocessor $Id$");
191 comment.ReplaceAll(
"$",
"");
192 metaData.SetComment(comment.Data());
194 Bool_t validToInfinity = kFALSE;
195 Bool_t result =
Master()->
Store(
"Calib",
"Config",
fConfig, &metaData, 0, validToInfinity);
196 return ( result != kTRUE );
209 TString sFilename(gSystem->ExpandPathName(filename));
211 Master()->
Log(Form(
"Reading %s",sFilename.Data()));
218 Master()->
Log(Form(
"Could not open %s",sFilename.Data()));
UInt_t Process(TMap *dcsAliasMap)
Process this sub-task.
virtual TIterator * CreateIterator() const =0
Return an iterator to loop over the whole store.
AliCDBEntry * GetFromOCDB(const char *pathLevel2, const char *pathLevel3)
Publish AliPreprocessor::GetFromOCDB function.
AliMUONPreprocessor * Master() const
Return the pointer to our master.
virtual void Print(Option_t *wildcard="") const
Print all objects whose name matches wildcard.
Int_t ReadConfigFile(const char *filename)
virtual Int_t GetSize() const =0
The number of objects stored.
Bool_t HasConfigChanged(const AliMUONVStore &newConfig) const
virtual ~AliMUONConfigSubprocessor()
Container of calibration values for a given number of channels.
Implementation of AliMUONVSubprocessor for MUON TRK config.
Base class for a shuttle sub-task for MUON (either TRK or TRG)
TTimeStamp startTime(2009, 8, 7, 0, 0, 0)
AliMUONVStore * fConfig
! Configuration (i.e. list of (buspatch,manu)) for the MUON TRK
virtual Int_t ID0() const
First id of this object.
void Print(Option_t *opt="") const
void Log(const char *message)
Publish AliPreprocessor::Log function.
Basic implementation of AliMUONVStore container using AliMpExMap internally.
TList * GetFileSources(Int_t system, const char *id)
Publish AliPreprocessor::GetFileSources function.
Bool_t Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
Bool_t Store(const char *pathLevel2, const char *pathLevel3, TObject *object, AliCDBMetaData *metaData, Int_t validityStart=0, Bool_t validityInfinite=kFALSE)
Publish AliPreprocessor::Store function.
Shuttle preprocessor for MUON subsystems (TRK and TRG)
static Int_t ReadConfig(const char *filename, AliMUONVStore &confStore)
Base class for MUON data stores.
Bool_t fConfigChanged
! flag to trigger the saving of the configuration
virtual TObject * FindObject(const char *name) const
Find an object by name.