20 #include "AliCDBMetaData.h"
30 #include <Riostream.h>
32 #include <TObjString.h>
33 #include <TObjString.h>
62 "Upload MUON Tracker Gains to OCDB"),
83 const Int_t kSystem = AliMUONPreprocessor::kDAQ;
84 const char* kId =
"GAINS";
92 Master()->
Log(Form(
"Reading Gain files for Run %d startTime %u endTime %u",
93 run,startTime,endTime));
100 while ( ( o = static_cast<TObjString*>(next()) ) )
102 TString fileName(
Master()->GetFile(kSystem,kId,o->GetName()));
103 Int_t ok =
ReadFile(fileName.Data());
126 Master()->
Log(
"Failed to read any Gains");
166 lines.SetOwner(kTRUE);
168 validator.
Report(lines,*chambers);
173 while ( ( line = static_cast<TObjString*>(next()) ) )
181 AliCDBMetaData metaData;
182 metaData.SetBeamPeriod(0);
183 metaData.SetResponsible(
"MUON TRK");
184 metaData.SetComment(Form(
"Computed by AliMUONGainSubprocessor "
187 Bool_t validToInfinity = kTRUE;
188 Bool_t result =
Master()->
Store(
"Calib",
"Gains",
fGains, &metaData, 0, validToInfinity);
190 return ( result != kTRUE );
206 TString sFilename(gSystem->ExpandPathName(filename));
208 Master()->
Log(Form(
"Reading %s",sFilename.Data()));
215 Master()->
Log(Form(
"Could not open %s",sFilename.Data()));
218 Master()->
Log(Form(
"File %s is not of the expected format",sFilename.Data()));
221 Master()->
Log(Form(
"File %s is a dummy one. That's fine. I won't do anything then ;-)",sFilename.Data()));
AliMUONVStore * fGains
! Gains for the MUON TRK
AliMUONPreprocessor * Master() const
Return the pointer to our master.
file is a dummy one (e.g. some intermediate gain files from the DA)
virtual ~AliMUONGainSubprocessor()
Bool_t fSkip
! whether we should skip this run (because it's dummy)
TString fComment
! comment for OCDB entry
Base class for a shuttle sub-task for MUON (either TRK or TRG)
TTimeStamp startTime(2009, 8, 7, 0, 0, 0)
Int_t ReadFile(const char *filename)
static Int_t ReadGains(const char *filename, AliMUONVStore &gainStore, TString &comment)
UInt_t Process(TMap *dcsAliasMap)
Process this sub-task.
void Log(const char *message)
Publish AliPreprocessor::Log function.
TObjArray * Validate(const AliMUONVStore &store, Float_t invalidFloatValue, AliMUONVStore *config=0x0)
Basic implementation of AliMUONVStore container using AliMpExMap internally.
void Report(TList &lines) const
Reports what is missing, trying to be as concise as possible.
TList * GetFileSources(Int_t system, const char *id)
Publish AliPreprocessor::GetFileSources function.
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.
Bool_t Initialize(Int_t run, UInt_t startTime, UInt_t endTime)
Implementation of AliMUONVSubprocessor for MUON TRK Gains.
Shuttle preprocessor for MUON subsystems (TRK and TRG)
Determine which channels, manus, DEs, stations are missing from a 2DStore.